diff --git a/app/models/configuration_workflow.rb b/app/models/configuration_workflow.rb deleted file mode 100644 index 2cc98bcfe53..00000000000 --- a/app/models/configuration_workflow.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ConfigurationWorkflow < ConfigurationScriptBase - def self.base_model - ConfigurationWorkflow - end -end diff --git a/app/models/manageiq/providers/automation_manager.rb b/app/models/manageiq/providers/automation_manager.rb index cd84a4adc9e..70e88b52f1a 100644 --- a/app/models/manageiq/providers/automation_manager.rb +++ b/app/models/manageiq/providers/automation_manager.rb @@ -12,7 +12,6 @@ class ManageIQ::Providers::AutomationManager < ManageIQ::Providers::BaseManager has_many :configured_systems, :dependent => :destroy, :foreign_key => "manager_id" has_many :configuration_profiles, :dependent => :destroy, :foreign_key => "manager_id" has_many :configuration_scripts, :dependent => :destroy, :foreign_key => "manager_id" - has_many :configuration_workflows, :dependent => :destroy, :foreign_key => "manager_id", :inverse_of => :manager has_many :credentials, :class_name => "ManageIQ::Providers::AutomationManager::Authentication", :as => :resource, :dependent => :destroy has_many :inventory_groups, :dependent => :destroy, :foreign_key => "ems_id", :inverse_of => :manager diff --git a/app/models/manageiq/providers/automation_manager/configuration_workflow.rb b/app/models/manageiq/providers/automation_manager/configuration_workflow.rb deleted file mode 100644 index bfa9415d4fc..00000000000 --- a/app/models/manageiq/providers/automation_manager/configuration_workflow.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::AutomationManager::ConfigurationWorkflow < ::ConfigurationWorkflow - belongs_to :manager, :class_name => "ManageIQ::Providers::AutomationManager", :inverse_of => :configuration_workflows -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..29a14c008f6 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager.rb @@ -26,6 +26,8 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager < ManageIQ::Provid require_nested :Refresher require_nested :RefreshWorker + has_many :configuration_workflows, :dependent => :destroy, :foreign_key => "manager_id", :inverse_of => :manager + def self.ems_type @ems_type ||= "embedded_ansible_automation".freeze end 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 069ec74b3b4..ddf5fbbc8b6 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,3 @@ -class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationWorkflow < ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationWorkflow +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_automation_manager/configuration_workflow.rb b/app/models/manageiq/providers/embedded_automation_manager/configuration_workflow.rb deleted file mode 100644 index e5a199ffeab..00000000000 --- a/app/models/manageiq/providers/embedded_automation_manager/configuration_workflow.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationWorkflow < ManageIQ::Providers::AutomationManager::ConfigurationWorkflow -end diff --git a/app/models/manageiq/providers/external_automation_manager/configuration_workflow.rb b/app/models/manageiq/providers/external_automation_manager/configuration_workflow.rb deleted file mode 100644 index 91106c53990..00000000000 --- a/app/models/manageiq/providers/external_automation_manager/configuration_workflow.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ManageIQ::Providers::ExternalAutomationManager::ConfigurationWorkflow < ManageIQ::Providers::AutomationManager::ConfigurationWorkflow -end diff --git a/locale/en.yml b/locale/en.yml index 05c6ee82af0..f208be392d7 100644 --- a/locale/en.yml +++ b/locale/en.yml @@ -704,6 +704,7 @@ en: ContainerQuota: Container Quota CustomButton: Button CustomButtonSet: Button Group + ConfigurationScript: Template (Ansible Tower) ConfigurationScriptSource: Repository Container: Container ContainerPerformance: Performance - Container @@ -774,6 +775,7 @@ en: ManageIQ::Providers::AnsibleTower::AutomationManager::VmwareCredential: Credential (VMware) ManageIQ::Providers::AnsibleTower::AutomationManager: Automation Manager (Ansible Tower) ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript: Job Template (Ansible Tower) + ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationWorkflow: Workflow Template (Ansible Tower) ManageIQ::Providers::AnsibleTower::AutomationManager::Playbook: Playbook (Ansible Tower) ManageIQ::Providers::Foreman::ConfigurationManager: Configuration Manager (Foreman) ManageIQ::Providers::ConfigurationManager: Configuration Manager diff --git a/spec/factories/configuration_script.rb b/spec/factories/configuration_script.rb index 9ad91c36dc5..21fd5fa7cfd 100644 --- a/spec/factories/configuration_script.rb +++ b/spec/factories/configuration_script.rb @@ -11,7 +11,9 @@ :parent => :configuration_script_payload factory :configuration_script, :class => "ConfigurationScript", :parent => :configuration_script_base - factory :configuration_workflow, :class => "ConfigurationWorkflow", :parent => :configuration_script_base + factory :configuration_workflow, + :class => "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationWorkflow", + :parent => :configuration_script factory :ansible_configuration_script, :class => "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript", :parent => :configuration_script