Updates, checkin link.s
This commit is contained in:
parent
0b661186b0
commit
ed71ab066c
@ -490,13 +490,15 @@ class SubordinateConfigContext(OSContextGenerator):
|
||||
def __call__(self):
|
||||
ctxt = {}
|
||||
for rid in relation_ids(self.interface):
|
||||
sub_config = relation_get('subordinate_config', relaton_id=rid)
|
||||
for unit in related_units(rid):
|
||||
sub_config = relation_get('subordinate_config',
|
||||
relaton_id=rid, unit=unit)
|
||||
if sub_config and sub_config != '':
|
||||
try:
|
||||
sub_config = json.loads(sub_config)
|
||||
except:
|
||||
log('Could not parse JSON from subordinate_config setting '
|
||||
'from %s' % rid, level=ERROR)
|
||||
log('Could not parse JSON from subordinate_config '
|
||||
'setting from %s' % rid, level=ERROR)
|
||||
|
||||
if self.service not in sub_config:
|
||||
log('Found subordinate_config on %s but it contained'
|
||||
@ -513,4 +515,7 @@ class SubordinateConfigContext(OSContextGenerator):
|
||||
for k, v in sub_config.iteritems():
|
||||
ctxt[k] = v
|
||||
|
||||
if not ctxt:
|
||||
ctxt['sections'] = {}
|
||||
|
||||
return ctxt
|
||||
|
1
hooks/nova-vmware-relation-changed
Symbolic link
1
hooks/nova-vmware-relation-changed
Symbolic link
@ -0,0 +1 @@
|
||||
nova_cc_hooks.py
|
1
hooks/nova-vmware-relation-joined
Symbolic link
1
hooks/nova-vmware-relation-joined
Symbolic link
@ -0,0 +1 @@
|
||||
nova_cc_hooks.py
|
@ -401,6 +401,12 @@ def nova_vmware_relation_joined():
|
||||
relation_set(network_manager=network_manager())
|
||||
|
||||
|
||||
@hooks.hook()
|
||||
@restart_on_change(restart_map())
|
||||
def nova_vmware_relation_changed():
|
||||
CONFIGS.write('/etc/nova/nova.conf')
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
hooks.execute(sys.argv)
|
||||
|
Loading…
Reference in New Issue
Block a user