moved from pip install to package for networking-arista

This commit is contained in:
Michael Skalka 2018-07-30 11:09:05 -04:00
parent cb6bd79d89
commit 5188b2d3af
2 changed files with 1 additions and 17 deletions

View File

@ -35,14 +35,7 @@ class NeutronAristaCharm(charms_openstack.charm.OpenStackCharm):
release = 'queens'
# List of packages to install for this charm
packages = ['']
def install(self):
package_version = config('arista-version')
package_name = 'networking-arista==%s' % package_version
log('Installing {}'.format(package_name))
pip_install(package_name, fatal=True)
status_set('active', 'Unit is ready')
packages = ['python-networking-arista']
class AristaMl2Context(context.OSContextGenerator):

View File

@ -29,15 +29,7 @@ CONFIGS = register_configs()
use_defaults('update-status')
@reactive.when_not('neutron-arista.installed')
def install_neutron_arista():
with provide_charm_instance() as charm_class:
charm_class.install()
reactive.set_state('neutron-arista.installed')
@reactive.when('neutron-plugin-api-subordinate.connected')
@reactive.when('neutron-arista.installed')
def configure_principle(api_principle):
inject_config = {
'neutron-api': {
@ -56,4 +48,3 @@ def configure_principle(api_principle):
neutron_plugin_config='/etc/neutron/plugins/ml2/ml2_conf_arista.ini',
service_plugins=config('service-plugins'),
subordinate_configuration=inject_config)
api_principle.request_restart(service_type='neutron-server')