Adding support for netapp NFS direct driver
This commit adds support for the 7mode NFS direct driver. Changed the 'if driver' to a case, somewhat based off the rcbops cinder-volume recipe. if the NFS driver is chosen, the volume recipe will install the nfs client package, setup a mountpoint a shares config file, and setups cinder.conf accordingly Change-Id: Ia8d4c31235426614a317729494569062a23a05bf
This commit is contained in:
@@ -28,11 +28,29 @@ describe "openstack-block-storage::volume" do
|
||||
expect(@chef_run).to upgrade_package "tgt"
|
||||
end
|
||||
|
||||
it "installs nfs packages" do
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||
n.set["openstack"]["block-storage"]["volume"]["driver"] = "cinder.volume.drivers.netapp.nfs.NetAppDirect7modeNfsDriver"
|
||||
end
|
||||
chef_run.converge "openstack-block-storage::volume"
|
||||
|
||||
expect(chef_run).to upgrade_package "nfs-common"
|
||||
end
|
||||
|
||||
it "creates the nfs mount point" do
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||
n.set["openstack"]["block-storage"]["volume"]["driver"] = "cinder.volume.drivers.netapp.nfs.NetAppDirect7modeNfsDriver"
|
||||
end
|
||||
chef_run.converge "openstack-block-storage::volume"
|
||||
|
||||
expect(chef_run).to create_directory "/mnt/cinder-volumes"
|
||||
end
|
||||
|
||||
it "configures netapp dfm password" do
|
||||
::Chef::Recipe.any_instance.stub(:service_password).with("netapp").
|
||||
and_return "netapp-pass"
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||
n.set["openstack"]["block-storage"]["volume"]["driver"] = "cinder.volume.drivers.netapp.NetAppISCSIDriver"
|
||||
n.set["openstack"]["block-storage"]["volume"]["driver"] = "cinder.volume.drivers.netapp.iscsi.NetAppISCSIDriver"
|
||||
end
|
||||
chef_run.converge "openstack-block-storage::volume"
|
||||
n = chef_run.node["openstack"]["block-storage"]["netapp"]["dfm_password"]
|
||||
|
||||
Reference in New Issue
Block a user