Notify creation or deletion of dhcp port for security group
fixes bug 1103840 Change-Id: I8031bc607a874871a8081575bce1526b3453aff6
This commit is contained in:
@@ -383,14 +383,7 @@ class NECPluginV2(nec_plugin_base.NECPluginV2Base,
|
||||
self._process_port_create_security_group(
|
||||
context, port['id'], sgids)
|
||||
self._extend_port_dict_security_group(context, port)
|
||||
# Note: In order to allow dhcp packets,
|
||||
# changes for dhcp ip should be notifified
|
||||
if port['device_owner'] == q_const.DEVICE_OWNER_DHCP:
|
||||
self.notifier.security_groups_provider_updated(context)
|
||||
else:
|
||||
self.notifier.security_groups_member_updated(
|
||||
context, port.get(ext_sg.SECURITYGROUPS))
|
||||
|
||||
self.notify_security_groups_member_updated(context, port)
|
||||
self._update_resource_status(context, "port", port['id'],
|
||||
OperationalStatus.BUILD)
|
||||
self.activate_port_if_ready(context, port)
|
||||
@@ -455,8 +448,7 @@ class NECPluginV2(nec_plugin_base.NECPluginV2Base,
|
||||
self.disassociate_floatingips(context, id)
|
||||
self._delete_port_security_group_bindings(context, id)
|
||||
super(NECPluginV2, self).delete_port(context, id)
|
||||
self.notifier.security_groups_member_updated(
|
||||
context, port.get(ext_sg.SECURITYGROUPS))
|
||||
self.notify_security_groups_member_updated(context, port)
|
||||
|
||||
def get_port(self, context, id, fields=None):
|
||||
with context.session.begin(subtransactions=True):
|
||||
|
||||
Reference in New Issue
Block a user