director provides a new relations for pg-vip etc
This commit is contained in:
parent
1af750f3af
commit
bd16adb21c
@ -3,6 +3,14 @@ options:
|
|||||||
default: 192.168.100.250
|
default: 192.168.100.250
|
||||||
type: string
|
type: string
|
||||||
description: IP address of the Director's Management interface. Same IP can be used to access PG Console.
|
description: IP address of the Director's Management interface. Same IP can be used to access PG Console.
|
||||||
|
plumgrid-username:
|
||||||
|
default: plumgrid
|
||||||
|
type: string
|
||||||
|
description: Username to access PLUMgrid Director
|
||||||
|
plumgrid-password:
|
||||||
|
default: plumgrid
|
||||||
|
type: string
|
||||||
|
description: Password to access PLUMgrid Director
|
||||||
lcm-ssh-key:
|
lcm-ssh-key:
|
||||||
default: 'null'
|
default: 'null'
|
||||||
type: string
|
type: string
|
||||||
|
@ -87,6 +87,19 @@ def plumgrid_joined(relation_id=None):
|
|||||||
relation_set(relation_id=relation_id, opsvm_ip=opsvm_ip)
|
relation_set(relation_id=relation_id, opsvm_ip=opsvm_ip)
|
||||||
|
|
||||||
|
|
||||||
|
@hooks.hook('plumgrid-configs-relation-joined')
|
||||||
|
def plumgrid_configs_joined(relation_id=None):
|
||||||
|
'''
|
||||||
|
This hook is run when relation with neutron-api-plumgrid is created.
|
||||||
|
'''
|
||||||
|
relation_settings = {
|
||||||
|
'plumgrid_virtual_ip': config('plumgrid-virtual-ip'),
|
||||||
|
'plumgrid_username': config('plumgrid-username'),
|
||||||
|
'plumgrid_password': config('plumgrid-password'),
|
||||||
|
}
|
||||||
|
relation_set(relation_id=relation_id, relation_settings=relation_settings)
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('config-changed')
|
@hooks.hook('config-changed')
|
||||||
def config_changed():
|
def config_changed():
|
||||||
'''
|
'''
|
||||||
@ -108,6 +121,12 @@ def config_changed():
|
|||||||
if charm_config.changed('plumgrid-virtual-ip'):
|
if charm_config.changed('plumgrid-virtual-ip'):
|
||||||
CONFIGS.write_all()
|
CONFIGS.write_all()
|
||||||
stop_pg()
|
stop_pg()
|
||||||
|
for rid in relation_ids('plumgrid-configs'):
|
||||||
|
plumgrid_configs_joined(rid)
|
||||||
|
if (charm_config.changed('plumgrid-username') or
|
||||||
|
charm_config.changed('plumgrid-password')):
|
||||||
|
for rid in relation_ids('plumgrid-configs'):
|
||||||
|
plumgrid_configs_joined(rid)
|
||||||
if (charm_config.changed('install_sources') or
|
if (charm_config.changed('install_sources') or
|
||||||
charm_config.changed('plumgrid-build') or
|
charm_config.changed('plumgrid-build') or
|
||||||
charm_config.changed('install_keys') or
|
charm_config.changed('install_keys') or
|
||||||
|
@ -15,6 +15,8 @@ requires:
|
|||||||
provides:
|
provides:
|
||||||
plumgrid:
|
plumgrid:
|
||||||
interface: plumgrid
|
interface: plumgrid
|
||||||
|
plumgrid-configs:
|
||||||
|
interface: plumgrid-configs
|
||||||
peers:
|
peers:
|
||||||
director:
|
director:
|
||||||
interface: director
|
interface: director
|
||||||
|
Loading…
Reference in New Issue
Block a user