diff options
author | Lusheng Ji <lji@research.att.com> | 2017-11-29 17:56:29 -0500 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2017-11-30 15:25:44 +0000 |
commit | 41a4fc5510f49f4ca1a9a2936c171adb7a6eab41 (patch) | |
tree | 7f52ddd5596d6994114e3bcf4dfeb4c43763c967 | |
parent | 415536dc03d469d018c7899baa6492caa01852ee (diff) |
Add handling for keystone url w/o version
Issue-ID: DCAEGEN2-200
Change-Id: Ie686c2443f1110c680f3821fc9e51d68ea952156
Signed-off-by: Lusheng Ji <lji@research.att.com>
(cherry picked from commit b3afda600c08fca77f57c99a75e4c016b756bcca)
-rwxr-xr-x | boot/dcae2_vm_init.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/boot/dcae2_vm_init.sh b/boot/dcae2_vm_init.sh index 570cb704..b071dffd 100755 --- a/boot/dcae2_vm_init.sh +++ b/boot/dcae2_vm_init.sh @@ -450,6 +450,15 @@ register_dns_zone_designate() TENANT_ID="$(cat /opt/config/tenant_id.txt)" KEYSTONE_URL="$(cat /opt/config/openstack_keystone_url.txt)" + if [[ "$KEYSTONE_URL" == */v3 ]]; then + echo "$KEYSTONE_URL" + elif [[ "$KEYSTONE_URL" == */v2.0 ]]; then + echo "$KEYSTONE_URL" + else + KEYSTONE_URL="${KEYSTONE_URL}/v2.0" + echo "$KEYSTONE_URL" + fi + USERNAME="$(cat /opt/config/openstack_user.txt)" PASSWORD="$(cat /opt/config/openstack_password.txt)" |