Add IBMNAS driver configuration flags

- Add support for IBMNAS volume driver configuration flags.
(nfs_shares_config, nfs_sparsed_volumes, nfs_mount_point_base
nas_ip, nas_login, nas_password)
- Add initialization of nfs_mount_point_base directory,
nfs_shares_config with proper owner and permission settings.
- Updated README.md with ibmnas attributes

Change-Id: I88607740963916ccc26daee5873cca532b00a434
Implements: blueprint ibmnas-chef-support
This commit is contained in:
Sasikanth Eda
2014-03-17 15:00:24 +05:30
committed by Sasikanth
parent 5cdb6ba827
commit 5103ccd784
10 changed files with 195 additions and 0 deletions

View File

@@ -52,6 +52,36 @@ describe 'openstack-block-storage::volume' do
expect(chef_run).to upgrade_package 'python-pywbem'
end
context 'IBMNAS Driver' do
let(:file) { chef_run.template('/etc/cinder/nfs_shares.conf') }
before do
node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver'
node.set['openstack']['block-storage']['ibmnas']['nas_access_ip'] = '127.0.0.1'
node.set['openstack']['block-storage']['ibmnas']['export'] = '/ibm/fs/export'
end
it 'creates IBMNAS shares_config file' do
expect(chef_run).to create_template(file.name).with(
owner: 'cinder',
group: 'cinder',
mode: '0600'
)
expect(chef_run).to render_file(file.name).with_content('127.0.0.1:/ibm/fs/export')
end
it 'installs nfs packages' do
expect(chef_run).to upgrade_package 'nfs-common'
end
it 'creates the nfs mount point' do
expect(chef_run).to create_directory('/mnt/cinder-volumes').with(
owner: 'cinder',
group: 'cinder',
mode: '0755'
)
end
end
context 'NetApp Driver' do
describe 'NFS' do
before do