jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kulakov <notificati...@github.com>
Subject Re: [jclouds-labs] CloudSigma2 ComputeService and SecurityGroupExtension (#70)
Date Sun, 05 Oct 2014 16:49:17 GMT
> +                  destinationPort.length());
> +         }
> +         if (destinationPort.contains(":")) {
> +            int[] ports = parsePort(destinationPort);
> +            permissionBuilder.fromPort(ports[0]);
> +            permissionBuilder.toPort(ports[1]);
> +         } else {
> +            int port = Integer.parseInt(destinationPort);
> +            permissionBuilder.fromPort(port);
> +            permissionBuilder.toPort(port);
> +         }
> +      }
> +      permissionBuilder.ipProtocol(input.getIpProtocol() != null ? firewallIpProtocolToIpProtocol.get(input
> +            .getIpProtocol()) : IpProtocol.UNRECOGNIZED);
> +      if (input.getSourceIp() != null) {
> +         permissionBuilder.cidrBlock(input.getSourceIp().contains("!") ? "0.0.0.0/0"
: input.getSourceIp());

@nacx Yeah, we're aware of this issue. Maybe there is a library or internal API that would
simplify transferring cloudsigma rules like "!192.168.1.16" into list of cidr that jclouds
expects?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/70/files#r18436103
Mime
View raw message