Change most keystoneclient commands to openstacklient in libs
migrated most keystoneclient commands from the following libs:
ceilometer
cinder
ironic
keystone
marconi
neutron
nova
savanna
swift
trove
Also need to set and unset openstackclient specific environment
variables from stack.sh
Change-Id: I725f30bc08e1df5a4c5770576c19ad1ddaeb843a
diff --git a/lib/marconi b/lib/marconi
index 7c8fd14..88312cb 100644
--- a/lib/marconi
+++ b/lib/marconi
@@ -151,27 +151,29 @@
}
function create_marconi_accounts() {
- SERVICE_TENANT=$(keystone tenant-list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
- ADMIN_ROLE=$(keystone role-list | awk "/ admin / { print \$2 }")
+ SERVICE_TENANT=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
+ ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
- MARCONI_USER=$(get_id keystone user-create --name=marconi \
- --pass="$SERVICE_PASSWORD" \
- --tenant-id $SERVICE_TENANT \
- --email=marconi@example.com \
- | grep " id " | get_field 2)
- keystone user-role-add --tenant-id $SERVICE_TENANT \
- --user-id $MARCONI_USER \
- --role-id $ADMIN_ROLE
+ MARCONI_USER=$(openstack user create \
+ marconi \
+ --password "$SERVICE_PASSWORD" \
+ --project $SERVICE_TENANT \
+ --email marconi@example.com \
+ | grep " id " | get_field 2)
+ openstack role add \
+ $ADMIN_ROLE \
+ --project $SERVICE_TENANT \
+ --user $MARCONI_USER
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
- MARCONI_SERVICE=$(keystone service-create \
- --name=marconi \
+ MARCONI_SERVICE=$(openstack service create \
+ marconi \
--type=queuing \
--description="Marconi Service" \
| grep " id " | get_field 2)
- keystone endpoint-create \
+ openstack endpoint create \
+ $MARCONI_SERVICE \
--region RegionOne \
- --service_id $MARCONI_SERVICE \
--publicurl "http://$SERVICE_HOST:8888" \
--adminurl "http://$SERVICE_HOST:8888" \
--internalurl "http://$SERVICE_HOST:8888"