components/ruby/puppet-modules/openstack-cinder/files/volume/zfssa_iscsi.pp
branchs11u3-sru
changeset 6035 c9748fcc32de
equal deleted inserted replaced
6016:a477397bba8b 6035:c9748fcc32de
       
     1 # == Class: cinder::volume::zfssa_iscsi
       
     2 #
       
     3 # Setup Cinder wth the volume ZFSSA iSCSI driver
       
     4 #
       
     5 # === Parameters
       
     6 #
       
     7 # [*hostname*]
       
     8 #   (required) Hostname of ZFS Storage Appliance.
       
     9 #
       
    10 # [*login*]
       
    11 #   (required) Username to login to ZFS Storage Appliance.
       
    12 #
       
    13 # [*password*]
       
    14 #   (required) Password for user in *login*.
       
    15 #
       
    16 # [*zfssa_pool*]
       
    17 #   (required) Storage pool name
       
    18 #
       
    19 # [*zfssa_target_portal*]
       
    20 #   (required) Address of the iSCSI target portal in IP:port format.
       
    21 #
       
    22 # [*zfssa_target_interfaces*]
       
    23 #   (required) Interface names where iSCSI targets are available.
       
    24 #   Example:
       
    25 #   "e1000g0,vnic1"
       
    26 #
       
    27 # [*zfssa_project*]
       
    28 #   (optional) Project name in *zfssa_pool*. Defaults to 'default'.
       
    29 #
       
    30 # [*zfssa_initiator*]
       
    31 #   (optional) iSCSI initator name. Requires setting *zfssa_initiator_group*
       
    32 #
       
    33 # [*zfssa_initiator_group*]
       
    34 #   (optional) iSCSI initiator group name. Required if *zfssa_initiator* is set.
       
    35 #
       
    36 # [*zfssa_initiator_config*]
       
    37 #   (optional) iSCSI initator configuration.
       
    38 #
       
    39 # [*zfssa_initiator_user*]
       
    40 #   (optional) CHAP user name for the iSCSI initator. Requires setting
       
    41 #     *zfssa_initiator_password*
       
    42 #
       
    43 # [*zfssa_initiator_password*]
       
    44 #   (optional) CHAP password. Required if *zfssa_initiator_user* is set.
       
    45 #
       
    46 # [*zfssa_target_group*]
       
    47 #   (optional) iSCSI target group name.
       
    48 #
       
    49 # [*zfssa_target_user*]
       
    50 #   (optional) CHAP user name for the iSCSI target. Requires setting
       
    51 #     *zfssa_target_password*
       
    52 #
       
    53 # [*zfssa_target_password*]
       
    54 #   (optional) CHAP password. Required if *zfssa_target_user* is set.
       
    55 #
       
    56 # [*zfssa_lun_volblocksize*]
       
    57 #   (optional) Volume block size. Valid sizes are 512, 1k, 2k, 4k, 8k,
       
    58 #     16k, 32k, 64k, 128k. Default is 8k
       
    59 #
       
    60 # [*zfssa_lun_sparse*]
       
    61 #   (optional) Flag to enable sparse allocation (thin-provisioning).
       
    62 #   Default is False.
       
    63 #
       
    64 # [*zfssa_lun_compression*]
       
    65 #   (optional) Data compression to use on the lun. Valid values are off, lzjb,
       
    66 #    gzip, gzip-2, gzip-9.
       
    67 #
       
    68 # [*zfssa_lun_logbias*]
       
    69 #   (optional) Synchronous log bias. Valid values are latency, throughput.
       
    70 #
       
    71 # [*extra_options*]
       
    72 #   (optional) Hash of extra options to pass to the backend stanza
       
    73 #   Defaults to: {}
       
    74 #   Example :
       
    75 #     { 'zfssa_param' => { 'value' => value1 } }
       
    76 
       
    77 class cinder::volume::zfssa_iscsi(
       
    78   $hostname,
       
    79   $login,
       
    80   $password,
       
    81   $zfssa_pool,
       
    82   $zfssa_target_portal,
       
    83   $zfssa_target_interfaces,
       
    84   $zfssa_project             = undef,
       
    85   $zfssa_initiator           = undef,
       
    86   $zfssa_initiator_group     = undef,
       
    87   $zfssa_initiator_config    = undef,
       
    88   $zfssa_initiator_user      = undef,
       
    89   $zfssa_initiator_password  = undef,
       
    90   $zfssa_target_group        = undef,
       
    91   $zfssa_target_user         = undef,
       
    92   $zfssa_target_password     = undef,
       
    93   $zfssa_lun_volblocksize    = undef,
       
    94   $zfssa_lun_sparse          = undef,
       
    95   $zfssa_lun_compression     = undef,
       
    96   $zfssa_lun_logbias         = undef,
       
    97   $zfssa_rest_timeout        = undef,
       
    98   $extra_options       = {},
       
    99 ) {
       
   100 
       
   101   cinder::backend::zfssa_iscsi { 'DEFAULT':
       
   102     hostname                 => $hostname,
       
   103     login                    => $login,
       
   104     password                 => $password,
       
   105     zfssa_pool               => $zfssa_pool,
       
   106     zfssa_project            => $zfssa_project,
       
   107     zfssa_lun_volblocksize   => $zfssa_lun_volblocksize,
       
   108     zfssa_lun_sparse         => $zfssa_lun_sparse,
       
   109     zfssa_lun_compression    => $zfssa_lun_compresssion,
       
   110     zfssa_lun_logbias        => $zfssa_lun_logbias,
       
   111     zfssa_initiator_group    => $zfssa_initiator_group,
       
   112     zfssa_initiator          => $zfssa_initiator,
       
   113     zfssa_initiator_user     => $zfssa_initiator_user,
       
   114     zfssa_initiator_password => $zfssa_initiator_password,
       
   115     zfssa_initiator_config   => $zfssa_initiator_config,
       
   116     zfssa_target_group       => $zfssa_target_group,
       
   117     zfssa_target_user        => $zfssa_target_user,
       
   118     zfssa_target_password    => $zfssa_target_password,
       
   119     zfssa_target_portal      => $zfssa_target_portal,
       
   120     zfssa_target_interfaces  => $zfssa_target_interfaces,
       
   121     zfssa_rest_timeout       => $zfssa_rest_timeout,
       
   122     extra_options            => $extra_options
       
   123   }
       
   124 }
       
   125