You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by za...@apache.org on 2015/04/03 00:36:48 UTC
jclouds-labs-openstack git commit: Neutron port ranges only compared
when present.
Repository: jclouds-labs-openstack
Updated Branches:
refs/heads/master 294ab6d5a -> 148079685
Neutron port ranges only compared when present.
Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/commit/14807968
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/tree/14807968
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/diff/14807968
Branch: refs/heads/master
Commit: 148079685402d61efaf0ba66d03fdc1f7d460b79
Parents: 294ab6d
Author: Zack Shoylev <za...@rackspace.com>
Authored: Fri Mar 27 07:04:20 2015 -0500
Committer: Zack Shoylev <za...@rackspace.com>
Committed: Thu Apr 2 17:33:56 2015 -0500
----------------------------------------------------------------------
.../java/org/jclouds/openstack/neutron/v2/domain/Rule.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/blob/14807968/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/domain/Rule.java
----------------------------------------------------------------------
diff --git a/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/domain/Rule.java b/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/domain/Rule.java
index 89e9d19..e72a3e9 100644
--- a/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/domain/Rule.java
+++ b/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/domain/Rule.java
@@ -367,8 +367,10 @@ public class Rule {
super(rule);
checkNotNull(this.getDirection(), "direction should not be null");
checkNotNull(this.getSecurityGroupId(), "security group id should not be null");
- checkArgument(this.getPortRangeMax() >= this.getPortRangeMin(),
- "port range max should be greater than or equal to port range min");
+ if (this.getPortRangeMax() != null && this.getPortRangeMin() != null) {
+ checkArgument(this.getPortRangeMax() >= this.getPortRangeMin(),
+ "port range max should be greater than or equal to port range min");
+ }
checkArgument(this.getRemoteGroupId() == null || this.getRemoteIpPrefix() == null,
"You can specify either remote_group_id or remote_ip_prefix in the request body.");
}