summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuby Loo <rloo@yahoo-inc.com>2014-01-14 02:18:03 +0000
committerRuby Loo <rloo@yahoo-inc.com>2014-01-14 02:18:03 +0000
commit5c2b09fbeeada60747c69bc97118b9d7cf31f7b8 (patch)
tree528d9cc31cffc98d91ead0c11434622bfae79620
parent0fc3ad85e90a05322e20f4c2c0fce299d1c352f1 (diff)
downloadironic-5c2b09fbeeada60747c69bc97118b9d7cf31f7b8.tar.gz
Use same MANAGER_TOPIC variable
In ironic/conductor, manager.py and rpcapi.py both specify the variable MANAGER_TOPIC = 'ironic.conductor_manager'. They have to have the same value because this is the rabbit topic that they communicate over. It would be less error-prone (and more obvious that they should be the same), if it was only specified in one place. Since cmd/conductor.py uses MANAGER_TOPIC from manager.py, rpcapi.py was modified to do the same. Change-Id: I5875ffb7548c1b5079ac4221ce1000ae620509d8 Closes-Bug: #1268810
-rw-r--r--ironic/conductor/rpcapi.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ironic/conductor/rpcapi.py b/ironic/conductor/rpcapi.py
index efb6a3122..cfc30c1d2 100644
--- a/ironic/conductor/rpcapi.py
+++ b/ironic/conductor/rpcapi.py
@@ -22,6 +22,7 @@ Client side of the conductor RPC API.
from oslo.config import cfg
from ironic.common import hash_ring as hash
+from ironic.conductor import manager
from ironic.db import api as dbapi
from ironic.objects import base as objects_base
import ironic.openstack.common.rpc.proxy
@@ -36,8 +37,6 @@ cfg.CONF.set_default('allowed_rpc_exception_modules',
['ironic.common.exception',
'exceptions', ])
-MANAGER_TOPIC = 'ironic.conductor_manager'
-
class ConductorAPI(ironic.openstack.common.rpc.proxy.RpcProxy):
"""Client side of the conductor RPC API.
@@ -61,7 +60,7 @@ class ConductorAPI(ironic.openstack.common.rpc.proxy.RpcProxy):
def __init__(self, topic=None):
if topic is None:
- topic = MANAGER_TOPIC
+ topic = manager.MANAGER_TOPIC
# Initialize consistent hash ring
self.hash_rings = {}