Register cinder v2 service and endpoint to support recent nova changes

Recently nova merged commit https://review.openstack.org/#/c/124468/
have switch to use cinder v2. Block-storage cookbook need to be updated
for this change.

Compute cookbook already updated to adopt v2 from commit:
https://review.openstack.org/#/c/133908/

This commit will depends on common cookbook:
https://review.openstack.org/#/c/134275/

Change-Id: I096b4015f637d2df811cf9abb4d7233f706ce8d1
This commit is contained in:
ZHU ZHU 2014-11-13 10:14:28 -06:00
parent cf9ec63b94
commit 87865791ea
3 changed files with 26 additions and 25 deletions

View File

@ -13,6 +13,7 @@ This file is used to list changes made in each version of the openstack-block-st
* Add glance_ca_certificates_file
* Add default_volume_type config option
* Update gpfs volume driver path and fix gpfs_images_share_mode initialization
* Change to cinder v2 service and endpoint
## 10.0.0
* Upgrading to Juno

View File

@ -45,12 +45,12 @@ openstack_identity_register 'Register Service Tenant' do
action :create_tenant
end
openstack_identity_register 'Register Cinder Volume Service' do
openstack_identity_register 'Register Cinder V2 Volume Service' do
auth_uri auth_uri
bootstrap_token bootstrap_token
service_name 'cinder'
service_type 'volume'
service_description 'Cinder Volume Service'
service_name 'cinderv2'
service_type 'volumev2'
service_description 'Cinder Volume Service V2'
endpoint_region region
endpoint_adminurl ::URI.decode cinder_api_endpoint.to_s
endpoint_internalurl ::URI.decode cinder_api_endpoint.to_s
@ -58,12 +58,12 @@ openstack_identity_register 'Register Cinder Volume Service' do
action :create_service
end
openstack_identity_register 'Register Cinder Volume Endpoint' do
openstack_identity_register 'Register Cinder V2 Volume Endpoint' do
auth_uri auth_uri
bootstrap_token bootstrap_token
service_name 'cinder'
service_type 'volume'
service_description 'Cinder Volume Service'
service_name 'cinderv2'
service_type 'volumev2'
service_description 'Cinder Volume Service V2'
endpoint_region region
endpoint_adminurl ::URI.decode cinder_api_endpoint.to_s
endpoint_internalurl ::URI.decode cinder_api_endpoint.to_s

View File

@ -23,43 +23,43 @@ describe 'openstack-block-storage::identity_registration' do
)
end
it 'registers cinder volume service' do
it 'registers cinder v2 volume service' do
expect(chef_run).to create_service_openstack_identity_register(
'Register Cinder Volume Service'
'Register Cinder V2 Volume Service'
).with(
auth_uri: 'http://127.0.0.1:35357/v2.0',
bootstrap_token: 'bootstrap-token',
service_name: 'cinder',
service_type: 'volume',
service_description: 'Cinder Volume Service',
service_name: 'cinderv2',
service_type: 'volumev2',
service_description: 'Cinder Volume Service V2',
endpoint_region: 'RegionOne',
endpoint_adminurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
endpoint_internalurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
endpoint_publicurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s'
endpoint_adminurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
endpoint_internalurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
endpoint_publicurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s'
)
end
context 'registers volume endpoint' do
context 'registers v2 volume endpoint' do
it 'with default values' do
expect(chef_run).to create_endpoint_openstack_identity_register(
'Register Cinder Volume Endpoint'
'Register Cinder V2 Volume Endpoint'
).with(
auth_uri: 'http://127.0.0.1:35357/v2.0',
bootstrap_token: 'bootstrap-token',
service_name: 'cinder',
service_type: 'volume',
service_description: 'Cinder Volume Service',
service_name: 'cinderv2',
service_type: 'volumev2',
service_description: 'Cinder Volume Service V2',
endpoint_region: 'RegionOne',
endpoint_adminurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
endpoint_internalurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
endpoint_publicurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s'
endpoint_adminurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
endpoint_internalurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
endpoint_publicurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s'
)
end
it 'with custom region override' do
node.set['openstack']['block-storage']['region'] = 'volumeRegion'
expect(chef_run).to create_endpoint_openstack_identity_register(
'Register Cinder Volume Endpoint'
'Register Cinder V2 Volume Endpoint'
).with(endpoint_region: 'volumeRegion')
end
end