~hazmat/charms/precise/quantum-gateway/ssl-everywhere

« back to all changes in this revision

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

  • Committer: James Page
  • Date: 2013-11-17 21:53:21 UTC
  • mfrom: (37.1.5 quantum-gateway)
  • Revision ID: james.page@canonical.com-20131117215321-o4o6uje3itj2e4se
[gandelman-a][james-page] NVP support

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
    def ovs_ctxt(self):
386
386
        driver = neutron_plugin_attribute(self.plugin, 'driver',
387
387
                                          self.network_manager)
388
 
 
 
388
        config = neutron_plugin_attribute(self.plugin, 'config',
 
389
                                          self.network_manager)
389
390
        ovs_ctxt = {
390
391
            'core_plugin': driver,
391
392
            'neutron_plugin': 'ovs',
392
393
            'neutron_security_groups': self.neutron_security_groups,
393
394
            'local_ip': unit_private_ip(),
 
395
            'config': config
394
396
        }
395
397
 
396
398
        return ovs_ctxt
397
399
 
 
400
    def nvp_ctxt(self):
 
401
        driver = neutron_plugin_attribute(self.plugin, 'driver',
 
402
                                          self.network_manager)
 
403
        config = neutron_plugin_attribute(self.plugin, 'config',
 
404
                                          self.network_manager)
 
405
        nvp_ctxt = {
 
406
            'core_plugin': driver,
 
407
            'neutron_plugin': 'nvp',
 
408
            'neutron_security_groups': self.neutron_security_groups,
 
409
            'local_ip': unit_private_ip(),
 
410
            'config': config
 
411
        }
 
412
 
 
413
        return nvp_ctxt
 
414
 
398
415
    def __call__(self):
399
416
        self._ensure_packages()
400
417
 
408
425
 
409
426
        if self.plugin == 'ovs':
410
427
            ctxt.update(self.ovs_ctxt())
 
428
        elif self.plugin == 'nvp':
 
429
            ctxt.update(self.nvp_ctxt())
411
430
 
412
431
        self._save_flag_file()
413
432
        return ctxt