Merge "Update Rackspace vendor profile for cinder v2"

This commit is contained in:
Zuul 2020-03-25 22:46:56 +00:00 committed by Gerrit Code Review
commit 47ef848016
4 changed files with 24 additions and 2 deletions

View File

@ -258,7 +258,10 @@ SYD Sydney, NSW
* Uploaded Images need properties to not use vendor agent::
:vm_mode: hvm
:xenapi_use_agent: False
* Volume API Version is 1
* Block Storage API Version is 2
* The Block Storage API supports version 2 but only version 1 is in
the catalog. The Block Storage endpoint is
https://{region_name}.blockstorage.api.rackspacecloud.com/v2/{project_id}
* While passwords are recommended for use, API keys do work as well.
The `rackspaceauth` python package must be installed, and then the following
can be added to clouds.yaml::

View File

@ -490,6 +490,18 @@ class CloudRegion(object):
# Specifically, looking up a list of projects/domains/system to
# scope to.
value = auth.get('auth_url')
# Because of course. Seriously.
# We have to override the Rackspace block-storage endpoint because
# only v1 is in the catalog but the service actually does support
# v2. But the endpoint needs the project_id.
service_type = self._service_type_manager.get_service_type(
service_type)
if (
value
and self.config.get('profile') == 'rackspace'
and service_type == 'block-storage'
):
value = value + auth.get('project_id')
return value
def get_endpoint_from_catalog(

View File

@ -19,7 +19,8 @@
"floating_ip_source": "None",
"secgroup_source": "None",
"requires_floating_ip": false,
"block_storage_api_version": "1",
"block_storage_endpoint_override": "https://{region_name}.blockstorage.api.rackspacecloud.com/v2/",
"block_storage_api_version": "2",
"disable_vendor_agent": {
"vm_mode": "hvm",
"xenapi_use_agent": "False"

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Rackspace Cloud's vendor profile has been updated to use v2
of the Block Storage API. This introduces an endpoint override
for the service based on ``region_name`` and ``project_id``.