dont use rabbit_hosts on conf

it was removed from oslo messaging in the last version
use some uuid we dont use it

Change-Id: If14e94b39996cfaac040a7a765dd797e8b2f5f61
This commit is contained in:
Eyal 2018-10-11 12:12:54 +03:00
parent 71a49735b0
commit 269c7fb6f9
3 changed files with 7 additions and 4 deletions

View File

@ -48,3 +48,4 @@ debtcollector>=1.19.0 # Apache-2.0
cotyledon>=1.6.8 # Apache-2.0
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
pytz>=2013.6 # MIT
tenacity>=4.9.0

View File

@ -19,6 +19,7 @@ from six.moves import _thread
from oslo_concurrency import processutils as ps
from oslo_log import log
import oslo_messaging
from oslo_utils import uuidutils
from vitrage.api_handler.apis.alarm import AlarmApis
from vitrage.api_handler.apis.event import EventApis
@ -377,9 +378,8 @@ class ApiWorker(GraphCloneWorkerBase):
[EVALUATOR_TOPIC])
db = storage.get_connection_from_config(conf)
transport = messaging.get_rpc_transport(conf)
rabbit_hosts = conf.oslo_messaging_rabbit.rabbit_hosts
target = oslo_messaging.Target(topic=conf.rpc_topic,
server=rabbit_hosts)
server=uuidutils.generate_uuid())
endpoints = [TopologyApis(self._entity_graph, conf),
AlarmApis(self._entity_graph, conf, db),

View File

@ -18,8 +18,10 @@ from oslo_config import cfg
from oslo_log import log
import oslo_messaging as messaging
from oslo_messaging.rpc import dispatcher
from oslo_utils import uuidutils
from osprofiler import profiler
OPTS = [
cfg.StrOpt('rpc_topic',
default='rpcapiv1',
@ -92,7 +94,7 @@ def get_default_server(conf, topic, endpoints):
transport = messaging.get_rpc_transport(conf)
target = messaging.Target(
topic=topic,
server=conf.oslo_messaging_rabbit.rabbit_hosts)
server=uuidutils.generate_uuid())
return get_server(target, endpoints, transport)