Revert to installing from a debian package

This commit is contained in:
Mathieu Mitchell 2017-11-13 22:11:38 -05:00
parent 60362eeae5
commit 67e7e4fe5d
2 changed files with 11 additions and 8 deletions

View File

@ -62,10 +62,15 @@ class NewtonNeutronAPIGenericSwitchCharm(charms_openstack.charm.OpenStackCharm):
'plugin.LoadBalancerPluginv2')
def install(self):
hookenv.log('Installing deb from resource file.')
package_path = hookenv.resource_get(name='package')
config_path = hookenv.resource_get('genericswitch-ml2-config')
shutil.copy(config_path, self.genericswitch_config)
pip_install(config('pip-requirement-line'))
# NOTE(mmitchell): This puts the full package path as a package to install.
self.packages.append(package_path)
super().install()
def configure_plugin(self, api_principle):
@ -77,15 +82,9 @@ class NewtonNeutronAPIGenericSwitchCharm(charms_openstack.charm.OpenStackCharm):
"/etc/neutron/neutron.conf": {
"sections": {
'DEFAULT': [
('hello', 'world')
],
}
},
"/etc/neutron/plugins/ml2/ml2_conf.ini": {
"sections": {
'ml2': [
('mechanism_drivers', 'openvswitch,hyperv,genericswitch')
]
}
}
}
}

View File

@ -31,3 +31,7 @@ resources:
type: file
filename: ml2_conf_genericswitch.ini
description: Configuration file for generic switch devices.
package:
type: file
filename: neutron-api-genericswitch.deb
description: Packaged version of the networking-generic-switch python package