[jamespage] Switch to using common vhost for all openstack services
This commit is contained in:
commit
dff540929c
@ -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)
|
||||
|
2
revision
2
revision
@ -1 +1 @@
|
||||
306
|
||||
307
|
||||
|
Loading…
x
Reference in New Issue
Block a user