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:
parent
71a49735b0
commit
269c7fb6f9
@ -47,4 +47,5 @@ six>=1.11.0 # MIT
|
|||||||
debtcollector>=1.19.0 # Apache-2.0
|
debtcollector>=1.19.0 # Apache-2.0
|
||||||
cotyledon>=1.6.8 # Apache-2.0
|
cotyledon>=1.6.8 # Apache-2.0
|
||||||
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
|
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
|
||||||
pytz>=2013.6 # MIT
|
pytz>=2013.6 # MIT
|
||||||
|
tenacity>=4.9.0
|
@ -19,6 +19,7 @@ from six.moves import _thread
|
|||||||
from oslo_concurrency import processutils as ps
|
from oslo_concurrency import processutils as ps
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
from vitrage.api_handler.apis.alarm import AlarmApis
|
from vitrage.api_handler.apis.alarm import AlarmApis
|
||||||
from vitrage.api_handler.apis.event import EventApis
|
from vitrage.api_handler.apis.event import EventApis
|
||||||
@ -377,9 +378,8 @@ class ApiWorker(GraphCloneWorkerBase):
|
|||||||
[EVALUATOR_TOPIC])
|
[EVALUATOR_TOPIC])
|
||||||
db = storage.get_connection_from_config(conf)
|
db = storage.get_connection_from_config(conf)
|
||||||
transport = messaging.get_rpc_transport(conf)
|
transport = messaging.get_rpc_transport(conf)
|
||||||
rabbit_hosts = conf.oslo_messaging_rabbit.rabbit_hosts
|
|
||||||
target = oslo_messaging.Target(topic=conf.rpc_topic,
|
target = oslo_messaging.Target(topic=conf.rpc_topic,
|
||||||
server=rabbit_hosts)
|
server=uuidutils.generate_uuid())
|
||||||
|
|
||||||
endpoints = [TopologyApis(self._entity_graph, conf),
|
endpoints = [TopologyApis(self._entity_graph, conf),
|
||||||
AlarmApis(self._entity_graph, conf, db),
|
AlarmApis(self._entity_graph, conf, db),
|
||||||
|
@ -18,8 +18,10 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
from oslo_messaging.rpc import dispatcher
|
from oslo_messaging.rpc import dispatcher
|
||||||
|
from oslo_utils import uuidutils
|
||||||
from osprofiler import profiler
|
from osprofiler import profiler
|
||||||
|
|
||||||
|
|
||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.StrOpt('rpc_topic',
|
cfg.StrOpt('rpc_topic',
|
||||||
default='rpcapiv1',
|
default='rpcapiv1',
|
||||||
@ -92,7 +94,7 @@ def get_default_server(conf, topic, endpoints):
|
|||||||
transport = messaging.get_rpc_transport(conf)
|
transport = messaging.get_rpc_transport(conf)
|
||||||
target = messaging.Target(
|
target = messaging.Target(
|
||||||
topic=topic,
|
topic=topic,
|
||||||
server=conf.oslo_messaging_rabbit.rabbit_hosts)
|
server=uuidutils.generate_uuid())
|
||||||
return get_server(target, endpoints, transport)
|
return get_server(target, endpoints, transport)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user