From cf01648b23142194d1aa3fc172263c4f5d54659f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Mon, 30 Mar 2020 16:40:20 +0200 Subject: [PATCH] Delegate endpoints and authentications on managers to the provider --- .../manageiq/providers/foreman/configuration_manager.rb | 2 ++ app/models/manageiq/providers/foreman/provisioning_manager.rb | 2 ++ .../manageiq/providers/foreman/configuration_manager_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/manageiq/providers/foreman/configuration_manager.rb b/app/models/manageiq/providers/foreman/configuration_manager.rb index 4fb3f68..e7ce737 100644 --- a/app/models/manageiq/providers/foreman/configuration_manager.rb +++ b/app/models/manageiq/providers/foreman/configuration_manager.rb @@ -10,7 +10,9 @@ class ManageIQ::Providers::Foreman::ConfigurationManager < ManageIQ::Providers:: delegate :authentication_check, :authentication_status, :authentication_status_ok?, + :authentications, :connect, + :endpoints, :verify_credentials, :with_provider_connection, :to => :provider diff --git a/app/models/manageiq/providers/foreman/provisioning_manager.rb b/app/models/manageiq/providers/foreman/provisioning_manager.rb index 0e94934..9469cca 100644 --- a/app/models/manageiq/providers/foreman/provisioning_manager.rb +++ b/app/models/manageiq/providers/foreman/provisioning_manager.rb @@ -4,7 +4,9 @@ class ManageIQ::Providers::Foreman::ProvisioningManager < ManageIQ::Providers::P delegate :authentication_check, :authentication_status, :authentication_status_ok?, + :authentications, :connect, + :endpoints, :verify_credentials, :with_provider_connection, :to => :provider diff --git a/spec/models/manageiq/providers/foreman/configuration_manager_spec.rb b/spec/models/manageiq/providers/foreman/configuration_manager_spec.rb index 3645df8..24ef530 100644 --- a/spec/models/manageiq/providers/foreman/configuration_manager_spec.rb +++ b/spec/models/manageiq/providers/foreman/configuration_manager_spec.rb @@ -1,7 +1,7 @@ describe ManageIQ::Providers::Foreman::ConfigurationManager do - let(:provider) { FactoryBot.build(:provider_foreman) } + let(:provider) { configuration_manager.provider } let(:configuration_manager) do - FactoryBot.build(:configuration_manager_foreman, :provider => provider) + FactoryBot.build(:configuration_manager_foreman) end describe "#connect" do