-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
NickL Note: Commenting out specs here that will fail, and re-implementing them as the logic is added in future commits. Most pull in specs from the ansible_tower provider repo, so they are no longer valid anyway, but can't be tested at this stage since the new model code doesn't exist yet. Also, removed the shared specs for credential.rb for the moment. This will be revisited in the future, but for now doesn't have enough merit to be included with the current implementation. Worth noting, however, is the mthods `notify_on_provider_interaction?` and `.native_ref` have been added to the credential model, since that is currently the functionality of the AnsibleTower provider (and EmbeddedAnsible by virtue of the shared code between the two), so I mirrored that here. This also fixes some test cases that were relying on the type casting of `native_ref` to work properly. The credential logic will be re-implemented and used in the future.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential < | ||
ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScript < | ||
ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScript | ||
|
||
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfigurationScript | ||
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::TowerApi | ||
|
||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScript < ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScript | ||
FRIENDLY_NAME = "Ansible Automation Inside Job Template".freeze | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationWorkflow < ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScript | ||
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfigurationWorkflow | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfiguredSystem < | ||
ManageIQ::Providers::EmbeddedAutomationManager::ConfiguredSystem | ||
|
||
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfiguredSystem | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfiguredSystem < ManageIQ::Providers::EmbeddedAutomationManager::ConfiguredSystem | ||
include ProviderObjectMixin | ||
end |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Job::Status < ::OrchestrationStack::Status | ||
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Job::Status | ||
end |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::Provider < ::Provider | ||
include ManageIQ::Providers::AnsibleTower::Shared::Provider | ||
|
||
include_concern 'DefaultAnsibleObjects' | ||
|
||
has_one :automation_manager, | ||
:foreign_key => "provider_id", | ||
:class_name => "ManageIQ::Providers::EmbeddedAnsible::AutomationManager", | ||
:dependent => :destroy, # to be removed after ansible_tower side code is updated | ||
:autosave => true | ||
|
||
def self.raw_connect(base_url, username, password, verify_ssl) | ||
return super if MiqRegion.my_region.role_active?('embedded_ansible') | ||
raise StandardError, 'Embedded ansible is disabled' | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
describe ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ScmCredential do | ||
let(:manager) do | ||
FactoryBot.create(:provider_embedded_ansible, :with_authentication, :default_organization => 1).managers.first | ||
FactoryBot.create(:provider_embedded_ansible, :default_organization => 1).managers.first | ||
end | ||
|
||
before do | ||
EvmSpecHelper.assign_embedded_ansible_role | ||
end | ||
|
||
it_behaves_like 'ansible credential' | ||
# it_behaves_like 'ansible credential' | ||
end |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
describe ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Job::Status do | ||
it_behaves_like 'ansible job status' | ||
# it_behaves_like 'ansible job status' | ||
end |