From f44d3c4987a65cc277af8be9a1d0cdc70b0cd50b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 4 Nov 2021 09:07:10 +0900 Subject: [PATCH] Use service anchor to ensure API is up ... instead of the individual service resource which can be named differently according to service_name. Closes-Bug: #1949658 Change-Id: I6be21a4653d67c63a3bd1fa8b814ecdb1257f097 --- manifests/api.pp | 2 +- spec/classes/nova_api_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index 2714fc92c..7dce20be7 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -366,6 +366,6 @@ as a standalone service, or httpd for being run by a httpd server") } } $validation_options_hash = merge ($defaults, $validation_options) - create_resources('openstacklib::service_validation', $validation_options_hash, {'subscribe' => 'Service[nova-api]'}) + create_resources('openstacklib::service_validation', $validation_options_hash, {'subscribe' => 'Anchor[nova::service::end]'}) } } diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 6cfb02432..abb79f653 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -143,7 +143,7 @@ describe 'nova::api' do end it { is_expected.to contain_openstacklib__service_validation('nova-api').with( :command => 'nova --os-auth-url http://127.0.0.1:5000/ --os-project-name services --os-username novae --os-password passw0rd flavor-list', - :subscribe => 'Service[nova-api]', + :subscribe => 'Anchor[nova::service::end]', )} end @@ -157,7 +157,7 @@ describe 'nova::api' do end it { is_expected.to contain_openstacklib__service_validation('nova-api').with( :command => 'my-script', - :subscribe => 'Service[nova-api]', + :subscribe => 'Anchor[nova::service::end]', )} end