Make enable v1 and v2 api option configurable
Change-Id: I40efdc8c31dc38f214cc300cc68279af1b614089 Closes-Bug: #1452730
This commit is contained in:
parent
b4ae9f3dec
commit
2ea252646d
|
@ -142,6 +142,8 @@ Cinder attributes
|
||||||
* `openstack["block-storage"]["rpc_conn_pool_size"]` - Size of RPC connection pool
|
* `openstack["block-storage"]["rpc_conn_pool_size"]` - Size of RPC connection pool
|
||||||
* `openstack["block-storage"]["rpc_response_timeout"]` - Seconds to wait for a response from call or multicall
|
* `openstack["block-storage"]["rpc_response_timeout"]` - Seconds to wait for a response from call or multicall
|
||||||
* `openstack["block-storage"]["misc_cinder"] - Array of strings to be added to cinder.conf for misc options, e.g. ['# Comment', 'key=value']
|
* `openstack["block-storage"]["misc_cinder"] - Array of strings to be added to cinder.conf for misc options, e.g. ['# Comment', 'key=value']
|
||||||
|
* `openstack["block-storage"]["enable_v1_api"]` - Whether to enable cinder v1 api or not.
|
||||||
|
* `openstack["block-storage"]["enable_v2_api"]` - Whether to enable cinder v2 api or not.
|
||||||
|
|
||||||
### Storwize/SVC attributes ###
|
### Storwize/SVC attributes ###
|
||||||
* `openstack['block-storage']['san']['san_ip'] - IP address of SAN controller
|
* `openstack['block-storage']['san']['san_ip'] - IP address of SAN controller
|
||||||
|
|
|
@ -322,6 +322,12 @@ default['openstack']['block-storage']['misc_cinder'] = []
|
||||||
default['openstack']['block-storage']['lock_path'] =
|
default['openstack']['block-storage']['lock_path'] =
|
||||||
"#{node['openstack']['block-storage']['volume']['state_path']}/lock"
|
"#{node['openstack']['block-storage']['volume']['state_path']}/lock"
|
||||||
|
|
||||||
|
# Whether to enable cinder v1 api or not
|
||||||
|
default['openstack']['block-storage']['enable_v1_api'] = 'False'
|
||||||
|
|
||||||
|
# Whether to enable cinder v2 api or not
|
||||||
|
default['openstack']['block-storage']['enable_v2_api'] = 'True'
|
||||||
|
|
||||||
case platform_family
|
case platform_family
|
||||||
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||||
# operating system user and group names
|
# operating system user and group names
|
||||||
|
|
|
@ -341,8 +341,17 @@ describe 'openstack-block-storage::cinder-common' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has default api version set' do
|
it 'has default api version set' do
|
||||||
[/^enable_v1_api=false$/,
|
[/^enable_v1_api=False$/,
|
||||||
/^enable_v2_api=true$/].each do |line|
|
/^enable_v2_api=True$/].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', line)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'has override api version set' do
|
||||||
|
node.set['openstack']['block-storage']['enable_v1_api'] = 'True'
|
||||||
|
node.set['openstack']['block-storage']['enable_v2_api'] = 'False'
|
||||||
|
[/^enable_v1_api=True$/,
|
||||||
|
/^enable_v2_api=False$/].each do |line|
|
||||||
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', line)
|
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -53,10 +53,10 @@ log_file = /var/log/cinder/cinder.log
|
||||||
#### (StrOpt) File name for the paste.deploy config for cinder-api
|
#### (StrOpt) File name for the paste.deploy config for cinder-api
|
||||||
|
|
||||||
# DEPRECATED: Deploy v1 of the Cinder API. (boolean value)
|
# DEPRECATED: Deploy v1 of the Cinder API. (boolean value)
|
||||||
enable_v1_api=false
|
enable_v1_api=<%= node["openstack"]["block-storage"]["enable_v1_api"] %>
|
||||||
|
|
||||||
# Deploy v2 of the Cinder API. (boolean value)
|
# Deploy v2 of the Cinder API. (boolean value)
|
||||||
enable_v2_api=true
|
enable_v2_api=<%= node["openstack"]["block-storage"]["enable_v2_api"] %>
|
||||||
|
|
||||||
# pybasedir=/usr/lib/python/site-packages
|
# pybasedir=/usr/lib/python/site-packages
|
||||||
#### (StrOpt) Directory where the cinder python module is installed
|
#### (StrOpt) Directory where the cinder python module is installed
|
||||||
|
|
Loading…
Reference in New Issue