Skip to content

Commit

Permalink
Raise BadRequest when remote_ip_prefix and remote_group_id are set
Browse files Browse the repository at this point in the history
Change-Id: I826d68ef6463f19937ce1f254568da445d3d2959
Closes-Bug: #1485500
  • Loading branch information
eonpatapon committed Aug 17, 2015
1 parent 5075f83 commit b365bbe
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ def _security_group_rule_neutron_to_vnc(self, sgr_q):
if sgr_q['port_range_max'] is not None:
port_max = sgr_q['port_range_max']

if sgr_q['remote_ip_prefix'] and sgr_q['remote_group_id']:
self._raise_contrail_exception("BadRequest",
msg="Can't set remote_ip_prefix with remote_group_id",
resource="security_group_rule")

endpt = [vnc_api.AddressType(security_group='any')]
if sgr_q['remote_ip_prefix']:
cidr = sgr_q['remote_ip_prefix'].split('/')
Expand Down

0 comments on commit b365bbe

Please sign in to comment.