start adding ovs plugin subordinate support

This commit is contained in:
Liam Young 2014-05-06 16:07:42 +00:00
parent 3188cd09f1
commit a550a02537
5 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1 @@
nova_compute_hooks.py

View File

@ -0,0 +1 @@
nova_compute_hooks.py

View File

@ -0,0 +1 @@
nova_compute_hooks.py

View File

@ -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():

View File

@ -27,6 +27,9 @@ requires:
nova-ceilometer:
interface: nova-ceilometer
scope: container
neutron-plugin:
interface: neutron-plugin
scope: container
peers:
compute-peer:
interface: nova