From 806233e0ed30e59d9deb9934f831f8ffad879733 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Mon, 17 Jun 2013 15:34:54 +0100 Subject: [PATCH] Create an endpoint for nova api v3. Supports both SQL and templated keystone backend. Create an additional endpoint for nova api v3. The service type is computev3. The endpoint is similar to the v2 one but the version part is "v3" rather than "v2", and it does not include the tenantid anymore. Fixes: bug #1191798 Change-Id: I86e4734c3a9e57f1dc68f1104449d7c041d6927d --- files/default_catalog.templates | 6 ++++++ lib/nova | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/files/default_catalog.templates b/files/default_catalog.templates index 990cc0e911..1ecf890241 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.computev3.publicURL = http://%SERVICE_HOST%:8774/v3 +catalog.RegionOne.computev3.adminURL = http://%SERVICE_HOST%:8774/v3 +catalog.RegionOne.computev3.internalURL = http://%SERVICE_HOST%:8774/v3 +catalog.RegionOne.computev3.name = Compute Service V3 + + 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 db82aa2362..c87656f22e 100644 --- a/lib/nova +++ b/lib/nova @@ -407,6 +407,17 @@ create_nova_accounts() { --publicurl "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" \ --adminurl "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" \ --internalurl "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" + NOVA_V3_SERVICE=$(keystone service-create \ + --name=nova \ + --type=computev3 \ + --description="Nova Compute Service V3" \ + | grep " id " | get_field 2) + keystone endpoint-create \ + --region RegionOne \ + --service_id $NOVA_V3_SERVICE \ + --publicurl "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v3" \ + --adminurl "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v3" \ + --internalurl "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v3" fi fi }