diff options
author | Carlos Goncalves <carlos.goncalves@neclab.eu> | 2016-08-18 11:51:13 +0100 |
---|---|---|
committer | Carlos Goncalves <carlos.goncalves@neclab.eu> | 2016-08-18 12:09:22 +0100 |
commit | 1f6156f53e7e687fcc2841a9cd8018662e2124e2 (patch) | |
tree | 2f65f2ec90e60bb90017ae974662259241eac793 /lib | |
parent | 92ecd83a55059b938ea92bfe0c351621f0826f2c (diff) |
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 <carlos.goncalves@neclab.eu>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/post-install-functions.sh | 15 |
1 files changed, 10 insertions, 5 deletions
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 |