Merge "Add option to control flavor management"

This commit is contained in:
Zuul 2024-06-10 07:42:19 +00:00 committed by Gerrit Code Review
commit d9ece3f340
2 changed files with 63 additions and 54 deletions

View File

@ -32,8 +32,6 @@
# Defaults to undef # Defaults to undef
# [*configure_networks*] # [*configure_networks*]
# Defaults to true # Defaults to true
# [*l2gw_switch*]
# Defaults to $facts['os_service_default']
# [*public_network_name*] # [*public_network_name*]
# Defaults to undef # Defaults to undef
# [*neutron_api_extensions*] # [*neutron_api_extensions*]
@ -106,18 +104,22 @@
# Defaults to false # Defaults to false
# [*ssh_key_type*] # [*ssh_key_type*]
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# [*flavor_name*] # [*configure_flavors*]
# Defaults to undef # Defaults to true
# [*flavor_name_alt*]
# Defaults to undef
# [*flavor_ref*] # [*flavor_ref*]
# Defaults to undef # Defaults to undef
# [*flavor_ref_alt*] # [*flavor_ref_alt*]
# Defaults to undef # Defaults to undef
# [*flavor_name*]
# Defaults to undef
# [*flavor_name_alt*]
# Defaults to undef
# [*resize_available*] # [*resize_available*]
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# [*use_dynamic_credentials*] # [*use_dynamic_credentials*]
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# [*l2gw_switch*]
# Defaults to $facts['os_service_default']
# [*public_network_id*] # [*public_network_id*]
# Defaults to undef # Defaults to undef
# [*public_router_id*] # [*public_router_id*]
@ -387,6 +389,9 @@ class tempest(
$image_ref_alt = undef, $image_ref_alt = undef,
$image_ssh_user = undef, $image_ssh_user = undef,
$image_alt_ssh_user = undef, $image_alt_ssh_user = undef,
$run_ssh = false,
$ssh_key_type = $facts['os_service_default'],
Boolean $configure_flavors = true,
$flavor_ref = undef, $flavor_ref = undef,
$flavor_ref_alt = undef, $flavor_ref_alt = undef,
Optional[String[1]] $flavor_name = undef, Optional[String[1]] $flavor_name = undef,
@ -400,8 +405,6 @@ class tempest(
$volume_build_interval = $facts['os_service_default'], $volume_build_interval = $facts['os_service_default'],
$volume_build_timeout = $facts['os_service_default'], $volume_build_timeout = $facts['os_service_default'],
$object_storage_build_timeout = $facts['os_service_default'], $object_storage_build_timeout = $facts['os_service_default'],
$run_ssh = false,
$ssh_key_type = $facts['os_service_default'],
# testing features that are supported # testing features that are supported
$resize_available = $facts['os_service_default'], $resize_available = $facts['os_service_default'],
$use_dynamic_credentials = $facts['os_service_default'], $use_dynamic_credentials = $facts['os_service_default'],
@ -882,60 +885,62 @@ class tempest(
} }
if ! $flavor_ref and $flavor_name { if $nova_available and $configure_flavors {
tempest_flavor_id_setter { 'compute/flavor_ref': if ! $flavor_ref and $flavor_name {
ensure => present, tempest_flavor_id_setter { 'compute/flavor_ref':
tempest_conf_path => $tempest_conf, ensure => present,
flavor_name => $flavor_name, tempest_conf_path => $tempest_conf,
} flavor_name => $flavor_name,
Tempest_config<||> -> Tempest_flavor_id_setter['compute/flavor_ref'] }
Keystone_user_role<||> -> Tempest_flavor_id_setter['compute/flavor_ref'] Tempest_config<||> -> Tempest_flavor_id_setter['compute/flavor_ref']
Keystone_user_role<||> -> Tempest_flavor_id_setter['compute/flavor_ref']
tempest_flavor_id_setter { 'heat_plugin/minimal_instance_type': tempest_flavor_id_setter { 'heat_plugin/minimal_instance_type':
ensure => present, ensure => present,
tempest_conf_path => $tempest_conf, tempest_conf_path => $tempest_conf,
flavor_name => $flavor_name, flavor_name => $flavor_name,
}
Tempest_config<||> -> Tempest_flavor_id_setter['heat_plugin/minimal_instance_type']
Keystone_user_role<||> -> Tempest_flavor_id_setter['heat_plugin/minimal_instance_type']
} elsif ($flavor_name and $flavor_ref) {
fail('flavor_ref and flavor_name are both set: please set only one of them')
} }
Tempest_config<||> -> Tempest_flavor_id_setter['heat_plugin/minimal_instance_type']
Keystone_user_role<||> -> Tempest_flavor_id_setter['heat_plugin/minimal_instance_type']
} elsif ($flavor_name and $flavor_ref) {
fail('flavor_ref and flavor_name are both set: please set only one of them')
}
if ! $flavor_ref_alt and $flavor_name_alt { if ! $flavor_ref_alt and $flavor_name_alt {
tempest_flavor_id_setter { 'compute/flavor_ref_alt': tempest_flavor_id_setter { 'compute/flavor_ref_alt':
ensure => present, ensure => present,
tempest_conf_path => $tempest_conf, tempest_conf_path => $tempest_conf,
flavor_name => $flavor_name_alt, flavor_name => $flavor_name_alt,
}
Tempest_config<||> -> Tempest_flavor_id_setter['compute/flavor_ref_alt']
Keystone_user_role<||> -> Tempest_flavor_id_setter['compute/flavor_ref_alt']
} elsif ($flavor_name_alt and $flavor_ref_alt) {
fail('flavor_ref_alt and flavor_name_alt are both set: please set only one of them')
} }
Tempest_config<||> -> Tempest_flavor_id_setter['compute/flavor_ref_alt']
Keystone_user_role<||> -> Tempest_flavor_id_setter['compute/flavor_ref_alt']
} elsif ($flavor_name_alt and $flavor_ref_alt) {
fail('flavor_ref_alt and flavor_name_alt are both set: please set only one of them')
}
if ! $db_flavor_ref and $db_flavor_name { if ! $db_flavor_ref and $db_flavor_name {
tempest_flavor_id_setter { 'database/db_flavor_ref': tempest_flavor_id_setter { 'database/db_flavor_ref':
ensure => present, ensure => present,
tempest_conf_path => $tempest_conf, tempest_conf_path => $tempest_conf,
flavor_name => $db_flavor_name, flavor_name => $db_flavor_name,
}
Tempest_config<||> -> Tempest_flavor_id_setter['database/db_flavor_ref']
Keystone_user_role<||> -> Tempest_flavor_id_setter['database/db_flavor_ref']
} elsif ($db_flavor_name and $db_flavor_ref) {
fail('db_flavor_ref and db_flavor_name are both set: please set only one of them')
} }
Tempest_config<||> -> Tempest_flavor_id_setter['database/db_flavor_ref']
Keystone_user_role<||> -> Tempest_flavor_id_setter['database/db_flavor_ref']
} elsif ($db_flavor_name and $db_flavor_ref) {
fail('db_flavor_ref and db_flavor_name are both set: please set only one of them')
}
if !$heat_flavor_ref and $heat_flavor_name { if !$heat_flavor_ref and $heat_flavor_name {
tempest_flavor_id_setter { 'heat_plugin/instance_type': tempest_flavor_id_setter { 'heat_plugin/instance_type':
ensure => present, ensure => present,
tempest_conf_path => $tempest_conf, tempest_conf_path => $tempest_conf,
flavor_name => $heat_flavor_name, flavor_name => $heat_flavor_name,
}
Tempest_config<||> -> Tempest_flavor_id_setter['heat_plugin/instance_type']
Keystone_user_role<||> -> Tempest_flavor_id_setter['heat_plugin/instance_type']
} elsif ($heat_flavor_name and $heat_flavor_ref) {
fail('heat_flavor_ref and heat_flavor_name are both set: please set only one of them')
} }
Tempest_config<||> -> Tempest_flavor_id_setter['heat_plugin/instance_type']
Keystone_user_role<||> -> Tempest_flavor_id_setter['heat_plugin/instance_type']
} elsif ($heat_flavor_name and $heat_flavor_ref) {
fail('heat_flavor_ref and heat_flavor_name are both set: please set only one of them')
} }
if $glance_available and $configure_images { if $glance_available and $configure_images {

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``tempest::configure_flavors`` parameter has been added.