~gnuoy/charms/trusty/neutron-openvswitch/ice-meta

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/context.py

  • Committer: Liam Young
  • Date: 2015-09-03 09:45:37 UTC
  • Revision ID: liam.young@canonical.com-20150903094537-mww9rs2ji0og5rr4
[gnuoy,trivial] Charmhelper sync (+1'd by mojo)

Show diffs side-by-side

added added

removed removed

Lines of Context:
895
895
                'neutron_url': '%s://%s:%s' % (proto, host, '9696')}
896
896
        return ctxt
897
897
 
 
898
    def pg_ctxt(self):
 
899
        driver = neutron_plugin_attribute(self.plugin, 'driver',
 
900
                                          self.network_manager)
 
901
        config = neutron_plugin_attribute(self.plugin, 'config',
 
902
                                          self.network_manager)
 
903
        ovs_ctxt = {'core_plugin': driver,
 
904
                    'neutron_plugin': 'plumgrid',
 
905
                    'neutron_security_groups': self.neutron_security_groups,
 
906
                    'local_ip': unit_private_ip(),
 
907
                    'config': config}
 
908
        return ovs_ctxt
 
909
 
898
910
    def __call__(self):
899
911
        if self.network_manager not in ['quantum', 'neutron']:
900
912
            return {}
914
926
            ctxt.update(self.calico_ctxt())
915
927
        elif self.plugin == 'vsp':
916
928
            ctxt.update(self.nuage_ctxt())
 
929
        elif self.plugin == 'plumgrid':
 
930
            ctxt.update(self.pg_ctxt())
917
931
 
918
932
        alchemy_flags = config('neutron-alchemy-flags')
919
933
        if alchemy_flags: