Skip to content
Permalink
Browse files
Neutron port ranges only compared when present.
  • Loading branch information
zack-shoylev committed Apr 2, 2015
1 parent 294ab6d commit 148079685402d61efaf0ba66d03fdc1f7d460b79
Showing 1 changed file with 4 additions and 2 deletions.
@@ -367,8 +367,10 @@ private CreateRule(Rule 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.");
}

0 comments on commit 1480796

Please sign in to comment.