Merge "Allow storwize private key without san_login and san_password"
This commit is contained in:
commit
e726f9b93f
|
@ -16,6 +16,7 @@ This file is used to list changes made in each version of the openstack-block-st
|
|||
* Change to cinder v2 service and endpoint
|
||||
* Add support for san_password with ibm.storwize_svc.StorwizeSVCDriver
|
||||
* Add glance_api_version config option
|
||||
* Allow san_private_key to be used instead of san_login for Storwize
|
||||
|
||||
## 10.0.0
|
||||
* Upgrading to Juno
|
||||
|
|
|
@ -164,6 +164,7 @@ default['openstack']['block-storage']['nfs']['nfs_sparsed_volumes'] = 'true'
|
|||
# Storwize/SVC Support
|
||||
default['openstack']['block-storage']['storwize']['san_ip'] = node['openstack']['block-storage']['san']['san_ip']
|
||||
default['openstack']['block-storage']['storwize']['san_login'] = node['openstack']['block-storage']['san']['san_login']
|
||||
# If the key is set to nil, the san_login and san_password will be used.
|
||||
default['openstack']['block-storage']['storwize']['san_private_key'] = node['openstack']['block-storage']['san']['san_private_key']
|
||||
default['openstack']['block-storage']['storwize']['storwize_svc_volpool_name'] = 'volpool'
|
||||
default['openstack']['block-storage']['storwize']['storwize_svc_vol_rsize'] = 2
|
||||
|
|
|
@ -47,7 +47,9 @@ end
|
|||
|
||||
case node['openstack']['block-storage']['volume']['driver']
|
||||
when 'cinder.volume.drivers.ibm.storwize_svc.StorwizeSVCDriver'
|
||||
storwize_pass = get_password 'user', node['openstack']['block-storage']['storwize']['san_login']
|
||||
if node['openstack']['block-storage']['storwize']['san_private_key'].to_s.empty?
|
||||
storwize_pass = get_password 'user', node['openstack']['block-storage']['storwize']['san_login']
|
||||
end
|
||||
when 'cinder.volume.drivers.solidfire.SolidFire'
|
||||
solidfire_pass = get_password 'user', node['openstack']['block-storage']['solidfire']['san_login']
|
||||
when 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver'
|
||||
|
|
|
@ -567,8 +567,6 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
|
||||
it 'has a default attribute' do
|
||||
%w(san_ip=127.0.0.1
|
||||
san_login=admin
|
||||
san_password=test_pass
|
||||
san_private_key=/v7000_rsa
|
||||
storwize_svc_volpool_name=volpool
|
||||
storwize_svc_vol_rsize=2
|
||||
|
@ -588,7 +586,6 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
|
||||
it 'has a overridden attribute' do
|
||||
%w(san_ip
|
||||
san_login
|
||||
san_private_key
|
||||
storwize_svc_volpool_name
|
||||
storwize_svc_vol_rsize
|
||||
|
@ -606,6 +603,17 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'storwize with login and password' do
|
||||
it 'has a login and password' do
|
||||
node.set['openstack']['block-storage']['storwize']['san_private_key'] = ''
|
||||
%w(san_login=admin
|
||||
san_password=test_pass
|
||||
san_private_key=).each do |attr|
|
||||
expect(chef_run).to render_file(file.name).with_content(/^#{attr}$/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'storwize with iSCSI connection protocol' do
|
||||
before do
|
||||
node.set['openstack']['block-storage']['storwize']['storwize_svc_connection_protocol'] = 'iSCSI'
|
||||
|
|
|
@ -737,48 +737,19 @@ nfs_sparsed_volumes=<%= node["openstack"]["block-storage"]["ibmnas"]["nfs_sparse
|
|||
######## defined in cinder.volume.san ########
|
||||
|
||||
<% if @enabled_drivers.include?("cinder.volume.drivers.ibm.storwize_svc.StorwizeSVCDriver") %>
|
||||
|
||||
san_ip=<%= node["openstack"]["block-storage"]["storwize"]["san_ip"] %>
|
||||
#### (StrOpt) IP address of SAN controller
|
||||
|
||||
<% if node['openstack']['block-storage']['storwize']['san_private_key'].to_s.empty? %>
|
||||
san_login=<%= node["openstack"]["block-storage"]["storwize"]["san_login"] %>
|
||||
#### (StrOpt) Username for SAN controller
|
||||
|
||||
san_private_key=<%= node["openstack"]["block-storage"]["storwize"]["san_private_key"] %>
|
||||
#### (StrOpt) Filename of private key to use for SSH authentication
|
||||
|
||||
san_password=<%= @storwize_pass %>
|
||||
#### (StrOpt) Password for SAN controller
|
||||
<% end %>
|
||||
|
||||
|
||||
<% else %>
|
||||
# san_thin_provision=true
|
||||
#### (BoolOpt) Use thin provisioning for SAN volumes?
|
||||
|
||||
# san_ip=
|
||||
#### (StrOpt) IP address of SAN controller
|
||||
|
||||
# san_login=admin
|
||||
#### (StrOpt) Username for SAN controller
|
||||
|
||||
# san_password=
|
||||
#### (StrOpt) Password for SAN controller
|
||||
|
||||
# san_private_key=
|
||||
san_private_key=<%= node["openstack"]["block-storage"]["storwize"]["san_private_key"] %>
|
||||
#### (StrOpt) Filename of private key to use for SSH authentication
|
||||
|
||||
# san_clustername=
|
||||
#### (StrOpt) Cluster name to use for creating volumes
|
||||
|
||||
# san_ssh_port=22
|
||||
#### (IntOpt) SSH port to use with SAN
|
||||
|
||||
# san_is_local=false
|
||||
#### (BoolOpt) Execute commands locally instead of over SSH; use if the
|
||||
#### volume service is running on the SAN device
|
||||
|
||||
# san_zfs_volume_base=rpool/
|
||||
#### (StrOpt) The ZFS path under which to create zvols for volumes.
|
||||
<% end %>
|
||||
|
||||
<% if @enabled_drivers.include?("cinder.volume.drivers.solidfire.SolidFire") %>
|
||||
|
|
Loading…
Reference in New Issue