Update netapp cinder configuration

The upstream puppet-cinder modules have been updated to remove
deprecated paramters. We were still passing in deprecated options for
the netapp volume. This change ports the backwards compatibility that
was being done in puppet-cinder into puppet-tripleo. This should be
dropped in a later cycle.

Change-Id: I08f548c7784f4e00add26aafc26a9671f503bb97
Closes-Bug: #1773188
This commit is contained in:
Alex Schultz 2018-05-24 08:56:28 -06:00 committed by Emilien Macchi
parent 19114034ea
commit b2d7cab5f1
2 changed files with 43 additions and 22 deletions

View File

@ -38,29 +38,41 @@ class tripleo::profile::base::cinder::volume::netapp (
$cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
}
# fallback logic for search patterns since upstream puppet-cinder removed
# these. See I286a593f0e68dc9e60852674d2fa14551acb1bbb from puppet-cinder
$list = join(any2array(delete(delete_undef_values([
hiera('cinder::backend::netapp::netapp_storage_pools', undef),
hiera('cinder::backend::netapp::netapp_volume_list', undef),
]), '')),'|')
if $list != '' {
$netapp_pool_name_search_pattern_fallback = "(${list})"
} else {
$netapp_pool_name_search_pattern_fallback = undef
}
cinder::backend::netapp { $backend_name :
netapp_login => hiera('cinder::backend::netapp::netapp_login', undef),
netapp_password => hiera('cinder::backend::netapp::netapp_password', undef),
netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef),
netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef),
netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef),
netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef),
netapp_volume_list => hiera('cinder::backend::netapp::netapp_volume_list', undef),
netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef),
netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
nfs_shares => $cinder_netapp_nfs_shares,
nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef),
netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef),
netapp_storage_pools => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
netapp_eseries_host_type => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
nas_secure_file_operations => hiera('cinder::backend::netapp::nas_secure_file_operations', undef),
nas_secure_file_permissions => hiera('cinder::backend::netapp::nas_secure_file_permissions', undef),
netapp_login => hiera('cinder::backend::netapp::netapp_login', undef),
netapp_password => hiera('cinder::backend::netapp::netapp_password', undef),
netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef),
netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef),
netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef),
netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef),
netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef),
netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
nfs_shares => $cinder_netapp_nfs_shares,
nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef),
netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef),
netapp_host_type => hiera('cinder::backend::netapp::netapp_host_type',
hiera('cinder::backend::netapp::netapp_eseries_host_type', undef)),
netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
nas_secure_file_operations => hiera('cinder::backend::netapp::nas_secure_file_operations', undef),
nas_secure_file_permissions => hiera('cinder::backend::netapp::nas_secure_file_permissions', undef),
netapp_pool_name_search_pattern => hiera('cinder::backend::netapp::netapp_pool_name_search_pattern',
$netapp_pool_name_search_pattern_fallback),
}
}

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
The following hieradata updates for cinder netapp integration should be done.
cinder::backend::netapp::netapp_pool_name_search_pattern should be used as
cinder::backend::netapp::netapp_storage_pools and
cinder::backend::netapp::netapp_volume_list have been removed.
cinder::backend::netapp::netapp_host_type should be configured instead of
cinder::backend::netapp::netapp_eseries_host_type