> @@ -266,6 +266,12 @@ public static IPProtocol fromValue(String protocol) { > private final IPProtocol ipProtocol; > private final RangeSet<Integer> ports; > > + /* Some handy shortcuts */ > + public static Rule permitTcpRule(Integer start, Integer end) { return > Rule.builder().IPProtocol(Firewall.Rule.IPProtocol.TCP).addPortRange(start, > end).build(); } > + public static Rule permitTcpRule(Integer port) { return > Rule.builder().IPProtocol(Firewall.Rule.IPProtocol.TCP).addPort(port).build(); > } > + public static Rule permitUdpRule(Integer start, Integer end) { return > Rule.builder().IPProtocol(Firewall.Rule.IPProtocol.UDP).addPortRange(start, > end).build(); } > + public static Rule permitUdpRule(Integer port) { return > Rule.builder().IPProtocol(Firewall.Rule.IPProtocol.UDP).addPort(port).build(); > }
> Any strong feelings about this either way? Not really - I normally don't put methods between fields and the constructor, but I'm OK to keep as-is. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/33/files#r7534701