Support more clients configurations
This change introduces support for [clients] parameters and [clients_<service>] parameters, which determine behavior of service clients used by heat for communication with the OpenStack services. - Implementation of heat::clients::<service> are generally same. Only cinder, heat, keystone and nova provides additional parameters. - The existing parameters in the base heat class are deprecated in favor of the new classes. Change-Id: Icdf4f0201dd1e5f93a450473709851977ec20034
This commit is contained in:
parent
e7cefc1ae0
commit
0d043d793f
47
manifests/clients.pp
Normal file
47
manifests/clients.pp
Normal file
@ -0,0 +1,47 @@
|
||||
# Class heat::clients
|
||||
#
|
||||
# default client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
$endpoint_type_real = pick($::heat::heat_clients_endpoint_type, $endpoint_type)
|
||||
|
||||
heat::clients::base { 'clients':
|
||||
endpoint_type => $endpoint_type_real,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/aodh.pp
Normal file
45
manifests/clients/aodh.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::aodh
|
||||
#
|
||||
# aodh client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::aodh (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_aodh':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/barbican.pp
Normal file
45
manifests/clients/barbican.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::barbican
|
||||
#
|
||||
# barbican client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::barbican (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_barbican':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
50
manifests/clients/base.pp
Normal file
50
manifests/clients/base.pp
Normal file
@ -0,0 +1,50 @@
|
||||
# Define heat::clients::base
|
||||
#
|
||||
# common client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*section*]
|
||||
# (Optional) Section name used to configure parameters.
|
||||
# Defaults to $name.
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
define heat::clients::base (
|
||||
$section = $name,
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat_config {
|
||||
"${section}/endpoint_type": value => $endpoint_type;
|
||||
"${section}/ca_file": value => $ca_file;
|
||||
"${section}/cert_file": value => $cert_file;
|
||||
"${section}/key_file": value => $key_file;
|
||||
"${section}/insecure": value => $insecure;
|
||||
}
|
||||
}
|
54
manifests/clients/cinder.pp
Normal file
54
manifests/clients/cinder.pp
Normal file
@ -0,0 +1,54 @@
|
||||
# Class heat::clients::cinder
|
||||
#
|
||||
# cinder client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*http_log_debug*]
|
||||
# (Optional) Allow client's debug log output.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::cinder (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
$http_log_debug = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_cinder':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'clients_cinder/http_log_debug': value => $http_log_debug;
|
||||
}
|
||||
}
|
45
manifests/clients/designate.pp
Normal file
45
manifests/clients/designate.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::designate
|
||||
#
|
||||
# designate client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::designate (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_designate':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/glance.pp
Normal file
45
manifests/clients/glance.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::glance
|
||||
#
|
||||
# glance client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::glance (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_glance':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
56
manifests/clients/heat.pp
Normal file
56
manifests/clients/heat.pp
Normal file
@ -0,0 +1,56 @@
|
||||
# Class heat::clients::heat
|
||||
#
|
||||
# heat client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*url*]
|
||||
# (Optional) Optional heat url in format.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::heat (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
$url = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
$url_real = pick($::heat::heat_clients_url, $url)
|
||||
|
||||
heat::clients::base { 'clients_heat':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'clients_heat/url': value => $url_real;
|
||||
}
|
||||
}
|
54
manifests/clients/keystone.pp
Normal file
54
manifests/clients/keystone.pp
Normal file
@ -0,0 +1,54 @@
|
||||
# Class heat::clients::keystone
|
||||
#
|
||||
# keystone client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_uri*]
|
||||
# (Optional) Unversioned keystone url.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::keystone (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
$auth_uri = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_keystone':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'clients_keystone/auth_uri': value => $auth_uri;
|
||||
}
|
||||
}
|
45
manifests/clients/magnum.pp
Normal file
45
manifests/clients/magnum.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::magnum
|
||||
#
|
||||
# magnum client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::magnum (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_magnum':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/manila.pp
Normal file
45
manifests/clients/manila.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::manila
|
||||
#
|
||||
# manila client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::manila (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_manila':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/mistral.pp
Normal file
45
manifests/clients/mistral.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::mistral
|
||||
#
|
||||
# mistral client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::mistral (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_mistral':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/neutron.pp
Normal file
45
manifests/clients/neutron.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::neutron
|
||||
#
|
||||
# neutron client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::neutron (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_neutron':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
54
manifests/clients/nova.pp
Normal file
54
manifests/clients/nova.pp
Normal file
@ -0,0 +1,54 @@
|
||||
# Class heat::clients::nova
|
||||
#
|
||||
# nova client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*http_log_debug*]
|
||||
# (Optional) Allow client's debug log output.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::nova (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
$http_log_debug = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_nova':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'clients_nova/http_log_debug': value => $http_log_debug;
|
||||
}
|
||||
}
|
45
manifests/clients/octavia.pp
Normal file
45
manifests/clients/octavia.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::octavia
|
||||
#
|
||||
# octavia client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::octavia (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_octavia':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/sahara.pp
Normal file
45
manifests/clients/sahara.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::sahara
|
||||
#
|
||||
# sahara client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::sahara (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_sahara':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/swift.pp
Normal file
45
manifests/clients/swift.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::swift
|
||||
#
|
||||
# swift client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::swift (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_swift':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/trove.pp
Normal file
45
manifests/clients/trove.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::trove
|
||||
#
|
||||
# trove client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::trove (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_trove':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/vitrage.pp
Normal file
45
manifests/clients/vitrage.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::vitrage
|
||||
#
|
||||
# vitrage client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::vitrage (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_vitrage':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
45
manifests/clients/zaqar.pp
Normal file
45
manifests/clients/zaqar.pp
Normal file
@ -0,0 +1,45 @@
|
||||
# Class heat::clients::zaqar
|
||||
#
|
||||
# zaqar client configuration
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*endpoint_type*]
|
||||
# (Optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (Optional) Optional CA cert file to use in SSL communications.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (Optional) Optional PEM-formatted certificate chain file.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*key_file*]
|
||||
# (Optional) Optional PEM-formatted file that contains the private key.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If set, then the server's certificate will not be verified.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class heat::clients::zaqar (
|
||||
$endpoint_type = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$insecure = $::os_service_default,
|
||||
) {
|
||||
|
||||
include heat::deps
|
||||
|
||||
heat::clients::base { 'clients_zaqar':
|
||||
endpoint_type => $endpoint_type,
|
||||
ca_file => $ca_file,
|
||||
cert_file => $cert_file,
|
||||
key_file => $key_file,
|
||||
insecure => $insecure,
|
||||
}
|
||||
}
|
@ -217,15 +217,6 @@
|
||||
# (Optional) Set max request body size
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*heat_clients_url*]
|
||||
# (optional) Heat url in format like http://0.0.0.0:8004/v1/%(tenant_id)s.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*heat_clients_endpoint_type*]
|
||||
# (optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*purge_config*]
|
||||
# (optional) Whether to set only the specified config options
|
||||
# in the heat config.
|
||||
@ -252,6 +243,15 @@
|
||||
# time.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*heat_clients_url*]
|
||||
# (optional) Heat url in format like http://0.0.0.0:8004/v1/%(tenant_id)s.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*heat_clients_endpoint_type*]
|
||||
# (optional) Type of endpoint in Identity service catalog to use for
|
||||
# communication with the OpenStack service.
|
||||
# Defaults to undef
|
||||
#
|
||||
class heat(
|
||||
$package_ensure = 'present',
|
||||
$keystone_ec2_uri = $::os_service_default,
|
||||
@ -298,14 +298,14 @@ class heat(
|
||||
$notification_topics = $::os_service_default,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$max_request_body_size = $::os_service_default,
|
||||
$heat_clients_url = $::os_service_default,
|
||||
$heat_clients_endpoint_type = $::os_service_default,
|
||||
$purge_config = false,
|
||||
$auth_strategy = 'keystone',
|
||||
$yaql_memory_quota = $::os_service_default,
|
||||
$yaql_limit_iterators = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$max_stacks_per_tenant = undef,
|
||||
$heat_clients_url = undef,
|
||||
$heat_clients_endpoint_type = undef,
|
||||
) {
|
||||
|
||||
include heat::db
|
||||
@ -375,10 +375,15 @@ Use heat::engine::max_stacks_per_tenant instead.')
|
||||
'trustee/project_domain_name': ensure => absent;
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'clients_heat/url': value => $heat_clients_url;
|
||||
'clients/endpoint_type': value => $heat_clients_endpoint_type;
|
||||
if $heat_clients_url != undef {
|
||||
warning('The heat_clients_url parameter is deprecated. Use the heat::clients::heat class.')
|
||||
}
|
||||
include heat::clients::heat
|
||||
|
||||
if $heat_clients_endpoint_type!= undef {
|
||||
warning('The heat_clients_endpoint_type parameter is deprecated. Use the heat::clients class.')
|
||||
}
|
||||
include heat::clients
|
||||
|
||||
if (!is_service_default($enable_stack_adopt)) {
|
||||
validate_legacy(Boolean, 'validate_bool', $enable_stack_adopt)
|
||||
|
20
releasenotes/notes/clients-opts-9cca2ca2ec1f3ff7.yaml
Normal file
20
releasenotes/notes/clients-opts-9cca2ca2ec1f3ff7.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``heat::clients`` class has been added. Use this class to manage
|
||||
``[clients]`` parameters.
|
||||
|
||||
- |
|
||||
The new ``heat::clients::base`` defined type has been added. This defined
|
||||
type provides the basic implementation to manage ``[clients_<service>]``
|
||||
parameters.
|
||||
|
||||
- |
|
||||
The ``heat::clients::<service>`` classes, to manage ``[clients_<service>]``
|
||||
parameters, have been added.
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The ``heat_clients_endpoint_type`` parameter and the ``heat_clients_url``
|
||||
parameter has been deprecated, in favor of the ``heat::clients`` class and
|
||||
the ``heat::clients::heat`` class.
|
51
spec/classes/heat_clients_aodh_spec.rb
Normal file
51
spec/classes/heat_clients_aodh_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::aodh' do
|
||||
shared_examples 'heat::clients::aodh' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_aodh').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_aodh').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::aodh'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_barbican_spec.rb
Normal file
51
spec/classes/heat_clients_barbican_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::barbican' do
|
||||
shared_examples 'heat::clients::barbican' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_barbican').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_barbican').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::barbican'
|
||||
end
|
||||
end
|
||||
end
|
54
spec/classes/heat_clients_cinder_spec.rb
Normal file
54
spec/classes/heat_clients_cinder_spec.rb
Normal file
@ -0,0 +1,54 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::cinder' do
|
||||
shared_examples 'heat::clients::cinder' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_cinder').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_cinder/http_log_debug').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
:http_log_debug => true,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_cinder').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_cinder/http_log_debug').with_value(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::cinder'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_designate_spec.rb
Normal file
51
spec/classes/heat_clients_designate_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::designate' do
|
||||
shared_examples 'heat::clients::designate' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_designate').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_designate').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::designate'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_glance_spec.rb
Normal file
51
spec/classes/heat_clients_glance_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::glance' do
|
||||
shared_examples 'heat::clients::glance' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_glance').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_glance').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::glance'
|
||||
end
|
||||
end
|
||||
end
|
55
spec/classes/heat_clients_heat_spec.rb
Normal file
55
spec/classes/heat_clients_heat_spec.rb
Normal file
@ -0,0 +1,55 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::heat' do
|
||||
shared_examples 'heat::clients::heat' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_heat').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_heat/url').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
:url => 'http://127.0.0.1:8004/v1/%(tenant_id)s',
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_heat').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_heat/url')\
|
||||
.with_value('http://127.0.0.1:8004/v1/%(tenant_id)s')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::heat'
|
||||
end
|
||||
end
|
||||
end
|
54
spec/classes/heat_clients_keystone_spec.rb
Normal file
54
spec/classes/heat_clients_keystone_spec.rb
Normal file
@ -0,0 +1,54 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::keystone' do
|
||||
shared_examples 'heat::clients::keystone' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_keystone').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_keystone/auth_uri').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
:auth_uri => 'http://127.0.0.1:5000',
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_keystone').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_keystone/auth_uri').with_value('http://127.0.0.1:5000')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::keystone'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_magnum_spec.rb
Normal file
51
spec/classes/heat_clients_magnum_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::magnum' do
|
||||
shared_examples 'heat::clients::magnum' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_magnum').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_magnum').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::magnum'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_manila_spec.rb
Normal file
51
spec/classes/heat_clients_manila_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::manila' do
|
||||
shared_examples 'heat::clients::manila' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_manila').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_manila').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::manila'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_mistral_spec.rb
Normal file
51
spec/classes/heat_clients_mistral_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::mistral' do
|
||||
shared_examples 'heat::clients::mistral' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_mistral').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_mistral').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::mistral'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_neutron_spec.rb
Normal file
51
spec/classes/heat_clients_neutron_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::neutron' do
|
||||
shared_examples 'heat::clients::neutron' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_neutron').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_neutron').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::neutron'
|
||||
end
|
||||
end
|
||||
end
|
54
spec/classes/heat_clients_nova_spec.rb
Normal file
54
spec/classes/heat_clients_nova_spec.rb
Normal file
@ -0,0 +1,54 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::nova' do
|
||||
shared_examples 'heat::clients::nova' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_nova').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_nova/http_log_debug').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
:http_log_debug => true,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_nova').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
is_expected.to contain_heat_config('clients_nova/http_log_debug').with_value(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::nova'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_octavia_spec.rb
Normal file
51
spec/classes/heat_clients_octavia_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::octavia' do
|
||||
shared_examples 'heat::clients::octavia' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_octavia').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_octavia').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::octavia'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_sahara_spec.rb
Normal file
51
spec/classes/heat_clients_sahara_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::sahara' do
|
||||
shared_examples 'heat::clients::sahara' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_sahara').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_sahara').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::sahara'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_spec.rb
Normal file
51
spec/classes/heat_clients_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients' do
|
||||
shared_examples 'heat::clients' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_swift_spec.rb
Normal file
51
spec/classes/heat_clients_swift_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::swift' do
|
||||
shared_examples 'heat::clients::swift' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_swift').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_swift').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::swift'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_trove_spec.rb
Normal file
51
spec/classes/heat_clients_trove_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::trove' do
|
||||
shared_examples 'heat::clients::trove' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_trove').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_trove').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::trove'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_vitrage_spec.rb
Normal file
51
spec/classes/heat_clients_vitrage_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::vitrage' do
|
||||
shared_examples 'heat::clients::vitrage' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_vitrage').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_vitrage').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::vitrage'
|
||||
end
|
||||
end
|
||||
end
|
51
spec/classes/heat_clients_zaqar_spec.rb
Normal file
51
spec/classes/heat_clients_zaqar_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::zaqar' do
|
||||
shared_examples 'heat::clients::zaqar' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat__clients__base('clients_zaqar').with(
|
||||
:endpoint_type => '<SERVICE DEFAULT>',
|
||||
:ca_file => '<SERVICE DEFAULT>',
|
||||
:cert_file => '<SERVICE DEFAULT>',
|
||||
:key_file => '<SERVICE DEFAULT>',
|
||||
:insecure => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures client parameters' do
|
||||
is_expected.to contain_heat__clients__base('clients_zaqar').with(
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::zaqar'
|
||||
end
|
||||
end
|
||||
end
|
@ -9,12 +9,11 @@ describe 'heat' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:package_ensure => 'present',
|
||||
:flavor => 'keystone',
|
||||
:heat_clients_url => '<SERVICE DEFAULT>',
|
||||
:purge_config => false,
|
||||
:yaql_limit_iterators => 400,
|
||||
:yaql_memory_quota => 20000,
|
||||
:package_ensure => 'present',
|
||||
:flavor => 'keystone',
|
||||
:purge_config => false,
|
||||
:yaql_limit_iterators => 400,
|
||||
:yaql_memory_quota => 20000,
|
||||
}
|
||||
end
|
||||
|
||||
|
51
spec/defines/heat_clients_base_spec.rb
Normal file
51
spec/defines/heat_clients_base_spec.rb
Normal file
@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::clients::base' do
|
||||
let (:title) do
|
||||
'clients_foo'
|
||||
end
|
||||
|
||||
shared_examples 'heat::clients::base' do
|
||||
context 'with defaults' do
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat_config('clients_foo/endpoint_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_heat_config('clients_foo/ca_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_heat_config('clients_foo/cert_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_heat_config('clients_foo/key_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_heat_config('clients_foo/insecure').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with parameters' do
|
||||
let :params do
|
||||
{
|
||||
:endpoint_type => 'publicURL',
|
||||
:ca_file => '/path/to/ca.cert',
|
||||
:cert_file => '/path/to/certfile',
|
||||
:key_file => '/path/to/key',
|
||||
:insecure => false,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures defaults' do
|
||||
is_expected.to contain_heat_config('clients_foo/endpoint_type').with_value('publicURL')
|
||||
is_expected.to contain_heat_config('clients_foo/ca_file').with_value('/path/to/ca.cert')
|
||||
is_expected.to contain_heat_config('clients_foo/cert_file').with_value('/path/to/certfile')
|
||||
is_expected.to contain_heat_config('clients_foo/key_file').with_value('/path/to/key')
|
||||
is_expected.to contain_heat_config('clients_foo/insecure').with_value(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'heat::clients::base'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user