X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fcinder%2Fmanifests%2Ftype_set.pp;fp=3rdparty%2Fmodules%2Fcinder%2Fmanifests%2Ftype_set.pp;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=5b57453736dff4d63118938107b4843e7d2fda1b;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/cinder/manifests/type_set.pp b/3rdparty/modules/cinder/manifests/type_set.pp deleted file mode 100644 index 5b5745373..000000000 --- a/3rdparty/modules/cinder/manifests/type_set.pp +++ /dev/null @@ -1,65 +0,0 @@ -# ==Define: cinder::type_set -# -# Assigns keys after the volume type is set. -# -# === Parameters -# -# [*os_password*] -# (required) The keystone tenant:username password. -# -# [*type*] -# (required) Accepts single name of type to set. -# -# [*key*] -# (required) the key name that we are setting the value for. -# -# [*os_tenant_name*] -# (optional) The keystone tenant name. Defaults to 'admin'. -# -# [*os_username*] -# (optional) The keystone user name. Defaults to 'admin. -# -# [*os_auth_url*] -# (optional) The keystone auth url. Defaults to 'http://127.0.0.1:5000/v2.0/'. -# -# [*os_region_name*] -# (optional) The keystone region name. Default is unset. -# -# Author: Andrew Woodward - - -define cinder::type_set ( - $type, - $key, - $os_password, - $os_tenant_name = 'admin', - $os_username = 'admin', - $os_auth_url = 'http://127.0.0.1:5000/v2.0/', - $os_region_name = undef, - ) { - -# TODO: (xarses) This should be moved to a ruby provider so that among other -# reasons, the credential discovery magic can occur like in neutron. - - $cinder_env = [ - "OS_TENANT_NAME=${os_tenant_name}", - "OS_USERNAME=${os_username}", - "OS_PASSWORD=${os_password}", - "OS_AUTH_URL=${os_auth_url}", - ] - - if $os_region_name { - $region_env = ["OS_REGION_NAME=${os_region_name}"] - } - else { - $region_env = [] - } - - exec {"cinder type-key ${type} set ${key}=${name}": - path => ['/usr/bin', '/bin'], - command => "cinder type-key ${type} set ${key}=${name}", - unless => "cinder extra-specs-list | grep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'", - environment => concat($cinder_env, $region_env), - require => Package['python-cinderclient'] - } -}