Fixes bug
1099072
The security groups would return an exception for invalid port ownership.
Change-Id: I8c48adce30b160bd776b5e68bc321e3a2e8cbce2
if not attr.is_attr_set(p.get(ext_sg.SECURITYGROUPS)):
return
if p.get('device_owner') and p['device_owner'].startswith('network:'):
- raise ext_sg.SecurityGroupInvalidDeviceOwner()
+ return
valid_groups = self.get_security_groups(context, fields={'id': None})
valid_groups_set = set([x['id'] for x in valid_groups])
message = _("Invalid value for port %(port)s")
-class SecurityGroupInvalidDeviceOwner(qexception.InvalidInput):
- message = _("Security Group can't be applied to network ports.")
-
-
class SecurityGroupInUse(qexception.InUse):
message = _("Security Group %(id)s in use.")