From 3feaa383ce07c1cf0f5c8760e326aab96b55ddbf Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Thu, 25 Sep 2014 00:49:57 +0000 Subject: [PATCH] Add Nova v2.1 API endpoint In Juno cycle, we started to implement Nova v2.1 API and most part has been implemented now. For using/testing the API, this patch adds the endpoint setting to devstack. Change-Id: I25557cb2b0a1384ee11d3e1ae7d424828e766e50 --- files/default_catalog.templates | 6 ++++++ lib/nova | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/files/default_catalog.templates b/files/default_catalog.templates index 901635570b..a18d38f606 100644 --- a/files/default_catalog.templates +++ b/files/default_catalog.templates @@ -12,6 +12,12 @@ catalog.RegionOne.compute.internalURL = http://%SERVICE_HOST%:8774/v2/$(tenant_i catalog.RegionOne.compute.name = Compute Service +catalog.RegionOne.computev21.publicURL = http://%SERVICE_HOST%:8774/v2.1/$(tenant_id)s +catalog.RegionOne.computev21.adminURL = http://%SERVICE_HOST%:8774/v2.1/$(tenant_id)s +catalog.RegionOne.computev21.internalURL = http://%SERVICE_HOST%:8774/v2.1/$(tenant_id)s +catalog.RegionOne.computev21.name = Compute Service V2.1 + + catalog.RegionOne.volume.publicURL = http://%SERVICE_HOST%:8776/v1/$(tenant_id)s catalog.RegionOne.volume.adminURL = http://%SERVICE_HOST%:8776/v1/$(tenant_id)s catalog.RegionOne.volume.internalURL = http://%SERVICE_HOST%:8776/v1/$(tenant_id)s diff --git a/lib/nova b/lib/nova index 88c1e29cea..00050905bf 100644 --- a/lib/nova +++ b/lib/nova @@ -349,6 +349,14 @@ create_nova_accounts() { "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" \ "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" \ "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" + + local nova_v21_service=$(get_or_create_service "novav21" \ + "computev21" "Nova Compute Service V2.1") + get_or_create_endpoint $nova_v21_service \ + "$REGION_NAME" \ + "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2.1/\$(tenant_id)s" \ + "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2.1/\$(tenant_id)s" \ + "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2.1/\$(tenant_id)s" fi fi