From 1f6156f53e7e687fcc2841a9cd8018662e2124e2 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Thu, 18 Aug 2016 11:51:13 +0100 Subject: Create Congress Nova datasource with api_version The Congres Nova driver defaults to Nova API v2.0 but also supports micro versions since Liberty release. This patch creates the Nova datasource with the latest micro version available. This is useful for scenarios such as invoking nova.services.force_down that was introduced in v2.11. https://bugs.launchpad.net/congress/+bug/1552220 JIRA: APEX-238 Change-Id: I0a60a1199e36da38e48aa647812dd6ee5543ce2b Signed-off-by: Carlos Goncalves --- lib/post-install-functions.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh index a7499feb..7df55cd5 100755 --- a/lib/post-install-functions.sh +++ b/lib/post-install-functions.sh @@ -111,12 +111,17 @@ openstack endpoint delete \$swift_endpoint_id openstack service delete \$swift_service_id if [ "${deploy_options_array['congress']}" == 'True' ]; then + ds_configs="--config username=\$OS_USERNAME + --config tenant_name=\$OS_TENANT_NAME + --config password=\$OS_PASSWORD + --config auth_Url=\$OS_AUTH_URL" for s in nova neutronv2 ceilometer cinder glancev2 keystone; do - openstack congress datasource create \$s "\$s" \\ - --config username=\$OS_USERNAME \\ - --config tenant_name=\$OS_TENANT_NAME \\ - --config password=\$OS_PASSWORD \\ - --config auth_url=\$OS_AUTH_URL + ds_extra_configs="" + if [ "\$s" == "nova" ]; then + nova_micro_version=\$(nova version-list | grep CURRENT | awk '{print \$10}') + ds_extra_configs+="--config api_version="\$nova_micro_version" + fi + openstack congress datasource create \$s "\$s" \$ds_configs \$ds_extra_configs done openstack congress datasource create doctor "doctor" fi -- cgit 1.2.3-korg