Allow san_password attribute for svc driver
* add san_password= for storwize * remove unused san_password attributes, get_password method is used * add tests for password both storewize and solidfire Change-Id: I4afde431332ca914d078bc3e30362ef22961016f Closes-Bug: #1384085
This commit is contained in:
@@ -14,6 +14,7 @@ This file is used to list changes made in each version of the openstack-block-st
|
|||||||
* Add default_volume_type config option
|
* Add default_volume_type config option
|
||||||
* Update gpfs volume driver path and fix gpfs_images_share_mode initialization
|
* Update gpfs volume driver path and fix gpfs_images_share_mode initialization
|
||||||
* Change to cinder v2 service and endpoint
|
* Change to cinder v2 service and endpoint
|
||||||
|
* Add support for san_password with ibm.storwize_svc.StorwizeSVCDriver
|
||||||
|
|
||||||
## 10.0.0
|
## 10.0.0
|
||||||
* Upgrading to Juno
|
* Upgrading to Juno
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ default['openstack']['block-storage']['service_role'] = 'admin'
|
|||||||
default['openstack']['block-storage']['san']['san_ip'] = '127.0.0.1'
|
default['openstack']['block-storage']['san']['san_ip'] = '127.0.0.1'
|
||||||
default['openstack']['block-storage']['san']['san_login'] = 'admin'
|
default['openstack']['block-storage']['san']['san_login'] = 'admin'
|
||||||
default['openstack']['block-storage']['san']['san_private_key'] = '/v7000_rsa'
|
default['openstack']['block-storage']['san']['san_private_key'] = '/v7000_rsa'
|
||||||
default['openstack']['block-storage']['san']['san_password'] = 'san_password'
|
|
||||||
|
|
||||||
# NFS support
|
# NFS support
|
||||||
default['openstack']['block-storage']['nfs']['nas_ip'] = '127.0.0.1'
|
default['openstack']['block-storage']['nfs']['nas_ip'] = '127.0.0.1'
|
||||||
@@ -180,7 +179,6 @@ default['openstack']['block-storage']['storwize']['storwize_svc_multihostmap_ena
|
|||||||
# SolidFire Support
|
# SolidFire Support
|
||||||
default['openstack']['block-storage']['solidfire']['san_ip'] = node['openstack']['block-storage']['san']['san_ip']
|
default['openstack']['block-storage']['solidfire']['san_ip'] = node['openstack']['block-storage']['san']['san_ip']
|
||||||
default['openstack']['block-storage']['solidfire']['san_login'] = node['openstack']['block-storage']['san']['san_login']
|
default['openstack']['block-storage']['solidfire']['san_login'] = node['openstack']['block-storage']['san']['san_login']
|
||||||
default['openstack']['block-storage']['solidfire']['san_password'] = node['openstack']['block-storage']['san']['san_password']
|
|
||||||
default['openstack']['block-storage']['solidfire']['sf_emulate'] = 'False'
|
default['openstack']['block-storage']['solidfire']['sf_emulate'] = 'False'
|
||||||
default['openstack']['block-storage']['solidfire']['iscsi_ip_prefix'] = nil
|
default['openstack']['block-storage']['solidfire']['iscsi_ip_prefix'] = nil
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ elsif mq_service_type == 'qpid'
|
|||||||
end
|
end
|
||||||
|
|
||||||
case node['openstack']['block-storage']['volume']['driver']
|
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']
|
||||||
when 'cinder.volume.drivers.solidfire.SolidFire'
|
when 'cinder.volume.drivers.solidfire.SolidFire'
|
||||||
solidfire_pass = get_password 'user', node['openstack']['block-storage']['solidfire']['san_login']
|
solidfire_pass = get_password 'user', node['openstack']['block-storage']['solidfire']['san_login']
|
||||||
when 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver'
|
when 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver'
|
||||||
@@ -101,6 +103,7 @@ template '/etc/cinder/cinder.conf' do
|
|||||||
glance_port: glance_api_endpoint.port,
|
glance_port: glance_api_endpoint.port,
|
||||||
ibmnas_pass: ibmnas_pass,
|
ibmnas_pass: ibmnas_pass,
|
||||||
solidfire_pass: solidfire_pass,
|
solidfire_pass: solidfire_pass,
|
||||||
|
storwize_pass: storwize_pass,
|
||||||
volume_api_bind_address: cinder_api_bind.host,
|
volume_api_bind_address: cinder_api_bind.host,
|
||||||
volume_api_bind_port: cinder_api_bind.port,
|
volume_api_bind_port: cinder_api_bind.port,
|
||||||
vmware_host_pass: vmware_host_pass,
|
vmware_host_pass: vmware_host_pass,
|
||||||
|
|||||||
@@ -564,6 +564,7 @@ describe 'openstack-block-storage::cinder-common' do
|
|||||||
it 'has a default attribute' do
|
it 'has a default attribute' do
|
||||||
%w(san_ip=127.0.0.1
|
%w(san_ip=127.0.0.1
|
||||||
san_login=admin
|
san_login=admin
|
||||||
|
san_password=test_pass
|
||||||
san_private_key=/v7000_rsa
|
san_private_key=/v7000_rsa
|
||||||
storwize_svc_volpool_name=volpool
|
storwize_svc_volpool_name=volpool
|
||||||
storwize_svc_vol_rsize=2
|
storwize_svc_vol_rsize=2
|
||||||
@@ -642,6 +643,10 @@ describe 'openstack-block-storage::cinder-common' do
|
|||||||
expect(chef_run).to render_file(file.name).with_content(/^sf_emulate_512=test$/)
|
expect(chef_run).to render_file(file.name).with_content(/^sf_emulate_512=test$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'has solidfire password' do
|
||||||
|
expect(chef_run).to render_file(file.name).with_content(/^san_password=test_pass$/)
|
||||||
|
end
|
||||||
|
|
||||||
%w(san_login san_ip).each do |attr|
|
%w(san_login san_ip).each do |attr|
|
||||||
it "has solidfire #{attr} set" do
|
it "has solidfire #{attr} set" do
|
||||||
node.set['openstack']['block-storage']['solidfire'][attr] = "solidfire_#{attr}_value"
|
node.set['openstack']['block-storage']['solidfire'][attr] = "solidfire_#{attr}_value"
|
||||||
|
|||||||
@@ -48,9 +48,6 @@ shared_context 'block-storage-stubs' do
|
|||||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||||
.with('user', 'guest')
|
.with('user', 'guest')
|
||||||
.and_return('mq-pass')
|
.and_return('mq-pass')
|
||||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
|
||||||
.with('user', 'solidfire_admin')
|
|
||||||
.and_return('solidfire_testpass')
|
|
||||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||||
.with('service', 'netapp')
|
.with('service', 'netapp')
|
||||||
.and_return 'netapp-pass'
|
.and_return 'netapp-pass'
|
||||||
|
|||||||
@@ -744,6 +744,10 @@ san_login=<%= node["openstack"]["block-storage"]["storwize"]["san_login"] %>
|
|||||||
san_private_key=<%= node["openstack"]["block-storage"]["storwize"]["san_private_key"] %>
|
san_private_key=<%= node["openstack"]["block-storage"]["storwize"]["san_private_key"] %>
|
||||||
#### (StrOpt) Filename of private key to use for SSH authentication
|
#### (StrOpt) Filename of private key to use for SSH authentication
|
||||||
|
|
||||||
|
san_password=<%= @storwize_pass %>
|
||||||
|
#### (StrOpt) Password for SAN controller
|
||||||
|
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
# san_thin_provision=true
|
# san_thin_provision=true
|
||||||
#### (BoolOpt) Use thin provisioning for SAN volumes?
|
#### (BoolOpt) Use thin provisioning for SAN volumes?
|
||||||
|
|||||||
Reference in New Issue
Block a user