Configure and launch Heat REST API.

This is a REST API in the same style as other OpenStack APIs.

This also creates a new endpoint for the REST API which uses the
serivce type 'orchestration'. The old endpoint now has the service
type 'cloudformation'.

This matches the pattern where the native openstack API gets a
generic service type while the emulated EC2 API gets a specific
type (eg, object-store, s3).

There will be breakage for the time period where only one of this
change and https://review.openstack.org/#/c/14263/ are approved,
since keystone will have the incorrect service type for that period.

Change-Id: I6a0d51a63da8017d375b4c065c4c9079dfca8fe3
diff --git a/files/keystone_data.sh b/files/keystone_data.sh
index 1754910..7da07aa 100755
--- a/files/keystone_data.sh
+++ b/files/keystone_data.sh
@@ -166,15 +166,25 @@
                            --role_id $ADMIN_ROLE
     if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
         HEAT_CFN_SERVICE=$(get_id keystone service-create \
-            --name=heat \
-            --type=orchestration \
-            --description="Heat Service")
+            --name=heat-cfn \
+            --type=cloudformation \
+            --description="Heat CloudFormation Service")
         keystone endpoint-create \
             --region RegionOne \
             --service_id $HEAT_CFN_SERVICE \
             --publicurl "http://$SERVICE_HOST:$HEAT_API_CFN_PORT/v1" \
             --adminurl "http://$SERVICE_HOST:$HEAT_API_CFN_PORT/v1" \
             --internalurl "http://$SERVICE_HOST:$HEAT_API_CFN_PORT/v1"
+        HEAT_SERVICE=$(get_id keystone service-create \
+            --name=heat \
+            --type=orchestration \
+            --description="Heat Service")
+        keystone endpoint-create \
+            --region RegionOne \
+            --service_id $HEAT_SERVICE \
+            --publicurl "http://$SERVICE_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" \
+            --adminurl "http://$SERVICE_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" \
+            --internalurl "http://$SERVICE_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s"
     fi
 fi