Remove deprecated parameters and classes

Remove all the deprecated parameters and classes
which has been deprecated for one cycle or more.

Change-Id: I2624b92871f4cba5a7361a5d006d985946493e83
This commit is contained in:
Tobias Urdin 2018-05-19 01:42:50 +02:00
parent ac9739911e
commit c3e5c7480f
13 changed files with 67 additions and 425 deletions

View File

@ -238,44 +238,6 @@
# (optional) User name for the vendordata dynamic plugin credentials.
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*conductor_workers*]
# (optional) DEPRECATED. Use workers parameter of nova::conductor
# Class instead.
# Defaults to undef
#
# [*osapi_max_limit*]
# (optional) This option is limit the maximum number of items in a single response.
# Defaults to undef
#
# [*osapi_compute_link_prefix*]
# (optional) This string is prepended to the normal URL that is returned in links
# to the OpenStack Compute API.
# Defaults to undef
#
# [*osapi_glance_link_prefix*]
# (optional) This string is prepended to the normal URL that is returned in links
# to Glance resources.
# Defaults to undef
#
# [*osapi_hide_server_address_states*]
# (optional) This option is a list of all instance states for which network address
# information should not be returned from the API.
# Defaults to undef
#
# [*default_floating_pool*]
# (optional) Default pool for floating IPs
# Defaults to undef
#
# [*pci_alias*]
# DEPRECATED. Use nova::pci::aliases instead.
# (optional) A list of pci alias hashes
# Defaults to undef
# Example:
# [{"vendor_id" => "1234", "product_id" => "5678", "name" => "default"},
# {"vendor_id" => "1234", "product_id" => "6789", "name" => "other"}]
#
class nova::api(
$enabled = true,
$manage_service = true,
@ -327,14 +289,6 @@ class nova::api(
$vendordata_dynamic_auth_project_name = $::os_service_default,
$vendordata_dynamic_auth_user_domain_name = 'Default',
$vendordata_dynamic_auth_username = $::os_service_default,
# DEPRECATED PARAMETER
$conductor_workers = undef,
$osapi_max_limit = undef,
$osapi_compute_link_prefix = undef,
$osapi_glance_link_prefix = undef,
$osapi_hide_server_address_states = undef,
$default_floating_pool = undef,
$pci_alias = undef,
) inherits nova::params {
include ::nova::deps
@ -347,10 +301,6 @@ class nova::api(
Class['cinder::client'] ~> Nova::Generic_service['api']
}
if $conductor_workers {
warning('The conductor_workers parameter is deprecated and has no effect. Use workers parameter of nova::conductor class instead.')
}
if $instance_name_template {
nova_config {
'DEFAULT/instance_name_template': value => $instance_name_template;
@ -361,38 +311,6 @@ class nova::api(
}
}
if $default_floating_pool {
warning('The default_floating_pool parameter is deprecated. Please use nova::network::neutron::default_floating_pool instead.')
}
if $osapi_max_limit {
warning('The osapi_max_limit parameter is deprecated. Please use max_limit instead')
$max_limit_real = $osapi_max_limit
} else {
$max_limit_real = $max_limit
}
if $osapi_compute_link_prefix {
warning('The osapi_compute_link_prefix parameter is deprecated. Please use compute_link_prefix instead')
$compute_link_prefix_real = $osapi_compute_link_prefix
} else {
$compute_link_prefix_real = $compute_link_prefix
}
if $osapi_glance_link_prefix {
warning('The osapi_glance_link_prefix parameter is deprecated. Please use glance_link_prefix instead')
$glance_link_prefix_real = $osapi_glance_link_prefix
} else {
$glance_link_prefix_real = $glance_link_prefix
}
if $osapi_hide_server_address_states {
warning('The osapi_hide_server_address_states parameter is deprecated. Please use hide_server_address_states instead')
$hide_server_address_states_real = $osapi_hide_server_address_states
} else {
$hide_server_address_states_real = $hide_server_address_states
}
if !is_service_default($vendordata_providers) and !empty($vendordata_providers){
validate_array($vendordata_providers)
$vendordata_providers_real = join($vendordata_providers, ',')
@ -473,10 +391,10 @@ as a standalone service, or httpd for being run by a httpd server")
'api/vendordata_dynamic_connect_timeout': value => $vendordata_dynamic_connect_timeout;
'api/vendordata_dynamic_read_timeout': value => $vendordata_dynamic_read_timeout;
'api/vendordata_dynamic_failure_fatal': value => $vendordata_dynamic_failure_fatal;
'api/max_limit': value => $max_limit_real;
'api/compute_link_prefix': value => $compute_link_prefix_real;
'api/glance_link_prefix': value => $glance_link_prefix_real;
'api/hide_server_address_states': value => $hide_server_address_states_real;
'api/max_limit': value => $max_limit;
'api/compute_link_prefix': value => $compute_link_prefix;
'api/glance_link_prefix': value => $glance_link_prefix;
'api/hide_server_address_states': value => $hide_server_address_states;
'api/allow_instance_snapshots': value => $allow_instance_snapshots;
'api/enable_instance_password': value => $enable_instance_password;
'vendordata_dynamic_auth/auth_type': value => $vendordata_dynamic_auth_auth_type;
@ -537,11 +455,6 @@ as a standalone service, or httpd for being run by a httpd server")
'filter:authtoken/auth_admin_prefix': ensure => absent;
}
if $pci_alias {
warning('The pci_alias parameter is deprecated. Please use nova::pci::aliases instead.')
}
include ::nova::pci
if $validate {
#Shrinking the variables names in favor of not
#having more than 140 chars per line

View File

@ -1,33 +0,0 @@
# == Type: nova::cell_v2::cell
#
# Resource for managing cell_v2 cells.
# DEPRECATED by the nova_cell_v2 type.
#
# === Parameters
#
# [*transport_url*]
# (String) AMQP transport url for the cell.
# If not defined, the [DEFAULT]/transport_url is used from the nova
# configuration file.
# Defaults to undef.
#
# [*database_connection*]
# (String) Database connection url for the cell.
# If not defined, the [DEFAULT]/database_connection is used from the nova
# configuration file.
# Defaults to undef.
#
define nova::cell_v2::cell (
$transport_url = 'default',
$database_connection = 'default'
) {
warning('nova::cell_v2::cell is deprecated by the nova_cell_v2 type in Pike and will be removed in the future.')
include ::nova::deps
nova_cell_v2 { "${title}":
transport_url => $transport_url,
database_connection => $database_connection
}
}

View File

@ -94,12 +94,11 @@ class nova::deps {
notify => Anchor['nova::service::begin']
}
# Wedge cell_v2 put this between api sync and db sync by default but can
# be overridden using the spaceship operator to move it around when needed
# Between api sync and db sync by default but can be overridden
# using the spaceship operator to move it around when needed
anchor { 'nova::cell_v2::begin':
subscribe => Anchor['nova::dbsync_api::end']
}
-> Nova::Cell_v2::Cell<||>
~> anchor { 'nova::cell_v2::end':
notify => Anchor['nova::dbsync::begin']
}

View File

@ -421,36 +421,6 @@
#
# DEPRECATED PARAMETERS
#
# [*rabbit_host*]
# (optional) Location of rabbitmq installation. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_hosts*]
# (optional) List of clustered rabbit servers. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_port*]
# (optional) Port for rabbitmq instance. (port value)
# Defaults to $::os_service_default
#
# [*rabbit_password*]
# (optional) Password used to connect to rabbitmq. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_userid*]
# (optional) User used to connect to rabbitmq. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_virtual_host*]
# (optional) The RabbitMQ virtual host. (string value)
# Defaults to $::os_service_default
#
# [*rpc_backend*]
# (optional) The rpc backend implementation to use, can be:
# rabbit (for rabbitmq)
# zmq (for zeromq)
# Defaults to $::os_service_default
#
# [*notify_api_faults*]
# (optional) If set, send api.fault notifications on caught
# exceptions in the API service
@ -551,13 +521,6 @@ class nova(
$purge_config = false,
$my_ip = $::os_service_default,
# DEPRECATED PARAMETERS
$rabbit_host = $::os_service_default,
$rabbit_hosts = $::os_service_default,
$rabbit_password = $::os_service_default,
$rabbit_port = $::os_service_default,
$rabbit_userid = $::os_service_default,
$rabbit_virtual_host = $::os_service_default,
$rpc_backend = $::os_service_default,
$notify_api_faults = undef,
) inherits nova::params {
@ -572,19 +535,6 @@ class nova(
warning('enabled_ssl_apis is empty but use_ssl is set to true')
}
if !is_service_default($rabbit_host) or
!is_service_default($rabbit_hosts) or
!is_service_default($rabbit_password) or
!is_service_default($rabbit_port) or
!is_service_default($rabbit_userid) or
!is_service_default($rabbit_virtual_host) or
!is_service_default($rpc_backend) {
warning("nova::rabbit_host, nova::rabbit_hosts, nova::rabbit_password, \
nova::rabbit_port, nova::rabbit_userid, nova::rabbit_virtual_host and \
nova::rpc_backend are deprecated. Please use nova::default_transport_url \
instead.")
}
if $notify_api_faults {
warning('The notify_api_faults parameter is deprecated. Please use \
nova::notify_on_api_faults instead.')
@ -692,9 +642,6 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
}
oslo::messaging::rabbit {'nova_config':
rabbit_password => $rabbit_password,
rabbit_userid => $rabbit_userid,
rabbit_virtual_host => $rabbit_virtual_host,
rabbit_use_ssl => $rabbit_use_ssl,
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $rabbit_heartbeat_rate,
@ -706,9 +653,6 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
kombu_ssl_certfile => $kombu_ssl_certfile,
kombu_ssl_keyfile => $kombu_ssl_keyfile,
kombu_ssl_version => $kombu_ssl_version,
rabbit_hosts => $rabbit_hosts,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_ha_queues => $rabbit_ha_queues,
}

View File

@ -30,24 +30,6 @@
# [*api_retry_interval*]
# Interval in second for ironic driver to poll ironic api
#
# === DEPRECATED
#
# [*admin_username*]
# The admin username for Ironic to connect to Nova.
# Defaults to 'admin'
#
# [*admin_password*]
# The admin password for Ironic to connect to Nova.
# Defaults to 'ironic'
#
# [*admin_url*]
# The address of the Keystone api endpoint.
# Defaults to 'http://127.0.0.1:35357/v2.0'
#
# [*admin_tenant_name*]
# The Ironic Keystone tenant name.
# Defaults to 'services'
#
# [*user_domain_name*]
# (Optional) Name of domain for $user_domain_name
# Defaults to 'Default'
@ -71,7 +53,6 @@ class nova::ironic::common (
include ::nova::deps
nova_config {
'ironic/auth_plugin': value => $auth_plugin;
'ironic/username': value => $username;

View File

@ -101,15 +101,6 @@
# take the domain and upcase it.
# Defaults to undef
#
# DEPRECATED PARAMETERS
#
# [*nova_user*]
# (optional) User that nova services run as.
# Defaults to 'nova'
#
# [*nova_password*]
# (required) Password for the nova service user.
#
class nova::metadata::novajoin::api (
$transport_url,
$bind_address = '127.0.0.1',
@ -135,31 +126,14 @@ class nova::metadata::novajoin::api (
$user_domain_id = 'default',
$configure_kerberos = false,
$ipa_realm = undef,
# DEPRECATED PARAMETERS
$nova_user = 'nova',
$nova_password = undef,
) {
include ::nova::metadata::novajoin::authtoken
if $service_user {
$service_user_real = $service_user
} else {
warning('The nova_user parameter is deprecated. use service_user instead')
$service_user_real = $nova_user
}
if ! $service_user_real {
if ! $service_user {
fail('service_user is missing')
}
if $service_password {
$service_password_real = $service_password
} else {
warning('The nova_password parameter is deprecated. use service_password instead')
$service_password_real = $nova_password
}
if ! $service_password_real {
if ! $service_password {
fail('service_password is missing')
}
@ -234,8 +208,8 @@ class nova::metadata::novajoin::api (
'DEFAULT/transport_url': value => $transport_url;
'service_credentials/auth_type': value => $auth_type;
'service_credentials/auth_url': value => $keystone_auth_url;
'service_credentials/password': value => $service_password_real;
'service_credentials/username': value => $service_user_real;
'service_credentials/password': value => $service_password;
'service_credentials/username': value => $service_user;
'service_credentials/project_name': value => $project_name;
'service_credentials/user_domain_id': value => $user_domain_id;
'service_credentials/project_domain_name':

View File

@ -67,13 +67,6 @@
# See https://libvirt.org/guide/html/Application_Development_Guide-Architecture-Remote_URIs.html
# Defaults to {}
#
# DEPRECATED PARAMETERS
#
# [*use_tls*]
# (optional) Use tls for remote connections to libvirt
# Defaults to false
# Deprecated by transport paramater.
#
class nova::migration::libvirt(
$transport = undef,
$auth = 'none',
@ -87,19 +80,12 @@ class nova::migration::libvirt(
$client_user = undef,
$client_port = undef,
$client_extraparams = {},
# DEPRECATED PARAMETERS
$use_tls = false,
){
include ::nova::deps
if $transport {
$transport_real = $transport
} elsif $use_tls {
warning(
'The use_tls parameter is now deprecated and will be removed in the Queens cycle. Please set transport=tls instead.'
)
$transport_real = 'tls'
} else {
$transport_real = 'tcp'
}

View File

@ -16,12 +16,10 @@ class nova::pci(
) {
include ::nova::deps
$picked_aliases = pick_default($::nova::api::pci_alias, $aliases)
if $picked_aliases and
!is_service_default($picked_aliases) and
!empty($picked_aliases) {
$aliases_real = to_array_of_json_strings($picked_aliases)
if $aliases and
!is_service_default($aliases) and
!empty($aliases) {
$aliases_real = to_array_of_json_strings($aliases)
} else {
$aliases_real = $::os_service_default
}

View File

@ -0,0 +1,40 @@
---
upgrade:
- |
The deprecated parameter nova::api::conductor_workers is removed.
Please use nova::conductor::workers instead.
- |
The deprecated parameter nova::api::osapi_max_limit is removed.
Please use nova::api::max_limit instead.
- |
The deprecated parameter nova::api::osapi_compute_link_prefix is removed.
Please use nova::api::compute_link_prefix instead.
- |
The deprecated parameter nova::api::osapi_glance_link_prefix is removed.
Please use nova::api::glance_link_prefix instead.
- |
The deprecated parameter nova::api::osapi_hide_server_address_states is removed.
Please use nova::api::hide_server_address_states instead.
- |
The deprecated parameter nova::api::default_floating_pool is removed.
Please use nova::network::neutron::default_floating_pool instead.
- |
The deprecated parameter nova::api::pci_alias is removed.
Please use the nova::pci class instead and set the nova::pci::aliases parameter.
- |
The deprecated parameter nova::migration::libvirt::use_tls is removed.
Please set nova::migration::libvirt::transport to 'tls' instead if you had this option.
- |
The deprecated class nova::cell_v2::cell is now removed.
Please use the nova_cell_v2 resource type instead of using this class.
- |
The deprecated nova::rabbit_host, nova::rabbit_hosts, nova::rabbit_password,
nova::rabbit_port, nova::rabbit_userid and nova::rabbit_virtual_host is removed.
Please use the nova::default_transport_url instead.
- |
The deprecated nova::rpc_backend is removed.
- |
The deprecated nova::metadata::novajoin::api::nova_user and
nova::metadata::novajoin::api::nova_password is removed.
Please use the nova::metadata::novajoin::api::service_user and
nova::metadata::novajoin::api::service_password instead.

View File

@ -87,11 +87,6 @@ describe 'nova::api' do
is_expected.to contain_nova_config('neutron/service_metadata_proxy').with(:value => false)
is_expected.to contain_nova_config('neutron/metadata_proxy_shared_secret').with(:ensure => 'absent')
end
it 'includes nova::pci' do
is_expected.to contain_class('nova::pci')
is_expected.to contain_nova_config('pci/alias').with(:value => '<SERVICE DEFAULT>')
end
end
context 'with overridden parameters' do
@ -116,10 +111,10 @@ describe 'nova::api' do
:vendordata_dynamic_connect_timeout => 30,
:vendordata_dynamic_read_timeout => 30,
:vendordata_dynamic_failure_fatal => false,
:osapi_max_limit => 1000,
:osapi_compute_link_prefix => 'https://10.0.0.1:7777/',
:osapi_glance_link_prefix => 'https://10.0.0.1:6666/',
:osapi_hide_server_address_states => 'building',
:max_limit => 1000,
:compute_link_prefix => 'https://10.0.0.1:7777/',
:glance_link_prefix => 'https://10.0.0.1:6666/',
:hide_server_address_states => 'building',
:allow_instance_snapshots => true,
:enable_network_quota => false,
:enable_instance_password => true,
@ -192,57 +187,6 @@ describe 'nova::api' do
end
end
context 'with pci_alias array' do
before do
params.merge!({
:pci_alias => [{
"vendor_id" => "8086",
"product_id" => "0126",
"name" => "graphic_card"
},
{
"vendor_id" => "9096",
"product_id" => "1520",
"name" => "network_card"
}
]
})
end
it 'configures nova pci_alias entries' do
is_expected.to contain_class('nova::pci')
is_expected.to contain_nova_config('pci/alias').with(
'value' => ['{"vendor_id":"8086","product_id":"0126","name":"graphic_card"}','{"vendor_id":"9096","product_id":"1520","name":"network_card"}']
)
end
end
context 'with pci_alias JSON encoded string (deprecated)' do
before do
params.merge!({
:pci_alias => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\",\"name\":\"graphic_card\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"name\":\"network_card\"}]",
})
end
it 'configures nova pci_alias entries' do
is_expected.to contain_class('nova::pci')
is_expected.to contain_nova_config('pci/alias').with(
'value' => ['{"vendor_id":"8086","product_id":"0126","name":"graphic_card"}','{"vendor_id":"9096","product_id":"1520","name":"network_card"}']
)
end
end
context 'when pci_alias is empty' do
before do
params.merge!({
:pci_alias => ""
})
end
it 'clears pci_alias configuration' do
is_expected.to contain_class('nova::pci')
is_expected.to contain_nova_config('pci/alias').with(:value => '<SERVICE DEFAULT>')
end
end
context 'while validating the service with default command' do
before do
params.merge!({

View File

@ -42,11 +42,7 @@ describe 'nova' do
end
it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
end
@ -83,10 +79,6 @@ describe 'nova' do
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '30',
:control_exchange => 'nova',
:rabbit_host => 'rabbit',
:rabbit_userid => 'rabbit_user',
:rabbit_port => '5673',
:rabbit_password => 'password',
:rabbit_heartbeat_timeout_threshold => '60',
:rabbit_heartbeat_rate => '10',
:lock_path => '/var/locky/path',
@ -144,11 +136,6 @@ describe 'nova' do
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('30')
is_expected.to contain_nova_config('DEFAULT/control_exchange').with_value('nova')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('rabbit')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_password').with_value('password').with_secret(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60')
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10')
end
@ -233,45 +220,6 @@ describe 'nova' do
end
end
context 'with rabbit_hosts parameter' do
let :params do
{ :rabbit_hosts => ['rabbit:5673', 'rabbit2:5674'] }
end
it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__messaging__rabbit('nova_config').with(
:rabbit_use_ssl => '<SERVICE DEFAULT>',
)
end
end
context 'with rabbit_hosts parameter (one server)' do
let :params do
{ :rabbit_hosts => ['rabbit:5673'] }
end
it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__messaging__rabbit('nova_config').with(
:rabbit_use_ssl => '<SERVICE DEFAULT>',
)
end
end
context 'with kombu_reconnect_delay set to 5.0' do
let :params do
{ :kombu_reconnect_delay => '5.0' }
@ -292,10 +240,9 @@ describe 'nova' do
end
end
context 'with rabbit_ha_queues set to false and with rabbit_hosts' do
context 'with rabbit_ha_queues set to false' do
let :params do
{ :rabbit_ha_queues => 'false',
:rabbit_hosts => ['rabbit:5673'] }
{ :rabbit_ha_queues => false }
end
it 'configures rabbit' do
@ -305,26 +252,21 @@ describe 'nova' do
context 'with amqp_durable_queues parameter' do
let :params do
{ :rabbit_hosts => ['rabbit:5673'],
:amqp_durable_queues => true }
{ :amqp_durable_queues => true }
end
it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true)
is_expected.to contain_oslo__messaging__rabbit('nova_config').with(
:rabbit_use_ssl => '<SERVICE DEFAULT>',
:rabbit_use_ssl => '<SERVICE DEFAULT>',
)
end
end
context 'with rabbit ssl enabled with kombu' do
let :params do
{ :rabbit_hosts => ['rabbit:5673'],
:rabbit_use_ssl => true,
{ :rabbit_use_ssl => true,
:kombu_ssl_ca_certs => '/etc/ca.cert',
:kombu_ssl_certfile => '/etc/certfile',
:kombu_ssl_keyfile => '/etc/key',
@ -342,12 +284,11 @@ describe 'nova' do
context 'with rabbit ssl enabled without kombu' do
let :params do
{ :rabbit_hosts => ['rabbit:5673'],
:rabbit_use_ssl => true, }
{ :rabbit_use_ssl => true, }
end
it { is_expected.to contain_oslo__messaging__rabbit('nova_config').with(
:rabbit_use_ssl => true,
:rabbit_use_ssl => true,
)}
end

View File

@ -67,20 +67,6 @@ describe 'nova::migration::libvirt' do
}).that_requires('Package[libvirt]').that_notifies('Service[libvirt]') }
end
context 'with tls enabled (legacy)' do
let :params do
{
:use_tls => true,
}
end
it { is_expected.to contain_libvirtd_config('listen_tls').with_value('1') }
it { is_expected.to contain_libvirtd_config('listen_tcp').with_value('0') }
it { is_expected.to contain_libvirtd_config('auth_tls').with_value("\"none\"") }
it { is_expected.not_to contain_libvirtd_config('auth_tcp') }
it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('qemu+tls://%s/system')}
it { is_expected.to contain_nova_config('libvirt/live_migration_inbound_addr').with_value('<SERVICE DEFAULT>')}
end
context 'with tls enabled' do
let :params do
{

View File

@ -1,31 +0,0 @@
require 'spec_helper'
describe 'nova::cell_v2::cell' do
let (:title) { 'foo' }
shared_examples_for 'nova::cell_v2::cell' do
context 'with defaults' do
it {
is_expected.to contain_nova_cell_v2("#{title}").with(
:transport_url => 'default',
:database_connection => 'default'
)
}
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_configures 'nova::cell_v2::cell'
end
end
end