|
|
|
@ -31,6 +31,7 @@ from sqlalchemy.orm import exc
|
|
|
|
|
|
|
|
|
|
from neutron.api.rpc.handlers import dvr_rpc
|
|
|
|
|
from neutron.api.rpc.handlers import securitygroups_rpc as sg_rpc
|
|
|
|
|
from neutron.common import utils
|
|
|
|
|
from neutron.db import l3_hamode_db
|
|
|
|
|
from neutron.db import provisioning_blocks
|
|
|
|
|
from neutron.plugins.ml2 import db as ml2_db
|
|
|
|
@ -475,11 +476,13 @@ class AgentNotifierApi(dvr_rpc.DVRAgentRpcApiMixin,
|
|
|
|
|
target = oslo_messaging.Target(topic=topic, version='1.0')
|
|
|
|
|
self.client = n_rpc.get_client(target)
|
|
|
|
|
|
|
|
|
|
@utils.disable_notifications
|
|
|
|
|
def network_delete(self, context, network_id):
|
|
|
|
|
cctxt = self.client.prepare(topic=self.topic_network_delete,
|
|
|
|
|
fanout=True)
|
|
|
|
|
cctxt.cast(context, 'network_delete', network_id=network_id)
|
|
|
|
|
|
|
|
|
|
@utils.disable_notifications
|
|
|
|
|
def port_update(self, context, port, network_type, segmentation_id,
|
|
|
|
|
physical_network):
|
|
|
|
|
cctxt = self.client.prepare(topic=self.topic_port_update,
|
|
|
|
@ -488,22 +491,26 @@ class AgentNotifierApi(dvr_rpc.DVRAgentRpcApiMixin,
|
|
|
|
|
network_type=network_type, segmentation_id=segmentation_id,
|
|
|
|
|
physical_network=physical_network)
|
|
|
|
|
|
|
|
|
|
@utils.disable_notifications
|
|
|
|
|
def port_delete(self, context, port_id):
|
|
|
|
|
cctxt = self.client.prepare(topic=self.topic_port_delete,
|
|
|
|
|
fanout=True)
|
|
|
|
|
cctxt.cast(context, 'port_delete', port_id=port_id)
|
|
|
|
|
|
|
|
|
|
@utils.disable_notifications
|
|
|
|
|
def network_update(self, context, network):
|
|
|
|
|
cctxt = self.client.prepare(topic=self.topic_network_update,
|
|
|
|
|
fanout=True, version='1.4')
|
|
|
|
|
cctxt.cast(context, 'network_update', network=network)
|
|
|
|
|
|
|
|
|
|
@utils.disable_notifications
|
|
|
|
|
def binding_deactivate(self, context, port_id, host, network_id):
|
|
|
|
|
cctxt = self.client.prepare(topic=self.topic_port_binding_deactivate,
|
|
|
|
|
fanout=True, version='1.5')
|
|
|
|
|
cctxt.cast(context, 'binding_deactivate', port_id=port_id, host=host,
|
|
|
|
|
network_id=network_id)
|
|
|
|
|
|
|
|
|
|
@utils.disable_notifications
|
|
|
|
|
def binding_activate(self, context, port_id, host):
|
|
|
|
|
cctxt = self.client.prepare(topic=self.topic_port_binding_activate,
|
|
|
|
|
fanout=True, version='1.5')
|
|
|
|
|