Browse Source

more cleanup, moved subordinate out of venv, fixed an import and misspelling

changes/73/738573/1
Michael Skalka 4 years ago
parent
commit
cb6bd79d89
  1. 3
      src/layer.yaml
  2. 4
      src/lib/charm/openstack/neutron_arista.py
  3. 6
      src/reactive/neutron_arista_handlers.py

3
src/layer.yaml

@ -1,3 +1,6 @@
includes:
- 'layer:openstack'
- 'interface:neutron-plugin-api-subordinate'
options:
basic:
use_venv: False

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

@ -8,9 +8,6 @@ from charmhelpers.core.hookenv import (
config,
log,
status_set,
is_leader,
leader_get,
leader_set,
)
import charms_openstack.charm
@ -43,6 +40,7 @@ class NeutronAristaCharm(charms_openstack.charm.OpenStackCharm):
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')

6
src/reactive/neutron_arista_handlers.py

@ -14,12 +14,14 @@
import charms.reactive as reactive
from charmhelpers.core.hookenv import (
config,
)
from charms_openstack.charm import (
provide_charm_instance,
use_defaults,
)
import charm.openstack.neutron_arista as arista # noqa
from charm.openstack.neutron_arista import register_configs
CONFIGS = register_configs()
@ -37,7 +39,7 @@ def install_neutron_arista():
@reactive.when('neutron-plugin-api-subordinate.connected')
@reactive.when('neutron-arista.installed')
def configure_principle(api_principle):
injet_config = {
inject_config = {
'neutron-api': {
'/etc/neutron/neutron.conf': {
'sections': {

Loading…
Cancel
Save