start adding ovs plugin subordinate support
This commit is contained in:
parent
3188cd09f1
commit
a550a02537
1
hooks/neutron-plugin-relation-changed
Symbolic link
1
hooks/neutron-plugin-relation-changed
Symbolic link
@ -0,0 +1 @@
|
||||
nova_compute_hooks.py
|
1
hooks/neutron-plugin-relation-departed
Symbolic link
1
hooks/neutron-plugin-relation-departed
Symbolic link
@ -0,0 +1 @@
|
||||
nova_compute_hooks.py
|
1
hooks/neutron-plugin-relation-joined
Symbolic link
1
hooks/neutron-plugin-relation-joined
Symbolic link
@ -0,0 +1 @@
|
||||
nova_compute_hooks.py
|
@ -205,6 +205,23 @@ def ceph_joined():
|
||||
apt_install(filter_installed_packages(['ceph-common']), fatal=True)
|
||||
|
||||
|
||||
@hooks.hook('neutron-plugin-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()))
|
||||
if is_relation_made('amqp', ['password']):
|
||||
amqp_rids = relation_ids('amqp')
|
||||
amqp_units = related_units(amqp_rids[0])
|
||||
if len(amqp_rids) > 1 or len(amqp_units) > 1:
|
||||
print "Too many rabbits!"
|
||||
rel_settings = relation_get(unit=amqp_units[0], rid=amqp_rids[0])
|
||||
rel_settings['vhost'] = config('rabbit-vhost')
|
||||
rel_settings['username'] = config('rabbit-user')
|
||||
if 'password' in rel_settings:
|
||||
relation_set(relation_id=rid, **rel_settings)
|
||||
else:
|
||||
relation_set(relation_id=rid, password='')
|
||||
|
||||
@hooks.hook('ceph-relation-changed')
|
||||
@restart_on_change(restart_map())
|
||||
def ceph_changed():
|
||||
|
@ -27,6 +27,9 @@ requires:
|
||||
nova-ceilometer:
|
||||
interface: nova-ceilometer
|
||||
scope: container
|
||||
neutron-plugin:
|
||||
interface: neutron-plugin
|
||||
scope: container
|
||||
peers:
|
||||
compute-peer:
|
||||
interface: nova
|
||||
|
Loading…
Reference in New Issue
Block a user