~ionutbalutoiu/charms/trusty/neutron-api/next

« back to all changes in this revision

Viewing changes to hooks/neutron_api_hooks.py

  • Committer: Liam Young
  • Date: 2014-06-20 10:02:09 UTC
  • Revision ID: liam.young@canonical.com-20140620100209-ibeiy1g9kt5ayimn
Added openstack upgrade, unit tests and lint fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    NEUTRON_CONF,
44
44
    api_port,
45
45
    CLUSTER_RES,
 
46
    do_openstack_upgrade,
46
47
)
47
48
 
48
49
from charmhelpers.contrib.hahelpers.cluster import (
71
72
@restart_on_change(restart_map(), stopstart=True)
72
73
def config_changed():
73
74
    global CONFIGS
 
75
    if openstack_upgrade_available('neutron-server'):
 
76
                    do_openstack_upgrade(CONFIGS)
74
77
    CONFIGS.write_all()
75
78
    for r_id in relation_ids('neutron-api'):
76
79
        neutron_api_relation_joined(rid=r_id)