components/ruby/puppet-modules/openstack-ironic/files/solaris_ipmitool.pp
changeset 5464 6e2e17e6aa45
child 7584 65eec8af934c
equal deleted inserted replaced
5463:245bdc05448a 5464:6e2e17e6aa45
       
     1 #
       
     2 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
       
     3 #
       
     4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
       
     5 # not use this file except in compliance with the License. You may obtain
       
     6 # a copy of the License at
       
     7 #
       
     8 #      http://www.apache.org/licenses/LICENSE-2.0
       
     9 #
       
    10 # Unless required by applicable law or agreed to in writing, software
       
    11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
       
    12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
       
    13 # License for the specific language governing permissions and limitations
       
    14 # under the License.
       
    15 
       
    16 # Configure the solaris_ipmitool driver in Ironic
       
    17 #
       
    18 # === Parameters
       
    19 #
       
    20 # [*server*]
       
    21 #   Host name for AI Server
       
    22 #
       
    23 # [*username*]
       
    24 #   Username to ssh to AI Server.
       
    25 #
       
    26 # [*password*]
       
    27 #   (optional) If ssh_key_file or ssh_key_contents are set, this
       
    28 #   config setting is used to provide the passphrase if required. If
       
    29 #   an encrypted key is used, set this to the passphrase.
       
    30 #
       
    31 # [*port*]
       
    32 #   (optional) SSH port to use
       
    33 #   Defaults to '22'
       
    34 #
       
    35 # [*timeout*]
       
    36 #   (optional) SSH socket timeout value in seconds.
       
    37 #   Defaults to '10'
       
    38 #
       
    39 # [*deploy_interval*]
       
    40 #   (optional) Interval in seconds to check AI deployment status.
       
    41 #   Defaults to '10'
       
    42 #
       
    43 # [*derivied_manifest*]
       
    44 #   (optional) Derived Manifest used for deployment.
       
    45 #   Defaults to 'file:///usr/lib/ironic/ironic-manifest.ksh'
       
    46 #
       
    47 # [*ssh_key_file*]
       
    48 #   (optional) SSH keyfile to use
       
    49 #
       
    50 # [*ssh_key_contents*]
       
    51 #   (optional) SSH key to use
       
    52 #
       
    53 # [*imagecache_dirname*]
       
    54 #   (optional) Default path to image cache
       
    55 #   Defaults to '/var/lib/ironic/images'
       
    56 #
       
    57 # [*imagecache_lock_timeout*]
       
    58 #   (optional) Timeout to wait when attempting to lock refcount file.
       
    59 #   Defaults to '60' seconds
       
    60 #
       
    61 class ironic::drivers::solaris_ipmitool (
       
    62   $server,
       
    63   $username,
       
    64   $password             = undef,
       
    65   $port                 = '22',
       
    66   $timeout              = '10',
       
    67   $deploy_interval      = '10',
       
    68   $dervied_manifest     = 'file:///usr/lib/ironic/ironic-manifest.ksh',
       
    69   $ssh_key_file         = undef,
       
    70   $ssh_key_contents     = undef,
       
    71   $imagecache_dirname   = '/var/lib/ironic/images',
       
    72   $imagecache_lock_timeout     = '60',
       
    73 ) {
       
    74 
       
    75   # Configure ironic.conf
       
    76   ironic_config {
       
    77     'ai/server': value                            => $server;
       
    78     'ai/username': value                          => $username;
       
    79     'ai/password': value                          => $password;
       
    80     'ai/port': value                              => $port;
       
    81     'ai/timeout': value                           => $timeout;
       
    82     'ai/deploy_interval': value                   => $deploy_intervael;
       
    83     'ai/derived_manifest': value                  => $derived_manifest;
       
    84     'ai/ssh_key_file': value                      => $ssh_key_file;
       
    85     'ai/ssh_key_contents': value                  => $ssh_key_contents;
       
    86     'solaris_ipmi/imagecache_dirname': value      => $imagecache_dirname;
       
    87     'solaris_ipmi/imagecache_lock_timeout': value => $imagecache_lock_timeout;
       
    88   }
       
    89 }