DHCP agent unable to access port when restarting
Fixes bug 1099072 The security groups would return an exception for invalid port ownership. Change-Id: I8c48adce30b160bd776b5e68bc321e3a2e8cbce2
This commit is contained in:
parent
5fd16af688
commit
b44314fded
@ -450,7 +450,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
|
|||||||
if not attr.is_attr_set(p.get(ext_sg.SECURITYGROUPS)):
|
if not attr.is_attr_set(p.get(ext_sg.SECURITYGROUPS)):
|
||||||
return
|
return
|
||||||
if p.get('device_owner') and p['device_owner'].startswith('network:'):
|
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 = self.get_security_groups(context, fields={'id': None})
|
||||||
valid_groups_set = set([x['id'] for x in valid_groups])
|
valid_groups_set = set([x['id'] for x in valid_groups])
|
||||||
|
@ -40,10 +40,6 @@ class SecurityGroupInvalidPortValue(qexception.InvalidInput):
|
|||||||
message = _("Invalid value for port %(port)s")
|
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):
|
class SecurityGroupInUse(qexception.InUse):
|
||||||
message = _("Security Group %(id)s in use.")
|
message = _("Security Group %(id)s in use.")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user