Merge "add support of NetApp driver"
This commit is contained in:
commit
7075b77e7d
@ -50,11 +50,23 @@ $use_syslog = hiera('use_syslog')
|
||||
|
||||
$public_ssl = hiera_hash('public_ssl', {})
|
||||
|
||||
$fuel_manila_hash = hiera_hash('fuel-plugin-manila', {})
|
||||
$use_generic = $fuel_manila_hash['use-generic-driver']
|
||||
$use_netapp = $fuel_manila_hash['use-netapp-driver']
|
||||
|
||||
if $use_netapp and $use_generic {
|
||||
$shared_backends = 'generic,cdotMultipleSVM'
|
||||
}
|
||||
elsif $use_netapp {
|
||||
$shared_backends = 'cdotMultipleSVM'
|
||||
}
|
||||
else {
|
||||
$shared_backends = 'generic'
|
||||
}
|
||||
|
||||
class {'::manila_auxiliary':
|
||||
sql_connection => $sql_conn,
|
||||
shared_backends => 'generic', #should be array of backends
|
||||
shared_backends => $shared_backends,
|
||||
amqp_durable_queues => 'False',
|
||||
rabbit_userid => $amqp_user,
|
||||
rabbit_hosts => $amqp_hosts,
|
||||
|
@ -17,22 +17,41 @@ notify {'MODULAR: fuel-plugin-manila/start_share': }
|
||||
$srv = 'manila-share'
|
||||
$desc = 'manila-share service'
|
||||
|
||||
$fuel_manila_hash = hiera_hash('fuel-plugin-manila', {})
|
||||
$manila = hiera_hash('manila', {})
|
||||
$image = $manila['service_vm_image']['img_name']
|
||||
$share_driver = 'manila.share.drivers.generic.GenericShareDriver'
|
||||
|
||||
$backends = {'generic' =>
|
||||
|
||||
if $fuel_manila_hash['use-generic-driver'] {
|
||||
$generic_share_driver = 'manila.share.drivers.generic.GenericShareDriver'
|
||||
$generic_backends = {'generic' =>
|
||||
{'share_backend_name' => 'generic',
|
||||
'driver_handles_share_servers' => 'true',
|
||||
'share_driver' => $share_driver,
|
||||
'share_driver' => $generic_share_driver,
|
||||
'service_instance_user' => 'manila',
|
||||
'service_instance_password' => 'manila',
|
||||
'service_image_name' => $image,
|
||||
'path_to_private_key' => '/var/lib/astute/manila/manila',
|
||||
'path_to_public_key' => '/var/lib/astute/manila/manila.pub',
|
||||
}
|
||||
}
|
||||
create_resources('::manila_auxiliary::backend::generic', $generic_backends)
|
||||
}
|
||||
|
||||
if $fuel_manila_hash['use-netapp-driver'] {
|
||||
$netapp_backends = {'cdotMultipleSVM' =>
|
||||
{'netapp_transport_type' => $fuel_manila_hash['netapp-proto'],
|
||||
'netapp_server_hostname' => $fuel_manila_hash['netapp-host'],
|
||||
'netapp_server_port' => $fuel_manila_hash['netapp-port'],
|
||||
'netapp_login' => $fuel_manila_hash['netapp-user'],
|
||||
'netapp_password' => $fuel_manila_hash['netapp-pass'],
|
||||
'netapp_root_volume_aggregate' => $fuel_manila_hash['netapp-root_volume_aggregate'],
|
||||
'netapp_port_name_search_pattern' => $fuel_manila_hash['netapp-port_name_search_pattern'],
|
||||
'netapp_aggregate_name_search_pattern' => $fuel_manila_hash['netapp_aggregate_name_search_pattern'],
|
||||
}
|
||||
}
|
||||
create_resources('::manila_auxiliary::backend::netapp', $netapp_backends)
|
||||
}
|
||||
|
||||
$inits = {
|
||||
'manila-share' => {
|
||||
@ -41,7 +60,7 @@ $inits = {
|
||||
}
|
||||
|
||||
create_resources('::manila_auxiliary::initd', $inits)
|
||||
create_resources('::manila_auxiliary::backend::generic', $backends)
|
||||
|
||||
|
||||
service { 'manila-share':
|
||||
ensure => 'running',
|
||||
|
@ -0,0 +1,29 @@
|
||||
define manila_auxiliary::backend::netapp (
|
||||
$share_driver = 'manila.share.drivers.netapp.common.NetAppDriver',
|
||||
$driver_handles_share_servers = 'True',
|
||||
$netapp_storage_family = 'ontap_cluster',
|
||||
$netapp_server_hostname = undef,
|
||||
$netapp_server_port = '80',
|
||||
$netapp_login = undef,
|
||||
$netapp_password = undef,
|
||||
$netapp_transport_type = 'https',
|
||||
$netapp_root_volume_aggregate = 'aggr1',
|
||||
$netapp_aggregate_name_search_pattern = '^((?!aggr0).)*$',
|
||||
$netapp_port_name_search_pattern = '^(e0a)$',
|
||||
) {
|
||||
|
||||
manila_config {
|
||||
"${name}/share_backend_name": value => $name;
|
||||
"${name}/share_driver": value => $share_driver;
|
||||
"${name}/driver_handles_share_servers": value => $driver_handles_share_servers;
|
||||
"${name}/netapp_storage_family": value => $netapp_storage_family;
|
||||
"${name}/netapp_server_hostname": value => $netapp_server_hostname;
|
||||
"${name}/netapp_server_port": value => $netapp_server_port;
|
||||
"${name}/netapp_login": value => $netapp_login;
|
||||
"${name}/netapp_password": value => $netapp_password;
|
||||
"${name}/netapp_transport_type": value => $netapp_transport_type;
|
||||
"${name}/netapp_root_volume_aggregate": value => $netapp_root_volume_aggregate;
|
||||
"${name}/netapp_aggregate_name_search_pattern": value => $netapp_aggregate_name_search_pattern;
|
||||
"${name}/netapp_port_name_search_pattern": value => $netapp_port_name_search_pattern;
|
||||
}~>Service['manila-share']
|
||||
}
|
@ -28,9 +28,19 @@ attributes:
|
||||
label: 'Use the NetApp driver'
|
||||
description: 'Use the NetApp onTap storage as a backend for manila shares'
|
||||
|
||||
netapp-host:
|
||||
netapp-proto:
|
||||
type: 'text'
|
||||
weight: 31
|
||||
value: '443'
|
||||
label: 'NetApp transport type'
|
||||
description: 'Transport protocol for communicating with the storage system'
|
||||
restrictions:
|
||||
- condition: "settings:fuel-plugin-manila.use-netapp-driver.value != true"
|
||||
action: hide
|
||||
|
||||
netapp-host:
|
||||
type: 'text'
|
||||
weight: 32
|
||||
label: 'NetApp server hostname'
|
||||
description: 'Set the address, port and protocol for to the server access'
|
||||
value: ""
|
||||
@ -38,9 +48,18 @@ attributes:
|
||||
- condition: "settings:fuel-plugin-manila.use-netapp-driver.value != true"
|
||||
action: hide
|
||||
|
||||
netapp-port:
|
||||
type: 'text'
|
||||
weight: 33
|
||||
value: 'http'
|
||||
label: 'NetApp server port'
|
||||
restrictions:
|
||||
- condition: "settings:fuel-plugin-manila.use-netapp-driver.value != true"
|
||||
action: hide
|
||||
|
||||
netapp-user:
|
||||
type: 'text'
|
||||
weight: 32
|
||||
weight: 34
|
||||
label: 'NetApp server username'
|
||||
description: 'Set the username for to the server access'
|
||||
value: ""
|
||||
@ -49,7 +68,7 @@ attributes:
|
||||
action: hide
|
||||
netapp-pass:
|
||||
type: 'text'
|
||||
weight: 33
|
||||
weight: 35
|
||||
label: 'NetApp server password'
|
||||
description: 'Set the password for to the server access'
|
||||
value: ""
|
||||
@ -59,7 +78,7 @@ attributes:
|
||||
|
||||
netapp-root_volume_aggregate:
|
||||
type: 'text'
|
||||
weight: 34
|
||||
weight: 36
|
||||
label: 'NetApp root volume aggregate'
|
||||
description: 'Set the parameter netapp_root_volume_aggregate'
|
||||
value: 'aggr1'
|
||||
@ -69,7 +88,7 @@ attributes:
|
||||
|
||||
netapp-aggregate_name_search_pattern:
|
||||
type: 'text'
|
||||
weight: 35
|
||||
weight: 37
|
||||
label: 'NetApp search pattern for aggregation names'
|
||||
description: 'Set the parameter netapp_aggregate_name_search_pattern'
|
||||
value: '^((?!aggr0).)*$'
|
||||
@ -79,7 +98,7 @@ attributes:
|
||||
|
||||
netapp-port_name_search_pattern:
|
||||
type: 'text'
|
||||
weight: 35
|
||||
weight: 38
|
||||
label: 'NetApp search pattern for storage port names'
|
||||
description: 'Set the parameter netapp_port_name_search_pattern'
|
||||
value: '^(e0a)$'
|
||||
|
Loading…
Reference in New Issue
Block a user