Password should be secured

Change-Id: Iee879506b769294639b80a1ba64e93ae3a37ae0a
Closes-Bug: #1676708
This commit is contained in:
ZhongShengping 2017-03-28 17:36:43 +08:00
parent 69e1fc4705
commit 8529eaa97d
7 changed files with 52 additions and 55 deletions

View File

@ -98,26 +98,26 @@
# netapp_storage_family => 'ontap_cluster',
# netapp_transport_type => 'https',
# }
#
define manila::backend::netapp (
$driver_handles_share_servers,
$netapp_login,
$netapp_password,
$netapp_server_hostname,
$share_backend_name = $name,
$netapp_transport_type = 'http',
$netapp_storage_family = 'ontap_cluster',
$netapp_server_port = undef,
$netapp_volume_name_template = 'share_%(share_id)s',
$netapp_vserver = undef,
$netapp_vserver_name_template = 'os_%s',
$netapp_lif_name_template = 'os_%(net_allocation_id)s',
$netapp_aggregate_name_search_pattern = '(.*)',
$netapp_root_volume_aggregate = undef,
$netapp_root_volume_name = 'root',
$netapp_port_name_search_pattern = '(.*)',
$netapp_trace_flags = undef,
$package_ensure = 'present',
$share_backend_name = $name,
$netapp_transport_type = 'http',
$netapp_storage_family = 'ontap_cluster',
$netapp_server_port = undef,
$netapp_volume_name_template = 'share_%(share_id)s',
$netapp_vserver = undef,
$netapp_vserver_name_template = 'os_%s',
$netapp_lif_name_template = 'os_%(net_allocation_id)s',
$netapp_aggregate_name_search_pattern = '(.*)',
$netapp_root_volume_aggregate = undef,
$netapp_root_volume_name = 'root',
$netapp_port_name_search_pattern = '(.*)',
$netapp_trace_flags = undef,
$package_ensure = 'present',
) {
include ::manila::deps

View File

@ -51,13 +51,13 @@ class manila::compute::nova (
) {
manila_config {
'DEFAULT/nova_catalog_info': value => $nova_catalog_info;
'DEFAULT/nova_catalog_admin_info': value => $nova_catalog_admin_info;
'DEFAULT/nova_ca_certificates_file':value => $nova_ca_certificates_file;
'DEFAULT/nova_api_insecure': value => $nova_api_insecure;
'DEFAULT/nova_admin_username': value => $nova_admin_username;
'DEFAULT/nova_admin_password': value => $nova_admin_password;
'DEFAULT/nova_admin_tenant_name': value => $nova_admin_tenant_name;
'DEFAULT/nova_admin_auth_url': value => $nova_admin_auth_url;
'DEFAULT/nova_catalog_info': value => $nova_catalog_info;
'DEFAULT/nova_catalog_admin_info': value => $nova_catalog_admin_info;
'DEFAULT/nova_ca_certificates_file': value => $nova_ca_certificates_file;
'DEFAULT/nova_api_insecure': value => $nova_api_insecure;
'DEFAULT/nova_admin_username': value => $nova_admin_username;
'DEFAULT/nova_admin_password': value => $nova_admin_password, secret => true;
'DEFAULT/nova_admin_tenant_name': value => $nova_admin_tenant_name;
'DEFAULT/nova_admin_auth_url': value => $nova_admin_auth_url;
}
}

View File

@ -36,7 +36,6 @@
# (optional) Location of ca certificates file to use for
# neutron client requests.
#
class manila::network::neutron (
$neutron_url = 'http://127.0.0.1:9696',
$neutron_url_timeout = 30,
@ -57,7 +56,7 @@ class manila::network::neutron (
'DEFAULT/neutron_url': value => $neutron_url;
'DEFAULT/neutron_url_timeout': value => $neutron_url_timeout;
'DEFAULT/neutron_admin_username': value => $neutron_admin_username;
'DEFAULT/neutron_admin_password': value => $neutron_admin_password;
'DEFAULT/neutron_admin_password': value => $neutron_admin_password, secret => true;
'DEFAULT/neutron_admin_tenant_name': value => $neutron_admin_tenant_name;
'DEFAULT/neutron_region_name': value => $neutron_region_name;
'DEFAULT/neutron_admin_auth_url': value => $neutron_admin_auth_url;

View File

@ -44,7 +44,6 @@
# hitachi_hnas_file_system_name => 'FS-Manila',
# }
#
class manila::share::hitachi_hnas (
$hitachi_hnas_username,
$hitachi_hnas_password,

View File

@ -89,24 +89,23 @@
# netapp_transport_type => 'https',
# }
#
class manila::share::netapp (
$driver_handles_share_servers,
$netapp_login,
$netapp_password,
$netapp_server_hostname,
$netapp_transport_type = 'http',
$netapp_storage_family = 'ontap_cluster',
$netapp_server_port = undef,
$netapp_volume_name_template = 'share_%(share_id)s',
$netapp_vserver = undef,
$netapp_vserver_name_template = 'os_%s',
$netapp_lif_name_template = 'os_%(net_allocation_id)s',
$netapp_aggregate_name_search_pattern = '(.*)',
$netapp_root_volume_aggregate = undef,
$netapp_root_volume_name = 'root',
$netapp_port_name_search_pattern = '(.*)',
$netapp_trace_flags = undef,
$netapp_transport_type = 'http',
$netapp_storage_family = 'ontap_cluster',
$netapp_server_port = undef,
$netapp_volume_name_template = 'share_%(share_id)s',
$netapp_vserver = undef,
$netapp_vserver_name_template = 'os_%s',
$netapp_lif_name_template = 'os_%(net_allocation_id)s',
$netapp_aggregate_name_search_pattern = '(.*)',
$netapp_root_volume_aggregate = undef,
$netapp_root_volume_name = 'root',
$netapp_port_name_search_pattern = '(.*)',
$netapp_trace_flags = undef,
) {
manila::backend::netapp { 'DEFAULT':

View File

@ -45,15 +45,15 @@
# Defaults to 'http://localhost:5000/v2.0'
#
class manila::volume::cinder (
$cinder_catalog_info = 'volume:cinder:publicURL',
$cinder_catalog_info = 'volume:cinder:publicURL',
$cinder_ca_certificates_file = undef,
$cinder_http_retries = 3,
$cinder_api_insecure = false,
$cinder_cross_az_attach = true,
$cinder_admin_username = 'cinder',
$cinder_admin_password = undef,
$cinder_admin_tenant_name = 'service',
$cinder_admin_auth_url = 'http://localhost:5000/v2.0',
$cinder_http_retries = 3,
$cinder_api_insecure = false,
$cinder_cross_az_attach = true,
$cinder_admin_username = 'cinder',
$cinder_admin_password = undef,
$cinder_admin_tenant_name = 'service',
$cinder_admin_auth_url = 'http://localhost:5000/v2.0',
) {
manila_config {
@ -63,7 +63,7 @@ manila_config {
'DEFAULT/cinder_api_insecure': value => $cinder_api_insecure;
'DEFAULT/cinder_cross_az_attach': value => $cinder_cross_az_attach;
'DEFAULT/cinder_admin_username': value => $cinder_admin_username;
'DEFAULT/cinder_admin_password': value => $cinder_admin_password;
'DEFAULT/cinder_admin_password': value => $cinder_admin_password, secret => true;
'DEFAULT/cinder_admin_tenant_name': value => $cinder_admin_tenant_name;
'DEFAULT/cinder_admin_auth_url': value => $cinder_admin_auth_url;
}

View File

@ -4,13 +4,13 @@ describe 'manila::share::hitachi_hnas' do
let :params do
{
:driver_handles_share_servers => false,
:hitachi_hnas_ip => '172.24.44.15',
:hitachi_hnas_username => 'supervisor',
:hitachi_hnas_password => 'supervisor',
:hitachi_hnas_evs_id => '1',
:hitachi_hnas_evs_ip => ' 172.24.53.1',
:hitachi_hnas_file_system_name => 'FS-Manila',
:driver_handles_share_servers => false,
:hitachi_hnas_ip => '172.24.44.15',
:hitachi_hnas_username => 'supervisor',
:hitachi_hnas_password => 'supervisor',
:hitachi_hnas_evs_id => '1',
:hitachi_hnas_evs_ip => ' 172.24.53.1',
:hitachi_hnas_file_system_name => 'FS-Manila',
}
end