Rename cell relation to avoid amulet breakage
This commit is contained in:
parent
b98824a8a3
commit
f9b9270419
@ -28,12 +28,12 @@ class ApacheSSLContext(context.ApacheSSLContext):
|
||||
|
||||
|
||||
class NovaCellContext(context.OSContextGenerator):
|
||||
interfaces = ['nova-cell']
|
||||
interfaces = ['cell']
|
||||
|
||||
def __call__(self):
|
||||
log('Generating template context for cell')
|
||||
ctxt = {}
|
||||
for rid in relation_ids('nova-cell'):
|
||||
for rid in relation_ids('cell'):
|
||||
for unit in related_units(rid):
|
||||
rdata = relation_get(rid=rid, unit=unit)
|
||||
ctxt = {
|
||||
|
@ -126,7 +126,7 @@ def amqp_changed():
|
||||
if network_manager() == 'neutron':
|
||||
CONFIGS.write(NEUTRON_CONF)
|
||||
[nova_cell_relation_joined(rid=rid)
|
||||
for rid in relation_ids('nova-cell')]
|
||||
for rid in relation_ids('cell')]
|
||||
|
||||
|
||||
@hooks.hook('shared-db-relation-joined')
|
||||
@ -188,7 +188,7 @@ def db_changed():
|
||||
for rid in relation_ids('cloud-compute')]
|
||||
log('Triggering remote cell restarts.')
|
||||
[nova_cell_relation_joined(rid=rid, remote_restart=True)
|
||||
for rid in relation_ids('nova-cell')]
|
||||
for rid in relation_ids('cell')]
|
||||
|
||||
|
||||
@hooks.hook('pgsql-nova-db-relation-changed')
|
||||
@ -456,7 +456,7 @@ def ha_changed():
|
||||
def relation_broken():
|
||||
CONFIGS.write_all()
|
||||
[nova_cell_relation_joined(rid=rid)
|
||||
for rid in relation_ids('nova-cell')]
|
||||
for rid in relation_ids('cell')]
|
||||
|
||||
|
||||
def configure_https():
|
||||
@ -508,7 +508,7 @@ def upgrade_charm():
|
||||
identity_joined(rid=r_id)
|
||||
|
||||
|
||||
@hooks.hook('nova-cell-relation-joined')
|
||||
@hooks.hook('cell-relation-joined')
|
||||
def nova_cell_relation_joined(rid=None, remote_restart=False):
|
||||
if remote_restart:
|
||||
relation_set(relation_id=rid, restart_trigger = str(uuid.uuid4()))
|
||||
@ -526,7 +526,7 @@ def nova_cell_relation_joined(rid=None, remote_restart=False):
|
||||
relation_set(relation_id=rid, password='')
|
||||
|
||||
|
||||
@hooks.hook('nova-cell-relation-changed')
|
||||
@hooks.hook('cell-relation-changed')
|
||||
def nova_cell_relation_changed():
|
||||
CONFIGS.complete_contexts()
|
||||
# XXX Can we trust this ? Does the presence of a password always imply db is setup? (probably not)
|
||||
|
@ -105,7 +105,7 @@ BASE_RESOURCE_MAP = OrderedDict([
|
||||
config_file=NOVA_CONF,
|
||||
),
|
||||
context.SubordinateConfigContext(
|
||||
interface='nova-cell',
|
||||
interface='cell',
|
||||
service='nova',
|
||||
config_file=NOVA_CONF,
|
||||
),
|
||||
@ -254,7 +254,7 @@ def resource_map():
|
||||
for s in vmware_ctxt['services']:
|
||||
if s not in resource_map[NOVA_CONF]['services']:
|
||||
resource_map[NOVA_CONF]['services'].append(s)
|
||||
novacell_ctxt = context.SubordinateConfigContext(interface='nova-cell',
|
||||
novacell_ctxt = context.SubordinateConfigContext(interface='cell',
|
||||
service='nova',
|
||||
config_file=NOVA_CONF)
|
||||
novacell_ctxt = novacell_ctxt()
|
||||
|
@ -30,7 +30,7 @@ requires:
|
||||
interface: nova-volume
|
||||
quantum-network-service:
|
||||
interface: quantum
|
||||
nova-cell:
|
||||
cell:
|
||||
interface: nova-cell
|
||||
neutron-api:
|
||||
interface: neutron-api
|
||||
|
Loading…
Reference in New Issue
Block a user