fix connection URL to RabbitMQ

The transport URL was missing a / in the URL, thus the connection
to RabbitMQ would fail since the requested virtual_host was
"virtual_host" instead of "/virtual_host".

Change-Id: Ic99765071ed51226a650c555e7881308536ad1cf
This commit is contained in:
Vincent Llorens 2016-10-04 17:17:49 +02:00
parent 17a9c2bd03
commit 492c5fad63
1 changed files with 8 additions and 6 deletions

View File

@ -548,12 +548,14 @@ class NovaManager(Manager):
self.db_engine = create_engine(db_connection)
transport_url = "%s://%s:%s@%s:%s%s" % (amqp_backend,
amqp_user,
amqp_password,
amqp_host,
amqp_port,
amqp_virt_host)
transport_url = "{b}://{user}:{password}@{host}:{port}/{virt_host}"
transport_url = transport_url.format(
b=amqp_backend,
user=amqp_user,
password=amqp_password,
host=amqp_host,
port=amqp_port,
virt_host=amqp_virt_host)
self.messagingAPI = MessagingAPI(transport_url)