Make password parameters required
... because these parameters are actually required for authentication. Also, fix the inconsistent default values of auth_url parameter. Depends-on: https://review.opendev.org/903851 Change-Id: I41cdf7f04b8ced4f591d7b1ceb5b1138462ff4fd
This commit is contained in:
@@ -12,32 +12,31 @@
|
|||||||
#
|
#
|
||||||
# == Class: ironic::cinder
|
# == Class: ironic::cinder
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to cinder.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to cinder.
|
# (Optional) The authentication plugin to use when connecting to cinder.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to cinder.
|
# (Optional) The admin username for ironic to connect to cinder.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to cinder.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -45,20 +44,20 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for connecting to cinder in admin context
|
# (Optional) Region name for connecting to cinder in admin context
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::cinder (
|
class ironic::cinder (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -14,32 +14,32 @@
|
|||||||
#
|
#
|
||||||
# Configure how Ironic talks to Ironic Inspector.
|
# Configure how Ironic talks to Ironic Inspector.
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to ironic-inspector.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to ironic-inspector.
|
# (Optional) The authentication plugin to use when connecting to
|
||||||
|
# ironic-inspector.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to ironic-inspector.
|
# (Optional) The admin username for ironic to connect to ironic-inspector.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to ironic-inspector.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -47,32 +47,34 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for connecting to ironic-inspector in admin context
|
# (Optional) Region name for connecting to ironic-inspector in admin context
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*callback_endpoint_override*]
|
# [*callback_endpoint_override*]
|
||||||
# The endpoint URL to use for ramdisk callback in case of managed boot.
|
# (Optional) The endpoint URL to use for ramdisk callback in case of managed
|
||||||
|
# boot.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*power_off*]
|
# [*power_off*]
|
||||||
# Whether to power off a node after inspection in case of managed boot.
|
# (Optional) Whether to power off a node after inspection in case of managed
|
||||||
|
# boot.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*extra_kernel_params*]
|
# [*extra_kernel_params*]
|
||||||
# Extra kernel parameters to pass in case of managed boot.
|
# (Optional) Extra kernel parameters to pass in case of managed boot.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::drivers::inspector (
|
class ironic::drivers::inspector (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -12,32 +12,31 @@
|
|||||||
#
|
#
|
||||||
# == Class: ironic::glance
|
# == Class: ironic::glance
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to glance.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to glance.
|
# (Optional) The authentication plugin to use when connecting to glance.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to glance.
|
# (Optional) The admin username for ironic to connect to glance.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to glance.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -45,65 +44,65 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for connecting to glance in admin context
|
# (Optional) Region name for connecting to glance in admin context
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*num_retries*]
|
# [*num_retries*]
|
||||||
# (optional) Number retries when downloading an image from glance.
|
# (Optional) Number retries when downloading an image from glance.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*api_insecure*]
|
# [*api_insecure*]
|
||||||
# (optional) Allow to perform insecure SSL (https) requests to glance.
|
# (Optional) Allow to perform insecure SSL (https) requests to glance.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*swift_account*]
|
# [*swift_account*]
|
||||||
# (optional) The account that Glance uses to communicate with Swift.
|
# (Optional) The account that Glance uses to communicate with Swift.
|
||||||
# The format is "AUTH_uuid".
|
# The format is "AUTH_uuid".
|
||||||
# Can not be set together with swift_account_project_name.
|
# Can not be set together with swift_account_project_name.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*swift_account_prefix*]
|
# [*swift_account_prefix*]
|
||||||
# (optional) The prefix added to the project uuid to determine the swift
|
# (Optional) The prefix added to the project uuid to determine the swift
|
||||||
# account.
|
# account.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*swift_account_project_name*]
|
# [*swift_account_project_name*]
|
||||||
# (optional) The project of account that Glance uses to communicate with Swift.
|
# (Optional) The project of account that Glance uses to communicate with Swift.
|
||||||
# Will be converted to UUID, and option glance/swift_account will be set in
|
# Will be converted to UUID, and option glance/swift_account will be set in
|
||||||
# the "AUTH_uuid" format.
|
# the "AUTH_uuid" format.
|
||||||
# Can not be set together with swift_account.
|
# Can not be set together with swift_account.
|
||||||
# Defaults to undef, which leaves the configuration intact
|
# Defaults to undef, which leaves the configuration intact
|
||||||
#
|
#
|
||||||
# [*swift_container*]
|
# [*swift_container*]
|
||||||
# (optional) Swift container where Glance images are stored. Used for
|
# (Optional) Swift container where Glance images are stored. Used for
|
||||||
# generating temporary URLs.
|
# generating temporary URLs.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*swift_endpoint_url*]
|
# [*swift_endpoint_url*]
|
||||||
# (optional) Swift endpoint to use for generating temporary URLs.
|
# (Optional) Swift endpoint to use for generating temporary URLs.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*swift_temp_url_key*]
|
# [*swift_temp_url_key*]
|
||||||
# (optional) The secret token given to Swift to allow temporary URL
|
# (Optional) The secret token given to Swift to allow temporary URL
|
||||||
# downloads. Required for several drivers (e.g. agent_ipmitool).
|
# downloads. Required for several drivers (e.g. agent_ipmitool).
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*swift_temp_url_duration*]
|
# [*swift_temp_url_duration*]
|
||||||
# (optional) The length of time in seconds that the temporary URL will be
|
# (Optional) The length of time in seconds that the temporary URL will be
|
||||||
# valid for.
|
# valid for.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::glance (
|
class ironic::glance (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -16,53 +16,52 @@
|
|||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to json_rpc.
|
||||||
|
#
|
||||||
# [*auth_strategy*]
|
# [*auth_strategy*]
|
||||||
# (optional) Authentication strategy used by JSON RPC.
|
# (Optional) Authentication strategy used by JSON RPC.
|
||||||
# Defaults to 'keystone'
|
# Defaults to 'keystone'
|
||||||
#
|
#
|
||||||
# [*http_basic_auth_user_file*]
|
# [*http_basic_auth_user_file*]
|
||||||
# (optional) Path to Apache format user authentication file used when
|
# (Optional) Path to Apache format user authentication file used when
|
||||||
# using auth_strategy=http_basic.
|
# using auth_strategy=http_basic.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*host_ip*]
|
# [*host_ip*]
|
||||||
# (optional) The IP address or hostname on which JSON RPC will listen.
|
# (Optional) The IP address or hostname on which JSON RPC will listen.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*port*]
|
# [*port*]
|
||||||
# (optional) The port to use for JSON RPC'.
|
# (Optional) The port to use for JSON RPC'.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*use_ssl*]
|
# [*use_ssl*]
|
||||||
# (optional) Whether to use TLS for JSON RPC'.
|
# (Optional) Whether to use TLS for JSON RPC'.
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
#
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# (optional) The authentication plugin to use when connecting to json_rpc.
|
# (Optional) The authentication plugin to use when connecting to json_rpc.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# (optional) The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# (optional) The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# (optional) The admin username for ironic to connect to json_rpc.
|
# (Optional) The admin username for ironic to connect to json_rpc.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# (optional) The admin password for ironic to connect to json_rpc.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# (optional) The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain (required for Identity V3).
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# (optional) The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain (required for Identity V3).
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -70,29 +69,29 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*allowed_roles*]
|
# [*allowed_roles*]
|
||||||
# (optional) List of roles allowed to use JSON RPC.
|
# (Optional) List of roles allowed to use JSON RPC.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# (optional) The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for connecting to swift in admin context
|
# (Optional) Region name for connecting to swift in admin context
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::json_rpc (
|
class ironic::json_rpc (
|
||||||
|
$password,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$http_basic_auth_user_file = $facts['os_service_default'],
|
$http_basic_auth_user_file = $facts['os_service_default'],
|
||||||
$host_ip = $facts['os_service_default'],
|
$host_ip = $facts['os_service_default'],
|
||||||
$port = $facts['os_service_default'],
|
$port = $facts['os_service_default'],
|
||||||
Boolean $use_ssl = false,
|
Boolean $use_ssl = false,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -12,32 +12,31 @@
|
|||||||
#
|
#
|
||||||
# == Class: ironic::neutron
|
# == Class: ironic::neutron
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to neutron.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to neutron.
|
# (Optional) The authentication plugin to use when connecting to neutron.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to neutron.
|
# (Optional) The admin username for ironic to connect to neutron.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to neutron.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -50,24 +49,24 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*dhcpv6_stateful_address_count*]
|
# [*dhcpv6_stateful_address_count*]
|
||||||
# Number of IPv6 addresses to allocate for ports created for provisioning,
|
# (Optional) Number of IPv6 addresses to allocate for ports created for
|
||||||
# cleaning, rescue or inspection on DHCPv6-stateful networks. Different stages
|
# provisioning, cleaning, rescue or inspection on DHCPv6-stateful networks.
|
||||||
# of the chain-loading process will request addresses with different
|
# Different stages of the chain-loading process will request addresses with
|
||||||
# CLID/IAID. Due to non-identical identifiers multiple addresses must be
|
# different CLID/IAID. Due to non-identical identifiers multiple addresses
|
||||||
# reserved for the host to ensure each step of the boot process can
|
# must be reserved for the host to ensure each step of the boot process can
|
||||||
# successfully lease addresses.
|
# successfully lease addresses.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::neutron (
|
class ironic::neutron (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -12,32 +12,31 @@
|
|||||||
#
|
#
|
||||||
# == Class: ironic::nova
|
# == Class: ironic::nova
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to nova.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to nova.
|
# (Optional) The authentication plugin to use when connecting to nova.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to nova.
|
# (Optional) The admin username for ironic to connect to nova.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to nova.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -45,24 +44,24 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for connecting to nova in admin context
|
# (Optional) Region name for connecting to nova in admin context
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*send_power_notifications*]
|
# [*send_power_notifications*]
|
||||||
# Enable the support for power state change callbacks to nova.
|
# (Optional) Enable the support for power state change callbacks to nova.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::nova (
|
class ironic::nova (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -12,32 +12,32 @@
|
|||||||
#
|
#
|
||||||
# == Class: ironic::service_catalog
|
# == Class: ironic::service_catalog
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to the service catalog.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to the service catalog.
|
# (Optional) The authentication plugin to use when connecting to the service
|
||||||
|
# catalog.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to 'http://127.0.0.1:5000'
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to the service catalog.
|
# (Optional) The admin username for ironic to connect to the service catalog.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to the service catalog.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -45,20 +45,20 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for accessing Keystone catalog
|
# (Optional) Region name for accessing Keystone catalog
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::service_catalog (
|
class ironic::service_catalog (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -12,32 +12,31 @@
|
|||||||
#
|
#
|
||||||
# == Class: ironic::swift
|
# == Class: ironic::swift
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) The admin password for ironic to connect to swift.
|
||||||
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# The authentication plugin to use when connecting to swift.
|
# (Optional) The authentication plugin to use when connecting to swift.
|
||||||
# Defaults to 'password'
|
# Defaults to 'password'
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# The address of the keystone api endpoint.
|
# (Optional) The address of the keystone api endpoint.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to http://127.0.0.1:5000
|
||||||
#
|
#
|
||||||
# [*project_name*]
|
# [*project_name*]
|
||||||
# The Keystone project name.
|
# (Optional) The Keystone project name.
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# The admin username for ironic to connect to swift.
|
# (Optional) The admin username for ironic to connect to swift.
|
||||||
# Defaults to 'ironic'.
|
# Defaults to 'ironic'.
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# The admin password for ironic to connect to swift.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*user_domain_name*]
|
# [*user_domain_name*]
|
||||||
# The name of user's domain (required for Identity V3).
|
# (Optional) The name of user's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*project_domain_name*]
|
# [*project_domain_name*]
|
||||||
# The name of project's domain (required for Identity V3).
|
# (Optional) The name of project's domain.
|
||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
@@ -45,20 +44,20 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (optional) Region name for connecting to swift in admin context
|
# (Optional) Region name for connecting to swift in admin context
|
||||||
# through the OpenStack Identity service.
|
# through the OpenStack Identity service.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*endpoint_override*]
|
# [*endpoint_override*]
|
||||||
# The endpoint URL for requests for this client
|
# (Optional) The endpoint URL for requests for this client
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class ironic::swift (
|
class ironic::swift (
|
||||||
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_url = $facts['os_service_default'],
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $facts['os_service_default'],
|
$system_scope = $facts['os_service_default'],
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::cinder' do
|
describe 'ironic::cinder' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic cinder configuration' do
|
shared_examples_for 'ironic cinder configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('cinder/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('cinder/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('cinder/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('cinder/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('cinder/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('cinder/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('cinder/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('cinder/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('cinder/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('cinder/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('cinder/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('cinder/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('cinder/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('cinder/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('cinder/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('cinder/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -53,7 +42,6 @@ describe 'ironic::cinder' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -62,16 +50,15 @@ describe 'ironic::cinder' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('cinder/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('cinder/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('cinder/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('cinder/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('cinder/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('cinder/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('cinder/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('cinder/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('cinder/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('cinder/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('cinder/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('cinder/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('cinder/project_domain_name').with_value(p[:project_domain_name])
|
|
||||||
is_expected.to contain_ironic_config('cinder/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('cinder/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('cinder/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('cinder/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('cinder/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('cinder/endpoint_override').with_value(params[:endpoint_override])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -33,6 +33,12 @@ describe 'ironic::conductor' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic conductor' do
|
shared_examples_for 'ironic conductor' do
|
||||||
|
let :pre_condition do
|
||||||
|
"class { 'ironic::glance':
|
||||||
|
password => 'password',
|
||||||
|
}"
|
||||||
|
end
|
||||||
|
|
||||||
let :p do
|
let :p do
|
||||||
default_params.merge(params)
|
default_params.merge(params)
|
||||||
end
|
end
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::drivers::inspector' do
|
describe 'ironic::drivers::inspector' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic ironic-inspector access configuration' do
|
shared_examples_for 'ironic ironic-inspector access configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('inspector/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('inspector/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('inspector/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('inspector/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('inspector/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('inspector/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('inspector/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('inspector/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('inspector/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('inspector/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('inspector/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('inspector/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('inspector/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('inspector/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('inspector/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('inspector/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -53,7 +42,6 @@ describe 'ironic::drivers::inspector' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -65,19 +53,18 @@ describe 'ironic::drivers::inspector' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('inspector/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('inspector/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('inspector/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('inspector/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('inspector/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('inspector/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('inspector/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('inspector/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('inspector/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('inspector/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('inspector/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('inspector/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('inspector/project_domain_name').with_value(p[:project_domain_name])
|
|
||||||
is_expected.to contain_ironic_config('inspector/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('inspector/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('inspector/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('inspector/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('inspector/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('inspector/endpoint_override').with_value(params[:endpoint_override])
|
||||||
is_expected.to contain_ironic_config('inspector/callback_endpoint_override').with_value(p[:callback_endpoint_override])
|
is_expected.to contain_ironic_config('inspector/callback_endpoint_override').with_value(params[:callback_endpoint_override])
|
||||||
is_expected.to contain_ironic_config('inspector/power_off').with_value(p[:power_off])
|
is_expected.to contain_ironic_config('inspector/power_off').with_value(params[:power_off])
|
||||||
is_expected.to contain_ironic_config('inspector/extra_kernel_params').with_value(p[:extra_kernel_params])
|
is_expected.to contain_ironic_config('inspector/extra_kernel_params').with_value(params[:extra_kernel_params])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::glance' do
|
describe 'ironic::glance' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic glance configuration' do
|
shared_examples_for 'ironic glance configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('glance/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('glance/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('glance/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('glance/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('glance/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('glance/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('glance/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('glance/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('glance/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('glance/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('glance/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('glance/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('glance/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('glance/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('glance/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('glance/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -61,7 +50,6 @@ describe 'ironic::glance' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -78,24 +66,23 @@ describe 'ironic::glance' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('glance/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('glance/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('glance/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('glance/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('glance/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('glance/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('glance/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('glance/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('glance/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('glance/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('glance/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('glance/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('glance/project_domain_name').with_value(p[:project_domain_name])
|
|
||||||
is_expected.to contain_ironic_config('glance/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('glance/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('glance/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('glance/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('glance/insecure').with_value(p[:api_insecure])
|
is_expected.to contain_ironic_config('glance/insecure').with_value(params[:api_insecure])
|
||||||
is_expected.to contain_ironic_config('glance/num_retries').with_value(p[:num_retries])
|
is_expected.to contain_ironic_config('glance/num_retries').with_value(params[:num_retries])
|
||||||
is_expected.to contain_ironic_config('glance/swift_account').with_value(p[:swift_account])
|
is_expected.to contain_ironic_config('glance/swift_account').with_value(params[:swift_account])
|
||||||
is_expected.to contain_ironic_config('glance/swift_account_prefix').with_value(p[:swift_account_prefix])
|
is_expected.to contain_ironic_config('glance/swift_account_prefix').with_value(params[:swift_account_prefix])
|
||||||
is_expected.to contain_ironic_config('glance/swift_container').with_value(p[:swift_container])
|
is_expected.to contain_ironic_config('glance/swift_container').with_value(params[:swift_container])
|
||||||
is_expected.to contain_ironic_config('glance/swift_endpoint_url').with_value(p[:swift_endpoint_url])
|
is_expected.to contain_ironic_config('glance/swift_endpoint_url').with_value(params[:swift_endpoint_url])
|
||||||
is_expected.to contain_ironic_config('glance/swift_temp_url_key').with_value(p[:swift_temp_url_key]).with_secret(true)
|
is_expected.to contain_ironic_config('glance/swift_temp_url_key').with_value(params[:swift_temp_url_key]).with_secret(true)
|
||||||
is_expected.to contain_ironic_config('glance/swift_temp_url_duration').with_value(p[:swift_temp_url_duration])
|
is_expected.to contain_ironic_config('glance/swift_temp_url_duration').with_value(params[:swift_temp_url_duration])
|
||||||
is_expected.to contain_ironic_config('glance/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('glance/endpoint_override').with_value(params[:endpoint_override])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -24,6 +24,15 @@ describe 'ironic' do
|
|||||||
|
|
||||||
shared_examples_for 'ironic' do
|
shared_examples_for 'ironic' do
|
||||||
|
|
||||||
|
let :pre_condition do
|
||||||
|
"class { 'ironic::glance':
|
||||||
|
password => 'password',
|
||||||
|
}
|
||||||
|
class { 'ironic::neutron':
|
||||||
|
password => 'password',
|
||||||
|
}"
|
||||||
|
end
|
||||||
|
|
||||||
context 'with defaults' do
|
context 'with defaults' do
|
||||||
it { is_expected.to contain_class('ironic::params') }
|
it { is_expected.to contain_class('ironic::params') }
|
||||||
|
|
||||||
|
@@ -17,35 +17,22 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::json_rpc' do
|
describe 'ironic::json_rpc' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_strategy => 'keystone',
|
|
||||||
:auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:use_ssl => false,
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic json_rpc configuration' do
|
shared_examples_for 'ironic json_rpc configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('json_rpc/auth_strategy').with_value(p[:auth_strategy])
|
is_expected.to contain_ironic_config('json_rpc/auth_strategy').with_value('keystone')
|
||||||
is_expected.to contain_ironic_config('json_rpc/http_basic_auth_user_file').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('json_rpc/http_basic_auth_user_file').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('json_rpc/host_ip').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('json_rpc/host_ip').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('json_rpc/port').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('json_rpc/port').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('json_rpc/use_ssl').with_value(p[:use_ssl])
|
is_expected.to contain_ironic_config('json_rpc/use_ssl').with_value(false)
|
||||||
is_expected.to contain_ironic_config('json_rpc/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('json_rpc/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('json_rpc/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('json_rpc/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('json_rpc/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('json_rpc/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('json_rpc/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('json_rpc/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('json_rpc/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('json_rpc/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('json_rpc/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('json_rpc/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('json_rpc/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('json_rpc/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('json_rpc/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('json_rpc/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -61,21 +48,19 @@ describe 'ironic::json_rpc' do
|
|||||||
:auth_type => 'http_basic',
|
:auth_type => 'http_basic',
|
||||||
:endpoint_override => 'http://example.com',
|
:endpoint_override => 'http://example.com',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:allowed_roles => ['admin', 'service'],
|
:allowed_roles => ['admin', 'service'],
|
||||||
:region_name => 'regionOne',
|
:region_name => 'regionOne',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('json_rpc/auth_strategy').with_value(p[:auth_strategy])
|
is_expected.to contain_ironic_config('json_rpc/auth_strategy').with_value(params[:auth_strategy])
|
||||||
is_expected.to contain_ironic_config('json_rpc/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('json_rpc/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('json_rpc/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('json_rpc/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('json_rpc/password').with_value(p[:password]).with_secret(true)
|
|
||||||
is_expected.to contain_ironic_config('json_rpc/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('json_rpc/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('json_rpc/allowed_roles').with_value('admin,service')
|
is_expected.to contain_ironic_config('json_rpc/allowed_roles').with_value('admin,service')
|
||||||
is_expected.to contain_ironic_config('json_rpc/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('json_rpc/endpoint_override').with_value(params[:endpoint_override])
|
||||||
is_expected.to contain_ironic_config('json_rpc/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('json_rpc/region_name').with_value(params[:region_name])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::neutron' do
|
describe 'ironic::neutron' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic neutron configuration' do
|
shared_examples_for 'ironic neutron configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('neutron/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('neutron/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('neutron/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('neutron/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('neutron/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('neutron/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('neutron/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('neutron/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('neutron/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('neutron/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('neutron/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('neutron/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('neutron/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('neutron/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -54,7 +43,6 @@ describe 'ironic::neutron' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -64,17 +52,16 @@ describe 'ironic::neutron' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('neutron/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('neutron/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('neutron/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('neutron/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('neutron/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('neutron/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('neutron/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('neutron/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('neutron/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('neutron/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('neutron/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('neutron/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('neutron/project_domain_name').with_value(p[:project_domain_name])
|
|
||||||
is_expected.to contain_ironic_config('neutron/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('neutron/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('neutron/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('neutron/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('neutron/endpoint_override').with_value(params[:endpoint_override])
|
||||||
is_expected.to contain_ironic_config('neutron/dhcpv6_stateful_address_count').with_value(p[:dhcpv6_stateful_address_count])
|
is_expected.to contain_ironic_config('neutron/dhcpv6_stateful_address_count').with_value(params[:dhcpv6_stateful_address_count])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::nova' do
|
describe 'ironic::nova' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic nova configuration' do
|
shared_examples_for 'ironic nova configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('nova/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('nova/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('nova/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('nova/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('nova/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('nova/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('nova/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('nova/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('nova/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('nova/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('nova/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('nova/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('nova/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('nova/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('nova/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('nova/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -54,7 +43,6 @@ describe 'ironic::nova' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -64,17 +52,16 @@ describe 'ironic::nova' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('nova/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('nova/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('nova/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('nova/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('nova/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('nova/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('nova/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('nova/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('nova/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('nova/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('nova/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('nova/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('nova/project_domain_name').with_value(p[:project_domain_name])
|
is_expected.to contain_ironic_config('nova/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('nova/region_name').with_value(p[:region_name])
|
|
||||||
is_expected.to contain_ironic_config('nova/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('nova/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('nova/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('nova/endpoint_override').with_value(params[:endpoint_override])
|
||||||
is_expected.to contain_ironic_config('nova/send_power_notifications').with_value(p[:send_power_notifications])
|
is_expected.to contain_ironic_config('nova/send_power_notifications').with_value(params[:send_power_notifications])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::service_catalog' do
|
describe 'ironic::service_catalog' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic service catalog access configuration' do
|
shared_examples_for 'ironic service catalog access configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('service_catalog/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('service_catalog/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('service_catalog/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('service_catalog/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('service_catalog/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('service_catalog/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('service_catalog/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('service_catalog/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('service_catalog/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('service_catalog/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('service_catalog/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('service_catalog/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('service_catalog/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('service_catalog/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('service_catalog/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('service_catalog/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -53,7 +42,6 @@ describe 'ironic::service_catalog' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -62,16 +50,15 @@ describe 'ironic::service_catalog' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('service_catalog/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('service_catalog/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('service_catalog/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('service_catalog/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('service_catalog/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('service_catalog/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('service_catalog/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('service_catalog/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('service_catalog/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('service_catalog/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('service_catalog/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('service_catalog/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('service_catalog/project_domain_name').with_value(p[:project_domain_name])
|
|
||||||
is_expected.to contain_ironic_config('service_catalog/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('service_catalog/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('service_catalog/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('service_catalog/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('service_catalog/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('service_catalog/endpoint_override').with_value(params[:endpoint_override])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -17,28 +17,17 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'ironic::swift' do
|
describe 'ironic::swift' do
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{ :auth_type => 'password',
|
|
||||||
:project_name => 'services',
|
|
||||||
:username => 'ironic',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{}
|
{ :password => 'secret'}
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic swift configuration' do
|
shared_examples_for 'ironic swift configuration' do
|
||||||
let :p do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('swift/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('swift/auth_type').with_value('password')
|
||||||
is_expected.to contain_ironic_config('swift/auth_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('swift/auth_url').with_value('http://127.0.0.1:5000')
|
||||||
is_expected.to contain_ironic_config('swift/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('swift/project_name').with_value('services')
|
||||||
is_expected.to contain_ironic_config('swift/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('swift/username').with_value('ironic')
|
||||||
is_expected.to contain_ironic_config('swift/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
is_expected.to contain_ironic_config('swift/password').with_value('secret').with_secret(true)
|
||||||
is_expected.to contain_ironic_config('swift/user_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('swift/user_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('swift/project_domain_name').with_value('Default')
|
is_expected.to contain_ironic_config('swift/project_domain_name').with_value('Default')
|
||||||
is_expected.to contain_ironic_config('swift/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('swift/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -53,7 +42,6 @@ describe 'ironic::swift' do
|
|||||||
:auth_url => 'http://example.com',
|
:auth_url => 'http://example.com',
|
||||||
:project_name => 'project1',
|
:project_name => 'project1',
|
||||||
:username => 'admin',
|
:username => 'admin',
|
||||||
:password => 'pa$$w0rd',
|
|
||||||
:user_domain_name => 'NonDefault',
|
:user_domain_name => 'NonDefault',
|
||||||
:project_domain_name => 'NonDefault',
|
:project_domain_name => 'NonDefault',
|
||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
@@ -62,16 +50,15 @@ describe 'ironic::swift' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_config('swift/auth_type').with_value(p[:auth_type])
|
is_expected.to contain_ironic_config('swift/auth_type').with_value(params[:auth_type])
|
||||||
is_expected.to contain_ironic_config('swift/auth_url').with_value(p[:auth_url])
|
is_expected.to contain_ironic_config('swift/auth_url').with_value(params[:auth_url])
|
||||||
is_expected.to contain_ironic_config('swift/project_name').with_value(p[:project_name])
|
is_expected.to contain_ironic_config('swift/project_name').with_value(params[:project_name])
|
||||||
is_expected.to contain_ironic_config('swift/username').with_value(p[:username])
|
is_expected.to contain_ironic_config('swift/username').with_value(params[:username])
|
||||||
is_expected.to contain_ironic_config('swift/password').with_value(p[:password]).with_secret(true)
|
is_expected.to contain_ironic_config('swift/user_domain_name').with_value(params[:user_domain_name])
|
||||||
is_expected.to contain_ironic_config('swift/user_domain_name').with_value(p[:user_domain_name])
|
is_expected.to contain_ironic_config('swift/project_domain_name').with_value(params[:project_domain_name])
|
||||||
is_expected.to contain_ironic_config('swift/project_domain_name').with_value(p[:project_domain_name])
|
|
||||||
is_expected.to contain_ironic_config('swift/system_scope').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('swift/system_scope').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('swift/region_name').with_value(p[:region_name])
|
is_expected.to contain_ironic_config('swift/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('swift/endpoint_override').with_value(p[:endpoint_override])
|
is_expected.to contain_ironic_config('swift/endpoint_override').with_value(params[:endpoint_override])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user