Drop v1 API in Pike+
Drop the v1 Cinder API for Pike+ since it is deprecated and no longer maintained in the upstream code base. Change-Id: I99e604916f6147b181f45a773c20f3adf2306788
This commit is contained in:
parent
7896a72023
commit
d23e6fdf47
12
config.yaml
12
config.yaml
@ -336,8 +336,8 @@ options:
|
||||
os-public-hostname set to 'cinder.example.com' with ssl enabled will
|
||||
create two public endpoints for cinder:
|
||||
.
|
||||
https://cinder.example.com:443/v1/$(tenant_id)s and
|
||||
https://cinder.example.com:443/v2/$(tenant_id)s
|
||||
https://cinder.example.com:443/v2/$(tenant_id)s and
|
||||
https://cinder.example.com:443/v3/$(tenant_id)s
|
||||
os-internal-hostname:
|
||||
type: string
|
||||
default:
|
||||
@ -349,8 +349,8 @@ options:
|
||||
os-internal-hostname set to 'cinder.internal.example.com' with ssl
|
||||
enabled will create two internal endpoints for cinder:
|
||||
.
|
||||
https://cinder.internal.example.com:443/v1/$(tenant_id)s and
|
||||
https://cinder.internal.example.com:443/v2/$(tenant_id)s
|
||||
https://cinder.internal.example.com:443/v2/$(tenant_id)s and
|
||||
https://cinder.internal.example.com:443/v3/$(tenant_id)s
|
||||
os-admin-hostname:
|
||||
type: string
|
||||
default:
|
||||
@ -362,8 +362,8 @@ options:
|
||||
os-admin-hostname set to 'cinder.admin.example.com' with ssl enabled will
|
||||
create two admin endpoints for cinder:
|
||||
.
|
||||
https://cinder.admin.example.com:443/v1/$(tenant_id)s and
|
||||
https://cinder.admin.example.com:443/v2/$(tenant_id)s
|
||||
https://cinder.admin.example.com:443/v2/$(tenant_id)s and
|
||||
https://cinder.admin.example.com:443/v3/$(tenant_id)s
|
||||
prefer-ipv6:
|
||||
type: boolean
|
||||
default: False
|
||||
|
@ -306,34 +306,37 @@ def amqp_departed():
|
||||
|
||||
@hooks.hook('identity-service-relation-joined')
|
||||
def identity_joined(rid=None):
|
||||
settings = {}
|
||||
|
||||
if not service_enabled('api'):
|
||||
juju_log('api service not enabled; skipping endpoint registration')
|
||||
return
|
||||
|
||||
public_url = '{}:{}/v1/$(tenant_id)s'.format(
|
||||
canonical_url(CONFIGS, PUBLIC),
|
||||
config('api-listening-port')
|
||||
)
|
||||
internal_url = '{}:{}/v1/$(tenant_id)s'.format(
|
||||
canonical_url(CONFIGS, INTERNAL),
|
||||
config('api-listening-port')
|
||||
)
|
||||
admin_url = '{}:{}/v1/$(tenant_id)s'.format(
|
||||
canonical_url(CONFIGS, ADMIN),
|
||||
config('api-listening-port')
|
||||
)
|
||||
settings = {
|
||||
'region': None,
|
||||
'service': None,
|
||||
'public_url': None,
|
||||
'internal_url': None,
|
||||
'admin_url': None,
|
||||
'cinder_region': config('region'),
|
||||
'cinder_service': 'cinder',
|
||||
'cinder_public_url': public_url,
|
||||
'cinder_internal_url': internal_url,
|
||||
'cinder_admin_url': admin_url,
|
||||
}
|
||||
if CompareOpenStackReleases(os_release('cinder-common')) < 'pike':
|
||||
public_url = '{}:{}/v1/$(tenant_id)s'.format(
|
||||
canonical_url(CONFIGS, PUBLIC),
|
||||
config('api-listening-port')
|
||||
)
|
||||
internal_url = '{}:{}/v1/$(tenant_id)s'.format(
|
||||
canonical_url(CONFIGS, INTERNAL),
|
||||
config('api-listening-port')
|
||||
)
|
||||
admin_url = '{}:{}/v1/$(tenant_id)s'.format(
|
||||
canonical_url(CONFIGS, ADMIN),
|
||||
config('api-listening-port')
|
||||
)
|
||||
settings.update({
|
||||
'region': None,
|
||||
'service': None,
|
||||
'public_url': None,
|
||||
'internal_url': None,
|
||||
'admin_url': None,
|
||||
'cinder_region': config('region'),
|
||||
'cinder_service': 'cinder',
|
||||
'cinder_public_url': public_url,
|
||||
'cinder_internal_url': internal_url,
|
||||
'cinder_admin_url': admin_url,
|
||||
})
|
||||
if CompareOpenStackReleases(os_release('cinder-common')) >= 'icehouse':
|
||||
# NOTE(jamespage) register v2 endpoint as well
|
||||
public_url = '{}:{}/v2/$(tenant_id)s'.format(
|
||||
|
@ -546,16 +546,6 @@ class TestJoinedHooks(CharmTestCase):
|
||||
_canonical_url.return_value = 'http://cindernode1'
|
||||
hooks.hooks.execute(['hooks/identity-service-relation-joined'])
|
||||
expected = {
|
||||
'region': None,
|
||||
'service': None,
|
||||
'public_url': None,
|
||||
'internal_url': None,
|
||||
'admin_url': None,
|
||||
'cinder_service': 'cinder',
|
||||
'cinder_region': 'RegionOne',
|
||||
'cinder_public_url': 'http://cindernode1:8776/v1/$(tenant_id)s',
|
||||
'cinder_admin_url': 'http://cindernode1:8776/v1/$(tenant_id)s',
|
||||
'cinder_internal_url': 'http://cindernode1:8776/v1/$(tenant_id)s',
|
||||
'cinderv2_service': 'cinderv2',
|
||||
'cinderv2_region': 'RegionOne',
|
||||
'cinderv2_public_url': 'http://cindernode1:8776/v2/$(tenant_id)s',
|
||||
|
Loading…
x
Reference in New Issue
Block a user