~fuel-plugin-cinder-netapp-team/fuel-plugin-cinder-netapp/master

« back to all changes in this revision

Viewing changes to deployment_scripts/puppet/modules/plugin_cinder_netapp/manifests/params.pp

  • Committer: Andrey Volochay
  • Date: 2016-04-13 10:39:23 UTC
  • Revision ID: git-v1:d15dbb3704b05de3745d81b0bd71a11e1c733682
Add MOS 8.0 support

 - The plugin has been totally refactored to accordance with changes in
   OpenStack Liberty and MOS 8.0
 - All documented features of NetApp Cinder Driver are configurable
 - Plugin can change Cinder settings after deployment with wrong
   parameters. It requires manual actions
 - Defined type (backend::netapp) form upstream puppet cinder module is
   not used because is outdated and doesn't support last changes in
   Cinder NetApp driver
 - Added a tasks that deletes not existed cinder services

Change-Id: Ic70ad0a99c41860502e15fe8671e6ca3f11e9f58

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
class plugin_cinder_netapp::params {
2
 
 
3
 
  include cinder::params
4
 
 
5
 
  $cinder_hash  = $::fuel_settings['cinder']
6
 
  $storage_hash = $::fuel_settings['storage']
7
 
 
8
 
  case $::osfamily {
9
 
    'Debian': {
10
 
      package { 'nfs-common':
11
 
        before => Cinder::Backend::Netapp['cinder_netapp'],
12
 
      }
13
 
    }
14
 
    'RedHat': {
15
 
      package { 'nfs-utils': } ->
16
 
      service {'rpcbind':
17
 
        ensure => running,
18
 
      } ->
19
 
      service {'rpcidmapd':
20
 
        ensure => running,
21
 
      } ->
22
 
      service {'nfs':
23
 
        ensure => running,
24
 
        before => Cinder::Backend::Netapp['cinder_netapp'],
25
 
      }
26
 
    }
27
 
    default: {
28
 
      fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports osfamily RedHat and Debian")
29
 
    }
30
 
  }
31
 
  if ($storage_hash['volumes_lvm']) {
32
 
    $backends      = 'cinder_iscsi'
33
 
    $backend_class = 'plugin_cinder_netapp::backend::iscsi'
34
 
  } elsif ($storage_hash['volumes_ceph']) {
35
 
    $backends      = 'cinder_rbd'
36
 
    $backend_class = 'plugin_cinder_netapp::backend::rbd'
37
 
  }
 
1
class plugin_cinder_netapp::params (
 
2
) {
 
3
 
 
4
  $cinder_netapp = hiera_hash('cinder_netapp', {})
 
5
  $storage_hash  = hiera_hash('storage_hash', {})
 
6
 
 
7
  if ($storage_hash['volume_backend_names']['volumes_lvm']) {
 
8
    $backend_type        = $storage_hash['volume_backend_names']['volumes_lvm']
 
9
    $backend_name        = 'cinder_iscsi'
 
10
    $volume_backend_name = 'volumes_lvm'
 
11
    $backend_class       = 'plugin_cinder_netapp::backend::iscsi'
 
12
  } elsif ($storage_hash['volume_backend_names']['volumes_ceph']) {
 
13
    $backend_type        = $storage_hash['volume_backend_names']['volumes_ceph']
 
14
    $backend_name        = 'cinder_rbd'
 
15
    $volume_backend_name = 'volumes_ceph'
 
16
    $backend_class       = 'plugin_cinder_netapp::backend::rbd'
 
17
  }
 
18
 
38
19
}