[jamespage] Switch to using common vhost for all openstack services

This commit is contained in:
Adam Gandelman 2013-11-05 20:34:51 -08:00
commit dff540929c
3 changed files with 11 additions and 4 deletions

@ -19,7 +19,7 @@ options:
type: string
description: Username used to access rabbitmq queue
rabbit-vhost:
default: nova
default: openstack
type: string
decsription: Rabbitmq vhost
database-user:

@ -103,8 +103,9 @@ def config_changed():
@hooks.hook('amqp-relation-joined')
def amqp_joined():
relation_set(username=config('rabbit-user'), vhost=config('rabbit-vhost'))
def amqp_joined(relation_id=None):
relation_set(relation_id=relation_id,
username=config('rabbit-user'), vhost=config('rabbit-vhost'))
@hooks.hook('amqp-relation-changed')
@ -396,6 +397,12 @@ def configure_https():
identity_joined(rid=rid)
@hooks.hook('upgrade-charm')
def upgrade_charm():
for r_id in relation_ids('amqp'):
amqp_joined(relation_id=r_id)
def main():
try:
hooks.execute(sys.argv)

@ -1 +1 @@
306
307