Proposed fixes based on openstack-charmers review.

This commit is contained in:
James Page 2015-10-07 06:25:23 -07:00
parent 831ee7fd17
commit e66e58938f
5 changed files with 21 additions and 28 deletions

View File

@ -110,19 +110,6 @@ options:
gre
vxlan
.
neutron-plugin-ppa-key:
type: string
default:
description: Optional PPA key to Neutron Plugin containing Debian packages.
neutron-plugin-repository-url:
type: string
default:
description: Optional URL to Neutron Plugin containing Debian packages.
neutron-plugin-tarball-url:
type: string
default:
description: Optional URL to Neutron Plugin containing python packages.
Multiple types can be provided - field is space delimited.
flat-network-providers:
type: string
default:
@ -305,8 +292,8 @@ options:
default: csp
description: Name of the organization in Nuage VSD
vsd-auth-ssl:
type: string
default: "True"
type: boolean
default: True
description: SSL authentication of the Nuage VSD Server
vsd-base-uri:
type: string
@ -320,6 +307,10 @@ 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
@ -417,3 +408,13 @@ options:
description: |
If True neutron-server will install neutron packages for the plugin
configured.
# Additional software source configuration
extra-key:
type: string
default:
description: Optional key for archive containing additional packages.
extra-source:
type: string
default:
description: Optional source for archive containing additional packages.

View File

@ -156,19 +156,12 @@ def install():
configure_installation_source(config('openstack-origin'))
packages = determine_packages(config('openstack-origin'))
if config('neutron-plugin') == 'vsp':
source = config('neutron-plugin-repository-url')
if source is not None:
key = None
if config('neutron-plugin-ppa-key') is not None:
key = config('neutron-plugin-ppa-key')
add_source(config('neutron-plugin-repository-url'), key)
add_source(config('extra-source'), config('extra-key'))
apt_update()
apt_install(packages, fatal=True)
if config('neutron-plugin') == 'vsp':
source = config('neutron-plugin-tarball-url')
source = config('nuage-tarball-url')
if source is not None:
try:
handler = ArchiveUrlFetchHandler()

View File

@ -181,7 +181,7 @@ def determine_packages(source=None):
if config('neutron-plugin') == 'vsp':
packages.append('python-nuagenetlib')
nuage_tar_package_location = config('neutron-plugin-tarball-url')
nuage_tar_package_location = config('nuage-tarball-url')
if nuage_tar_package_location is None:
packages.append('nuage-neutron')

View File

@ -35,8 +35,7 @@ requires:
interface: hacluster
scope: container
vsd-rest-api:
interface: http
scope: global
interface: vsd-rest-api
zeromq-configuration:
interface: zeromq-configuration
scope: container

View File

@ -138,7 +138,7 @@ class NeutronAPIHooksTests(CharmTestCase):
def test_nuage_install_hook(self, git_requested):
git_requested.return_value = False
self.test_config.set('neutron-plugin', 'vsp')
self.test_config.set('neutron-plugin-repository-url',
self.test_config.set('extra-source',
"deb http://10.14.4.1/nuage trusty main")
_pkgs = ['foo', 'bar', 'python-nuagenetlib']
_expected_pkgs = list(_pkgs)