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

This commit is contained in:
Michael Skalka 2018-07-30 11:00:32 -04:00
parent c14ce31355
commit cb6bd79d89
3 changed files with 8 additions and 5 deletions

View File

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

View File

@ -8,9 +8,6 @@ from charmhelpers.core.hookenv import (
config, config,
log, log,
status_set, status_set,
is_leader,
leader_get,
leader_set,
) )
import charms_openstack.charm import charms_openstack.charm
@ -43,6 +40,7 @@ class NeutronAristaCharm(charms_openstack.charm.OpenStackCharm):
def install(self): def install(self):
package_version = config('arista-version') package_version = config('arista-version')
package_name = 'networking-arista==%s' % package_version package_name = 'networking-arista==%s' % package_version
log('Installing {}'.format(package_name))
pip_install(package_name, fatal=True) pip_install(package_name, fatal=True)
status_set('active', 'Unit is ready') status_set('active', 'Unit is ready')

View File

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