From 0d8382175a844928854fff26c66512fe8aaae18d Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Wed, 28 Mar 2018 11:40:59 +0800 Subject: [PATCH] Add glance_service_type option Add trove::glance_service_type option to configure glance service type to use when searching catalog. Change-Id: I14d137a06c793eba3cdff6f9d2776fa7f987dc40 --- manifests/api.pp | 1 + manifests/init.pp | 5 +++++ manifests/taskmanager.pp | 1 + .../add_glance_service_type-option-1b62f22b9e3d3290.yaml | 4 ++++ spec/classes/trove_api_spec.rb | 2 ++ spec/classes/trove_taskmanager_spec.rb | 2 ++ 6 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add_glance_service_type-option-1b62f22b9e3d3290.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 2b8cfff5..2b06e1d3 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -265,6 +265,7 @@ the future release. Please use trove::api::package_ensure instead.") 'DEFAULT/nova_compute_service_type': value => $::trove::nova_compute_service_type; 'DEFAULT/cinder_service_type': value => $::trove::cinder_service_type; 'DEFAULT/neutron_service_type': value => $::trove::neutron_service_type; + 'DEFAULT/glance_service_type': value => $::trove::glance_service_type; 'DEFAULT/swift_service_type': value => $::trove::swift_service_type; } diff --git a/manifests/init.pp b/manifests/init.pp index d6d61145..41d0def4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -244,6 +244,10 @@ # (optional) Neutron service type to use when searching catalog. # Defaults to 'network'. # +# [*glance_service_type*] +# (optional) Glance service type to use when searching catalog. +# Defaults to 'image'. +# # [*nova_compute_endpoint_type*] # (optional) Service endpoint type to use when searching catalog. # Defaults to $::os_service_default @@ -375,6 +379,7 @@ class trove( $cinder_service_type = 'volumev2', $swift_service_type = 'object-store', $neutron_service_type = 'network', + $glance_service_type = 'image', $nova_compute_endpoint_type = $::os_service_default, $cinder_endpoint_type = $::os_service_default, $swift_endpoint_type = $::os_service_default, diff --git a/manifests/taskmanager.pp b/manifests/taskmanager.pp index 13543755..cfba2b49 100644 --- a/manifests/taskmanager.pp +++ b/manifests/taskmanager.pp @@ -172,6 +172,7 @@ the future release. Please use trove::default_neutron_networks instead.") 'DEFAULT/nova_compute_service_type': value => $::trove::nova_compute_service_type; 'DEFAULT/cinder_service_type': value => $::trove::cinder_service_type; 'DEFAULT/neutron_service_type': value => $::trove::neutron_service_type; + 'DEFAULT/glance_service_type': value => $::trove::glance_service_type; 'DEFAULT/swift_service_type': value => $::trove::swift_service_type; } diff --git a/releasenotes/notes/add_glance_service_type-option-1b62f22b9e3d3290.yaml b/releasenotes/notes/add_glance_service_type-option-1b62f22b9e3d3290.yaml new file mode 100644 index 00000000..ff7acccb --- /dev/null +++ b/releasenotes/notes/add_glance_service_type-option-1b62f22b9e3d3290.yaml @@ -0,0 +1,4 @@ +--- +features: + - Add trove::glance_service_type option to configure glance + service type to use when searching catalog. diff --git a/spec/classes/trove_api_spec.rb b/spec/classes/trove_api_spec.rb index a7d30222..c23dfe9a 100644 --- a/spec/classes/trove_api_spec.rb +++ b/spec/classes/trove_api_spec.rb @@ -37,6 +37,7 @@ describe 'trove::api' do cinder_service_type => 'volume', swift_service_type => 'object-store', neutron_service_type => 'network', + glance_service_type => 'image', nova_compute_endpoint_type => '', cinder_endpoint_type => '', swift_endpoint_type => '', @@ -79,6 +80,7 @@ describe 'trove::api' do is_expected.to contain_trove_config('DEFAULT/cinder_service_type').with_value('volume') is_expected.to contain_trove_config('DEFAULT/swift_service_type').with_value('object-store') is_expected.to contain_trove_config('DEFAULT/neutron_service_type').with_value('network') + is_expected.to contain_trove_config('DEFAULT/glance_service_type').with_value('image') is_expected.to contain_trove_config('DEFAULT/nova_compute_endpoint_type').with_value('') is_expected.to contain_trove_config('DEFAULT/cinder_endpoint_type').with_value('') is_expected.to contain_trove_config('DEFAULT/swift_endpoint_type').with_value('') diff --git a/spec/classes/trove_taskmanager_spec.rb b/spec/classes/trove_taskmanager_spec.rb index ae14e3d7..69847760 100644 --- a/spec/classes/trove_taskmanager_spec.rb +++ b/spec/classes/trove_taskmanager_spec.rb @@ -33,6 +33,7 @@ describe 'trove::taskmanager' do cinder_service_type => 'volume', swift_service_type => 'object-store', neutron_service_type => 'network', + glance_service_type => 'image', nova_compute_endpoint_type => '', cinder_endpoint_type => '', swift_endpoint_type => '', @@ -66,6 +67,7 @@ describe 'trove::taskmanager' do is_expected.to contain_trove_taskmanager_config('DEFAULT/cinder_service_type').with_value('volume') is_expected.to contain_trove_taskmanager_config('DEFAULT/swift_service_type').with_value('object-store') is_expected.to contain_trove_taskmanager_config('DEFAULT/neutron_service_type').with_value('network') + is_expected.to contain_trove_taskmanager_config('DEFAULT/glance_service_type').with_value('image') is_expected.to contain_trove_taskmanager_config('DEFAULT/nova_compute_endpoint_type').with_value('') is_expected.to contain_trove_taskmanager_config('DEFAULT/cinder_endpoint_type').with_value('') is_expected.to contain_trove_taskmanager_config('DEFAULT/swift_endpoint_type').with_value('')