~robert-ayres/charms/trusty/neutron-contrail/trunk

« back to all changes in this revision

Viewing changes to hooks/neutron_contrail_hooks.py

  • Committer: Robert Ayres
  • Date: 2014-09-12 19:05:42 UTC
  • Revision ID: robert.ayres@canonical.com-20140912190542-y26ihakrkuxeozvq
Setting nova conf via neutron-plugin not required

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import platform
4
4
import sys
5
5
 
6
 
import json
7
 
 
8
6
from charmhelpers.core.hookenv import (
9
7
    CRITICAL,
10
8
    Hooks,
11
9
    UnregisteredHookError,
12
10
    log,
13
 
    relation_get,
14
 
    relation_set
 
11
    relation_get
15
12
)
16
13
 
17
14
from charmhelpers.core.host import (
26
23
)
27
24
 
28
25
from neutron_contrail_utils import (
29
 
    NOVA_SETTINGS,
30
26
    configure_vrouter,
31
27
    fix_permissions,
32
28
    modprobe,
80
76
    except UnregisteredHookError as e:
81
77
        log("Unknown hook {} - skipping.".format(e))
82
78
 
83
 
@hooks.hook("neutron-plugin-relation-joined")
84
 
def neutron_plugin_joined():
85
 
    relation_set(subordinate_configuration=json.dumps(NOVA_SETTINGS))
86
 
 
87
79
@hooks.hook("upgrade-charm")
88
80
def upgrade_charm():
89
81
    write_vrouter_config()