Merge remote-tracking branch 'starlingx/master' into HEAD
Change-Id: Ic02a5e187c082fe87b3627daa10b57c17b8a051f Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
commit
7c79c5fec3
@ -3449,7 +3449,7 @@ class NFVIComputeAPI(nfvi.api.v1.NFVIComputeAPI):
|
|||||||
return rpc_listener.test_connection(
|
return rpc_listener.test_connection(
|
||||||
config.CONF['amqp']['host'], config.CONF['amqp']['port'],
|
config.CONF['amqp']['host'], config.CONF['amqp']['port'],
|
||||||
config.CONF['amqp']['user_id'], config.CONF['amqp']['password'],
|
config.CONF['amqp']['user_id'], config.CONF['amqp']['password'],
|
||||||
config.CONF['amqp']['virt_host'], "nova")
|
config.CONF['amqp']['virt_host'], "nova", "notifications.info")
|
||||||
|
|
||||||
def initialize(self, config_file):
|
def initialize(self, config_file):
|
||||||
"""
|
"""
|
||||||
|
@ -149,7 +149,8 @@ class RPCListener(threading.Thread):
|
|||||||
self._exit.set()
|
self._exit.set()
|
||||||
|
|
||||||
|
|
||||||
def test_connection(host, port, user_id, password, virt_host, exchange_name):
|
def test_connection(host, port, user_id, password, virt_host, exchange_name,
|
||||||
|
queue_name):
|
||||||
"""
|
"""
|
||||||
Test a connection to an exchange on a virtual host
|
Test a connection to an exchange on a virtual host
|
||||||
"""
|
"""
|
||||||
@ -167,6 +168,15 @@ def test_connection(host, port, user_id, password, virt_host, exchange_name):
|
|||||||
exchange = Exchange(exchange_name, channel=connection,
|
exchange = Exchange(exchange_name, channel=connection,
|
||||||
type='topic', durable=False, passive=True)
|
type='topic', durable=False, passive=True)
|
||||||
exchange.declare()
|
exchange.declare()
|
||||||
|
|
||||||
|
# Check whether the queue exists - will raise exception if it
|
||||||
|
# fails.
|
||||||
|
rpc_receive_queue = Queue(queue_name,
|
||||||
|
durable=True,
|
||||||
|
exchange=exchange,
|
||||||
|
channel=connection)
|
||||||
|
rpc_receive_queue.queue_declare(passive=True)
|
||||||
|
|
||||||
success = True
|
success = True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
DLOG.info("Unable to connect to virt_host %s, exchange %s, error: %s" %
|
DLOG.info("Unable to connect to virt_host %s, exchange %s, error: %s" %
|
||||||
|
Loading…
Reference in New Issue
Block a user