From b1181f62429d3b1f58d7aa884fb30c4ad8f7eb7e Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Tue, 25 Sep 2018 15:17:35 +0200 Subject: [PATCH] Remove os_region_name and deprecate os_interface The placement options os_region_name and os_interface is removed as of Rocky [1]. This removes the already deprecated os_region_name parameter and users should use the region_name parameter instead. It also deprecates the os_interface parameter and users should use the valid_interfaces parameter instead. The configuration file is changed so that the placement/valid_interfaces option is set instead of os_interface since that one does not have any effect. [1] https://docs.openstack.org/releasenotes/nova/rocky.html Change-Id: I13201f8edf5d0ef87c6a4d90d3726ae7f1c2c300 --- manifests/placement.pp | 27 +++++++++---------- ..._region-os_interface-c317fe197b186877.yaml | 9 +++++++ spec/classes/nova_placement_spec.rb | 6 ++--- 3 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/nova-placement-remove-deprecate-os_region-os_interface-c317fe197b186877.yaml diff --git a/manifests/placement.pp b/manifests/placement.pp index abbcd8b99..4969ade28 100644 --- a/manifests/placement.pp +++ b/manifests/placement.pp @@ -54,9 +54,9 @@ # through the OpenStack Identity service. # Defaults to 'RegionOne' # -# [*os_interface*] -# (optional) interface name used for getting the keystone endpoint for -# the placement API. +# [*valid_interfaces*] +# (optional) Interface names used for getting the keystone endpoint for +# the placement API. Comma separated if multiple. # Defaults to $::os_service_default # # [*username*] @@ -72,9 +72,9 @@ # # DEPRECATED PARAMETERS # -# [*os_region_name*] -# (optional) Region name for connecting to Nova Placement API service in admin context -# through the OpenStack Identity service. +# [*os_interface*] +# (optional) interface name used for getting the keystone endpoint for +# the placement API. # Defaults to undef # class nova::placement( @@ -87,24 +87,23 @@ class nova::placement( $auth_type = 'password', $auth_url = 'http://127.0.0.1:5000/v3', $region_name = 'RegionOne', - $os_interface = $::os_service_default, + $valid_interfaces = $::os_service_default, $project_domain_name = 'Default', $project_name = 'services', $user_domain_name = 'Default', $username = 'placement', # DEPRECATED PARAMETERS - $os_region_name = undef, + $os_interface = undef, ) inherits nova::params { include ::nova::deps validate_bool($enabled) - if $os_region_name { - warning('The os_region_name parameter is deprecated and will be removed \ -in a future release. Please use region_name instead.') + if $os_interface { + warning('nova::placement::os_interface is deprecated for removal, please use valid_interfaces instead.') } - $region_name_real = pick($os_region_name, $region_name) + $valid_interfaces_real = pick($os_interface, $valid_interfaces) if $service_name == 'nova-placement-api' { nova::generic_service { 'nova-placement-api': @@ -129,8 +128,8 @@ in a future release. Please use region_name instead.') 'placement/project_name': value => $project_name; 'placement/user_domain_name': value => $user_domain_name; 'placement/username': value => $username; - 'placement/region_name': value => $region_name_real; - 'placement/os_interface': value => $os_interface; + 'placement/region_name': value => $region_name; + 'placement/valid_interfaces': value => $valid_interfaces_real; } } diff --git a/releasenotes/notes/nova-placement-remove-deprecate-os_region-os_interface-c317fe197b186877.yaml b/releasenotes/notes/nova-placement-remove-deprecate-os_region-os_interface-c317fe197b186877.yaml new file mode 100644 index 000000000..6c27b6c04 --- /dev/null +++ b/releasenotes/notes/nova-placement-remove-deprecate-os_region-os_interface-c317fe197b186877.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The deprecated nova::placement::os_region_name parameter is now removed. + Please use the nova::placement::region_name parameter instead. +deprecations: + - | + The nova::placement::os_interface parameter is now deprecated and will be + removed the next release. Please use nova::placement::valid_interfaces instead. diff --git a/spec/classes/nova_placement_spec.rb b/spec/classes/nova_placement_spec.rb index 8dde4aa73..3c80ff0a5 100644 --- a/spec/classes/nova_placement_spec.rb +++ b/spec/classes/nova_placement_spec.rb @@ -26,7 +26,7 @@ describe 'nova::placement' do is_expected.to contain_nova_config('placement/project_name').with_value(default_params[:project_name]) is_expected.to contain_nova_config('placement/project_domain_name').with_value(default_params[:project_domain_name]) is_expected.to contain_nova_config('placement/region_name').with_value(default_params[:region_name]) - is_expected.to contain_nova_config('placement/os_interface').with_value('') + is_expected.to contain_nova_config('placement/valid_interfaces').with_value('') is_expected.to contain_nova_config('placement/username').with_value(default_params[:username]) is_expected.to contain_nova_config('placement/user_domain_name').with_value(default_params[:user_domain_name]) is_expected.to contain_nova_config('placement/auth_url').with_value(default_params[:auth_url]) @@ -40,7 +40,7 @@ describe 'nova::placement' do :project_name => 'service', :project_domain_name => 'default', :region_name => 'RegionTwo', - :os_interface => 'internal', + :valid_interfaces => 'internal', :username => 'placement2', :user_domain_name => 'default', :auth_url => 'https://127.0.0.1:5000/v3', @@ -53,7 +53,7 @@ describe 'nova::placement' do is_expected.to contain_nova_config('placement/project_name').with_value(params[:project_name]) is_expected.to contain_nova_config('placement/project_domain_name').with_value(params[:project_domain_name]) is_expected.to contain_nova_config('placement/region_name').with_value(params[:region_name]) - is_expected.to contain_nova_config('placement/os_interface').with_value(params[:os_interface]) + is_expected.to contain_nova_config('placement/valid_interfaces').with_value(params[:valid_interfaces]) is_expected.to contain_nova_config('placement/username').with_value(params[:username]) is_expected.to contain_nova_config('placement/user_domain_name').with_value(params[:user_domain_name]) is_expected.to contain_nova_config('placement/auth_url').with_value(params[:auth_url])