Skip to content

Commit

Permalink
ConfigurationWorkflow to exist only in AutomationManager space
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswnl committed Jul 24, 2018
1 parent 9824734 commit b11fb56
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
5 changes: 0 additions & 5 deletions app/models/configuration_workflow.rb

This file was deleted.

7 changes: 6 additions & 1 deletion app/models/manageiq/providers/automation_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ 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_scripts,
:dependent => :destroy,
:foreign_key => "manager_id",
:class_name => "::ConfigurationScript",
:inverse_of => :manager

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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class ManageIQ::Providers::AutomationManager::ConfigurationWorkflow < ::ConfigurationWorkflow
class ManageIQ::Providers::AutomationManager::ConfigurationWorkflow < ::ConfigurationScript
belongs_to :manager, :class_name => "ManageIQ::Providers::AutomationManager", :inverse_of => :configuration_workflows
end
2 changes: 2 additions & 0 deletions locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ en:
ContainerQuota: Container Quota
CustomButton: Button
CustomButtonSet: Button Group
ConfigurationScript: Template (Ansible Tower)
ConfigurationScriptSource: Repository
Container: Container
ContainerPerformance: Performance - Container
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion spec/factories/configuration_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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::AutomationManager::ConfigurationWorkflow",
:parent => :configuration_script
factory :ansible_configuration_script,
:class => "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript",
:parent => :configuration_script
Expand Down

0 comments on commit b11fb56

Please sign in to comment.