diff --git a/manifests/backend/nexenta.pp b/manifests/backend/nexenta.pp index 981ce34c..501d5093 100644 --- a/manifests/backend/nexenta.pp +++ b/manifests/backend/nexenta.pp @@ -18,19 +18,32 @@ # Defaults to: $name # # [*nexenta_volume*] -# (optional) Pool on SA that will hold all volumes. Defaults to 'cinder'. +# (optional) Pool on SA that will hold all volumes. +# Defaults to 'cinder'. # # [*nexenta_target_prefix*] -# (optional) IQN prefix for iSCSI targets. Defaults to 'iqn:'. +# (optional) IQN prefix for iSCSI targets. +# Defaults to 'iqn:'. # # [*nexenta_target_group_prefix*] -# (optional) Prefix for iSCSI target groups on SA. Defaults to 'cinder/'. +# (optional) Prefix for iSCSI target groups on SA. +# Defaults to 'cinder/'. # # [*nexenta_blocksize*] -# (optional) Block size for volumes. Defaults to '8k'. +# (optional) Block size for volumes. +# Defaults to '8192'. # # [*nexenta_sparse*] -# (optional) Flag to create sparse volumes. Defaults to true. +# (optional) Flag to create sparse volumes. +# Defaults to true. +# +# [*nexenta_rest_port*] +# (optional) HTTP port for REST API. +# Defaults to '8457'. +# +# [*volume_driver*] +# (required) Nexenta driver to use. +# Defaults to: 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver'. # # [*manage_volume_type*] # (Optional) Whether or not manage Cinder Volume type. @@ -52,8 +65,10 @@ define cinder::backend::nexenta ( $nexenta_volume = 'cinder', $nexenta_target_prefix = 'iqn:', $nexenta_target_group_prefix = 'cinder/', - $nexenta_blocksize = '8k', + $nexenta_blocksize = '8192', $nexenta_sparse = true, + $nexenta_rest_port = '8457', + $volume_driver = 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver', $manage_volume_type = false, $extra_options = {}, ) { @@ -70,7 +85,8 @@ define cinder::backend::nexenta ( "${name}/nexenta_target_group_prefix": value => $nexenta_target_group_prefix; "${name}/nexenta_blocksize": value => $nexenta_blocksize; "${name}/nexenta_sparse": value => $nexenta_sparse; - "${name}/volume_driver": value => 'cinder.volume.drivers.nexenta.volume.NexentaDriver'; + "${name}/nexenta_rest_port": value => $nexenta_rest_port; + "${name}/volume_driver": value => $volume_driver; } if $manage_volume_type { diff --git a/manifests/volume/nexenta.pp b/manifests/volume/nexenta.pp index 76a128a8..c0c109a7 100644 --- a/manifests/volume/nexenta.pp +++ b/manifests/volume/nexenta.pp @@ -14,19 +14,32 @@ # (required) IP address of Nexenta SA. # # [*nexenta_volume*] -# (optional) Pool on SA that will hold all volumes. Defaults to 'cinder'. +# (optional) Pool on SA that will hold all volumes. +# Defaults to 'cinder'. # # [*nexenta_target_prefix*] -# (optional) IQN prefix for iSCSI targets. Defaults to 'iqn:'. +# (optional) IQN prefix for iSCSI targets. +# Defaults to 'iqn:'. # # [*nexenta_target_group_prefix*] -# (optional) Prefix for iSCSI target groups on SA. Defaults to 'cinder/'. +# (optional) Prefix for iSCSI target groups on SA. +# Defaults to 'cinder/'. # # [*nexenta_blocksize*] -# (optional) Block size for volumes. Defaults to '8k'. +# (optional) Block size for volumes. +# Defaults to '8k'. # # [*nexenta_sparse*] -# (optional) Flag to create sparse volumes. Defaults to true. +# (optional) Flag to create sparse volumes. +# Defaults to true. +# +# [*nexenta_rest_port*] +# (optional) HTTP port for REST API. +# Defaults to '8457'. +# +# [*volume_driver*] +# (required) Nexenta driver to use. +# Defaults to: 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver'. # # [*extra_options*] # (optional) Hash of extra options to pass to the backend stanza @@ -41,8 +54,10 @@ class cinder::volume::nexenta ( $nexenta_volume = 'cinder', $nexenta_target_prefix = 'iqn:', $nexenta_target_group_prefix = 'cinder/', - $nexenta_blocksize = '8k', + $nexenta_blocksize = '8192', $nexenta_sparse = true, + $nexenta_rest_port = '8457', + $volume_driver = 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver', $extra_options = {}, ) { @@ -60,6 +75,8 @@ cinder::backend::nexenta instead.') nexenta_target_group_prefix => $nexenta_target_group_prefix, nexenta_blocksize => $nexenta_blocksize, nexenta_sparse => $nexenta_sparse, + nexenta_rest_port => $nexenta_rest_port, + volume_driver => $volume_driver, extra_options => $extra_options, } } diff --git a/releasenotes/notes/nexenta-params-update-2411fefa01ee20aa.yaml b/releasenotes/notes/nexenta-params-update-2411fefa01ee20aa.yaml new file mode 100644 index 00000000..6aabc00a --- /dev/null +++ b/releasenotes/notes/nexenta-params-update-2411fefa01ee20aa.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - allow to configure previously hardcoded parameter + and add more options in nexenta backend. diff --git a/spec/classes/cinder_volume_nexenta_spec.rb b/spec/classes/cinder_volume_nexenta_spec.rb index c1196576..f515f55c 100644 --- a/spec/classes/cinder_volume_nexenta_spec.rb +++ b/spec/classes/cinder_volume_nexenta_spec.rb @@ -16,13 +16,15 @@ describe 'cinder::volume::nexenta' do { :nexenta_volume => 'cinder', :nexenta_target_prefix => 'iqn:', :nexenta_target_group_prefix => 'cinder/', - :nexenta_blocksize => '8k', - :nexenta_sparse => true } + :nexenta_blocksize => '8192', + :nexenta_sparse => true, + :nexenta_rest_port => '8457', + :volume_driver => 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver' } end let :facts do - { :osfamily => 'Debian' } + OSDefaults.get_facts({}) end diff --git a/spec/defines/cinder_backend_nexenta_spec.rb b/spec/defines/cinder_backend_nexenta_spec.rb index 54a4fd05..0e467961 100644 --- a/spec/defines/cinder_backend_nexenta_spec.rb +++ b/spec/defines/cinder_backend_nexenta_spec.rb @@ -16,12 +16,14 @@ describe 'cinder::backend::nexenta' do { :nexenta_volume => 'cinder', :nexenta_target_prefix => 'iqn:', :nexenta_target_group_prefix => 'cinder/', - :nexenta_blocksize => '8k', - :nexenta_sparse => true } + :nexenta_blocksize => '8192', + :nexenta_sparse => true, + :nexenta_rest_port => '8457', + :volume_driver => 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver' } end let :facts do - { :osfamily => 'Debian' } + OSDefaults.get_facts({}) end