Updates, checkin link.s
This commit is contained in:
parent
0b661186b0
commit
ed71ab066c
@ -490,13 +490,15 @@ class SubordinateConfigContext(OSContextGenerator):
|
|||||||
def __call__(self):
|
def __call__(self):
|
||||||
ctxt = {}
|
ctxt = {}
|
||||||
for rid in relation_ids(self.interface):
|
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 != '':
|
if sub_config and sub_config != '':
|
||||||
try:
|
try:
|
||||||
sub_config = json.loads(sub_config)
|
sub_config = json.loads(sub_config)
|
||||||
except:
|
except:
|
||||||
log('Could not parse JSON from subordinate_config setting '
|
log('Could not parse JSON from subordinate_config '
|
||||||
'from %s' % rid, level=ERROR)
|
'setting from %s' % rid, level=ERROR)
|
||||||
|
|
||||||
if self.service not in sub_config:
|
if self.service not in sub_config:
|
||||||
log('Found subordinate_config on %s but it contained'
|
log('Found subordinate_config on %s but it contained'
|
||||||
@ -513,4 +515,7 @@ class SubordinateConfigContext(OSContextGenerator):
|
|||||||
for k, v in sub_config.iteritems():
|
for k, v in sub_config.iteritems():
|
||||||
ctxt[k] = v
|
ctxt[k] = v
|
||||||
|
|
||||||
|
if not ctxt:
|
||||||
|
ctxt['sections'] = {}
|
||||||
|
|
||||||
return ctxt
|
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())
|
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():
|
def main():
|
||||||
try:
|
try:
|
||||||
hooks.execute(sys.argv)
|
hooks.execute(sys.argv)
|
||||||
|
Loading…
Reference in New Issue
Block a user