Merge "Drop RpcProxy usage from cisco apic ml2 plugin"
This commit is contained in:
commit
f9ba54905f
@ -21,6 +21,7 @@ import eventlet
|
|||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
from oslo import messaging
|
||||||
|
|
||||||
from neutron.agent.common import config
|
from neutron.agent.common import config
|
||||||
from neutron.agent.linux import ip_lib
|
from neutron.agent.linux import ip_lib
|
||||||
@ -138,30 +139,21 @@ class ApicTopologyService(manager.Manager):
|
|||||||
self.peers[(host, interface)] = nlink
|
self.peers[(host, interface)] = nlink
|
||||||
|
|
||||||
|
|
||||||
class ApicTopologyServiceNotifierApi(rpc.RpcProxy):
|
class ApicTopologyServiceNotifierApi(object):
|
||||||
|
|
||||||
RPC_API_VERSION = '1.1'
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(ApicTopologyServiceNotifierApi, self).__init__(
|
target = messaging.Target(topic=TOPIC_APIC_SERVICE, version='1.0')
|
||||||
topic=TOPIC_APIC_SERVICE,
|
self.client = rpc.get_client(target)
|
||||||
default_version=self.RPC_API_VERSION)
|
|
||||||
|
|
||||||
def update_link(self, context, host, interface, mac, switch, module, port):
|
def update_link(self, context, host, interface, mac, switch, module, port):
|
||||||
self.fanout_cast(
|
cctxt = self.client.prepare(version='1.1', fanout=True)
|
||||||
context, self.make_msg(
|
cctxt.cast(context, 'update_link', host=host, interface=interface,
|
||||||
'update_link',
|
mac=mac, switch=switch, module=module, port=port)
|
||||||
host=host, interface=interface, mac=mac,
|
|
||||||
switch=switch, module=module, port=port),
|
|
||||||
topic=TOPIC_APIC_SERVICE)
|
|
||||||
|
|
||||||
def delete_link(self, context, host, interface):
|
def delete_link(self, context, host, interface):
|
||||||
self.fanout_cast(
|
cctxt = self.client.prepare(version='1.1', fanout=True)
|
||||||
context, self.make_msg(
|
cctxt.cast(context, 'delete_link', host=host, interface=interface,
|
||||||
'delete_link',
|
mac=None, switch=0, module=0, port=0)
|
||||||
host=host, interface=interface, mac=None,
|
|
||||||
switch=0, module=0, port=0),
|
|
||||||
topic=TOPIC_APIC_SERVICE)
|
|
||||||
|
|
||||||
|
|
||||||
class ApicTopologyAgent(manager.Manager):
|
class ApicTopologyAgent(manager.Manager):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user