Browse Source

moved from pip install to package for networking-arista

changes/73/738573/1
Michael Skalka 4 years ago
parent
commit
5188b2d3af
  1. 9
      src/lib/charm/openstack/neutron_arista.py
  2. 9
      src/reactive/neutron_arista_handlers.py

9
src/lib/charm/openstack/neutron_arista.py

@ -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):

9
src/reactive/neutron_arista_handlers.py

@ -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')

Loading…
Cancel
Save