Complete moving Keystone setup out of keystone_data.sh

* Move remaining role creation to create_keystone_accounts()
* Move glance creation to create_glance_accounts()
* Move nova/ec2/s3 creation to create_nova_accounts()
* Move ceilometer creation to create_ceilometer_accounts()
* Move tempest creation to create_tempest_accounts()
* Convert moved code to use OpenStackClient for setup
* files/keystone_data.sh is removed

Note that the SERVICE_TENANT and ADMIN_ROLE lookups in the other service
implementations are not necessary with OSC, all operations can be done
using names rather than requiring IDs.

Change-Id: I4283ca0036ae39fd44ed2eed834b69d78e4f8257
diff --git a/stack.sh b/stack.sh
index c990a1c..f8973ee 100755
--- a/stack.sh
+++ b/stack.sh
@@ -907,14 +907,13 @@
         SERVICE_ENDPOINT=http://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT_INT/v2.0
     fi
 
-    # Do the keystone-specific bits from keystone_data.sh
-    export OS_SERVICE_TOKEN=$SERVICE_TOKEN
-    export OS_SERVICE_ENDPOINT=$SERVICE_ENDPOINT
-    # Add temporarily to make openstackclient work
+    # Setup OpenStackclient token-flow auth
     export OS_TOKEN=$SERVICE_TOKEN
     export OS_URL=$SERVICE_ENDPOINT
+
     create_keystone_accounts
     create_nova_accounts
+    create_glance_accounts
     create_cinder_accounts
     create_neutron_accounts
 
@@ -922,7 +921,7 @@
         create_ceilometer_accounts
     fi
 
-    if is_service_enabled swift || is_service_enabled s-proxy; then
+    if is_service_enabled swift; then
         create_swift_accounts
     fi
 
@@ -930,20 +929,14 @@
         create_heat_accounts
     fi
 
-    # ``keystone_data.sh`` creates services, admin and demo users, and roles.
-    ADMIN_PASSWORD=$ADMIN_PASSWORD SERVICE_TENANT_NAME=$SERVICE_TENANT_NAME SERVICE_PASSWORD=$SERVICE_PASSWORD \
-    SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_ENDPOINT=$SERVICE_ENDPOINT SERVICE_HOST=$SERVICE_HOST \
-    S3_SERVICE_PORT=$S3_SERVICE_PORT KEYSTONE_CATALOG_BACKEND=$KEYSTONE_CATALOG_BACKEND \
-    DEVSTACK_DIR=$TOP_DIR ENABLED_SERVICES=$ENABLED_SERVICES \
-        bash -x $FILES/keystone_data.sh
-
-    # Set up auth creds now that keystone is bootstrapped
+    # Begone token-flow auth
     unset OS_TOKEN OS_URL
+
+    # Set up password-flow auth creds now that keystone is bootstrapped
     export OS_AUTH_URL=$SERVICE_ENDPOINT
     export OS_TENANT_NAME=admin
     export OS_USERNAME=admin
     export OS_PASSWORD=$ADMIN_PASSWORD
-    unset OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT
 fi