Added vsd-cms-id as part of config option.
To cover the case when Nuage VSD & VSC are deployed outside of juju framework. Removed nuage-tarball from config file Removed respective code form neutron_api_hook.py Change-Id: I4518435ded9e1a4eb3d98cbb2e77f04b4f2dda61 Signed-off-by: sunny-verma <sunnyverma1992@gmail.com>
This commit is contained in:
parent
7b6e6e9b6e
commit
a0dddcdf03
10
config.yaml
10
config.yaml
@ -301,6 +301,12 @@ options:
|
||||
description: |
|
||||
Its [nuage-openstack-neutron nuagenetlib] for Nuage VSP >=3.2R4 & KILO
|
||||
and [nuage-neutron python-nuagenetlib] of Nuage VSP <=3.0 & JUNO
|
||||
vsd-cms-id:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
CMS ID is used as an authentication token from VSD to CMS.
|
||||
This value is being generated via nuage scripts and can be set pre/post deployment.
|
||||
vsd-cms-name:
|
||||
type: string
|
||||
default:
|
||||
@ -337,10 +343,6 @@ options:
|
||||
type: string
|
||||
default: juju-enterprise
|
||||
description: Name of the Organization or Enterprise to create in Nuage VSD
|
||||
nuage-tarball-url:
|
||||
type: string
|
||||
default:
|
||||
description: Optional URL to tarball containing Nuage python packages.
|
||||
# end of Nuage VSD configuration
|
||||
l2-population:
|
||||
type: boolean
|
||||
|
@ -197,7 +197,7 @@ class NeutronCCContext(context.NeutronContext):
|
||||
log('relation data:cms_id required for'
|
||||
' nuage plugin: {}'.format(cms_id_value))
|
||||
if cms_id_value is not None:
|
||||
ctxt['cms_id'] = '{}'.format(cms_id_value)
|
||||
ctxt['vsd_cms_id'] = cms_id_value
|
||||
log('relation data:vsd-ip-address: {}'.format(vsd_ip))
|
||||
if vsd_ip is not None:
|
||||
ctxt['vsd_server'] = '{}:8443'.format(vsd_ip)
|
||||
|
@ -2,10 +2,8 @@
|
||||
|
||||
import sys
|
||||
import uuid
|
||||
import os
|
||||
from subprocess import (
|
||||
check_call,
|
||||
check_output,
|
||||
)
|
||||
|
||||
from charmhelpers.core.hookenv import (
|
||||
@ -108,7 +106,6 @@ from charmhelpers.contrib.network.ip import (
|
||||
)
|
||||
|
||||
from charmhelpers.contrib.openstack.context import ADDRESS_TYPES
|
||||
from charmhelpers.fetch.archiveurl import ArchiveUrlFetchHandler
|
||||
|
||||
from charmhelpers.contrib.charmsupport import nrpe
|
||||
from charmhelpers.contrib.hardening.harden import harden
|
||||
@ -177,29 +174,6 @@ def install():
|
||||
packages = determine_packages(openstack_origin)
|
||||
apt_install(packages, fatal=True)
|
||||
|
||||
if neutron_plugin == 'vsp':
|
||||
source = config('nuage-tarball-url')
|
||||
if source is not None:
|
||||
try:
|
||||
handler = ArchiveUrlFetchHandler()
|
||||
packages = ['nuage-neutron']
|
||||
path = handler.install(source)
|
||||
for package in packages:
|
||||
package_path = os.path.join(path, package)
|
||||
if os.path.exists(package_path):
|
||||
log('install {0} from: {1}'.format(package,
|
||||
package_path))
|
||||
check_output(
|
||||
[
|
||||
'bash', '-c',
|
||||
'cd {}; sudo python setup.py install'.format(
|
||||
package_path)
|
||||
]
|
||||
)
|
||||
except Exception as e:
|
||||
log('install failed with error: {}'.format(e.message))
|
||||
raise Exception(e)
|
||||
|
||||
status_set('maintenance', 'Git install')
|
||||
git_install(config('openstack-origin-git'))
|
||||
|
||||
@ -234,8 +208,9 @@ def vsd_changed(relation_id=None, remote_unit=None):
|
||||
return
|
||||
vsd_address = '{}:8443'.format(vsd_ip_address)
|
||||
if os_release('neutron-server') >= 'kilo':
|
||||
cms_id = relation_get('nuage-cms-id')
|
||||
log("nuage-vsd-api-relation-changed : cms_id:{}".format(cms_id))
|
||||
vsd_cms_id = relation_get('nuage-cms-id')
|
||||
log("nuage-vsd-api-relation-changed : cms_id:{}"
|
||||
.format(vsd_cms_id))
|
||||
nuage_config_file = neutron_plugin_attribute(config('neutron-plugin'),
|
||||
'config', 'neutron')
|
||||
log('vsd-rest-api-relation-changed: ip address:{}'.format(vsd_address))
|
||||
|
@ -10,4 +10,4 @@ organization = {{ vsd_organization }}
|
||||
serverssl = {{ vsd_auth_ssl }}
|
||||
base_uri = {{ vsd_base_uri }}
|
||||
default_net_partition_name = {{ vsd_netpart_name }}
|
||||
cms_id = {{ cms_id }}
|
||||
cms_id = {{ vsd_cms_id }}
|
||||
|
Loading…
Reference in New Issue
Block a user