> @@ -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();
> }
Since these are utility methods, move them to the end of the class?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/33/files#r7512891