~landscape/charms/trusty/neutron-api-odl-vpp/trunk

« back to all changes in this revision

Viewing changes to hooks/odl_data.py

  • Committer: Liam Young
  • Date: 2015-07-21 10:30:53 UTC
  • mfrom: (2.2.10 neutron-api-odl)
  • Revision ID: liam.young@canonical.com-20150721103053-02g0kfru0t4sjfrj
[james-page, r=gnuoy] Kilo support

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        # first nodes private-address
71
71
        self['odl_ip'] = first_contoller.get('private-address')
72
72
        self['odl_port'] = first_contoller.get('port')
73
 
        # ODL passing wrong port atm
74
 
        self['odl_port'] = '8181'
75
73
        self['odl_username'] = first_contoller.get('username')
76
74
        self['odl_password'] = first_contoller.get('password')
77
75
 
78
 
    def provide_data(self):
79
 
        odl_cmds = {
80
 
            'feature:install': [
81
 
                'cosc-cvpn-ovs-rest',
82
 
                'odl-netconf-connector-all'
83
 
            ],
84
 
            'log:set': {
85
 
                'TRACE': ['cosc-cvpn-ovs-rest', 'odl-netconf-connector-all'],
86
 
            }
87
 
        }
88
 
        relation_info = {
89
 
            'odl-cmds': json.dump(odl_cmds)
90
 
        }
91
 
        return relation_info
92
 
 
93
76
    def is_ready(self):
94
77
        if 'password' in self.get_first_data():
95
78
            return True
99
82
 
100
83
class ConfigTranslation(dict):
101
84
    def __init__(self):
102
 
        self['use_syslog'] = config('use-syslog')
103
85
        self['vlan_ranges'] = config('vlan-ranges')
104
86
        self['overlay_network_type'] = self.get_overlay_network_type()
 
87
        self['security_groups'] = config('security-groups')
105
88
 
106
89
    def get_overlay_network_type(self):
107
90
        overlay_networks = config('overlay-network-type').split()