diff options
author | dongwenjuan <dong.wenjuan@zte.com.cn> | 2016-06-16 15:26:32 +0800 |
---|---|---|
committer | dongwenjuan <dong.wenjuan@zte.com.cn> | 2016-06-16 17:24:47 +0800 |
commit | 9f57b74905ab38bb0434c0a48b13752870b5b953 (patch) | |
tree | d95fdcfd620104c9d7bd5335dcdd27baa228f7c2 /tests | |
parent | 0a0d77039d4d2ece184461b78e65a7c6737d4b5a (diff) |
use `openstack` cli instead of `keystone`cli
As in OpenStack, `keystone` cli is not used,
change `openstack` cli instead of `keystone`cli
Change-Id: I2c4679cba7fd80ea33098f89fbd9eecf65abdd8a
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/run.sh b/tests/run.sh index 241d6898..d476f33e 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -21,7 +21,7 @@ INSPECTOR_PORT=12345 CONSUMER_PORT=12346 TEST_USER=demo TEST_PW=demo -TEST_TENANT=demo +TEST_PROJECT=demo TEST_ROLE=_member_ SUPPORTED_INSTALLER_TYPES="apex local" @@ -89,16 +89,16 @@ register_image() { } create_test_user() { - keystone user-list | grep -q "$TEST_USER" || { - keystone user-create --name "$TEST_USER" --pass "$TEST_PW" + openstack user list | grep -q "$TEST_USER" || { + openstack user create "$TEST_USER" --password "$TEST_PW" } - keystone tenant-list | grep -q "$TEST_TENANT" || { - keystone tenant-create --name "$TEST_TENANT" + openstack project list | grep -q "$TEST_PROJECT" || { + openstack project create "$TEST_PROJECT" } - keystone user-role-list --user "$TEST_USER" --tenant "$TEST_TENANT" \ + openstack user role list "$TEST_USER" --project "$TEST_PROJECT" \ | grep -q "$TEST_ROLE" || { - keystone user-role-add --user "$TEST_USER" --role "$TEST_ROLE" \ - --tenant "$TEST_TENANT" + openstack role add "$TEST_ROLE" --user "$TEST_USER" \ + --project "$TEST_PROJECT" } } @@ -108,7 +108,7 @@ boot_vm() { # test VM done with test user, so can test non-admin export OS_USERNAME="$TEST_USER" export OS_PASSWORD="$TEST_PW" - export OS_TENANT_NAME="$TEST_TENANT" + export OS_TENANT_NAME="$TEST_PROJECT" nova boot --flavor "$VM_FLAVOR" \ --image "$IMAGE_NAME" \ "$VM_NAME" @@ -202,7 +202,7 @@ check_host_status_down() { # Switching to test user export OS_USERNAME="$TEST_USER" export OS_PASSWORD="$TEST_PW" - export OS_TENANT_NAME="$TEST_TENANT" + export OS_TENANT_NAME="$TEST_PROJECT" host_status_line=$(nova show $VM_NAME | grep "host_status") [[ $? -ne 0 ]] && { @@ -235,10 +235,10 @@ cleanup() { image_id=$(glance image-list | grep " $IMAGE_NAME " | awk '{print $2}') sleep 1 [ -n "$image_id" ] && glance image-delete "$image_id" - keystone user-role-remove --user "$TEST_USER" --role "$TEST_ROLE" \ - --tenant "$TEST_TENANT" - keystone tenant-remove --name "$TEST_TENANT" - keystone user-delete "$TEST_USER" + openstack role remove "$TEST_ROLE" --user "$TEST_USER" \ + --project "$TEST_PROJECT" + openstack project delete "$TEST_PROJECT" + openstack user delete "$TEST_USER" #TODO: add host status check via nova admin api echo "waiting disabled compute host back to be enabled..." |