~bbaqar/charms/trusty/neutron-api-plumgrid/temp

« back to all changes in this revision

Viewing changes to hooks/neutron_plumgrid_hooks.py

  • Committer: bbaqar at plumgrid
  • Date: 2016-04-25 09:05:55 UTC
  • mfrom: (18.1.7 neutron-api-plumgrid)
  • Revision ID: bbaqar@plumgrid.com-20160425090555-yl82ba6bhwjqkwr9
Merge: Liberty/Mitaka support

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    register_configs,
32
32
    restart_map,
33
33
    ensure_files,
 
34
    set_neutron_relation,
34
35
)
35
36
 
36
37
hooks = Hooks()
89
90
    CONFIGS.write_all()
90
91
 
91
92
 
 
93
@hooks.hook("neutron-plugin-api-subordinate-relation-joined")
 
94
def neutron_plugin_joined():
 
95
    set_neutron_relation()
 
96
 
 
97
 
 
98
@hooks.hook("identity-admin-relation-changed")
 
99
@hooks.hook("identity-admin-relation-broken")
 
100
@restart_on_change(restart_map())
 
101
def identity_admin_relation():
 
102
    CONFIGS.write_all()
 
103
 
 
104
 
92
105
@hooks.hook('stop')
93
106
def stop():
94
107
    '''