Fix neutron-powervc starting failure issue

Previous neutron.openstack.common.rpc is removed in Juno. Replace it
   with neutron.common.rpc
Closes-bug: 1336131
Change-Id: Ibb7f7b5109476237df783e4cdd62ba9f5e264640
This commit is contained in:
leileiz 2014-07-07 07:08:48 +02:00
parent 0fa9fcf321
commit c66b71adb2
2 changed files with 5 additions and 9 deletions

View File

@ -18,7 +18,7 @@ import os
import time
from exceptions import KeyboardInterrupt
from neutron.openstack.common import rpc
from neutron.common import rpc
from neutron.openstack.common import log as logging
from oslo.config import cfg
@ -788,12 +788,12 @@ class PowerVCNeutronAgent(object):
"""
set up RPC support
"""
rpc.init(CONF)
self.topic = PVC_TOPIC
self.conn = rpc.create_connection(new=True)
self.callbacks = powervc_rpc.PVCRpcCallbacks(self)
self.dispatcher = self.callbacks.create_rpc_dispatcher()
self.conn.create_consumer(self.topic, self.dispatcher, fanout=False)
self.conn.consume_in_thread()
self.endpoints = [powervc_rpc.PVCRpcCallbacks(self)]
self.conn.create_consumer(self.topic, self.endpoints, fanout=False)
self.conn.consume_in_threads()
LOG.info(_("RPC listener created"))
#==============================================================================

View File

@ -1,7 +1,6 @@
# Copyright 2013 IBM Corp.
from neutron.openstack.common import log as logging
from neutron.openstack.common.rpc import dispatcher
from powervc.common.constants import LOCAL_OS
from powervc.common.constants import POWERVC_OS
@ -31,9 +30,6 @@ class PVCRpcCallbacks(object):
self.agent = neutron_agent
self.db = powervc_db_v2.PowerVCAgentDB()
def create_rpc_dispatcher(self):
return dispatcher.RpcDispatcher([self])
def get_local_network_uuid(self, context, network_id):
LOG.info(_("Neutron Agent RPC: get_local_network_uuid:"))
LOG.info(_("- pvc_net_id: %s"), network_id)