Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing ConfigurationScriptSource hierarchy and Automate models #14069

Merged
merged 5 commits into from
Feb 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager < ManageIQ::Providers
require_nested :VmwareCredential

require_nested :ConfigurationScript
require_nested :ConfigurationScriptSource
require_nested :ConfiguredSystem
require_nested :EventCatcher
require_nested :EventParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScriptSource < ConfigurationScriptSource
class ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScriptSource <
ManageIQ::Providers::ExternalAutomationManager::ConfigurationScriptSource
end
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def credentials
when 'net' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::NetworkCredential'
when 'ssh' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::MachineCredential'
when 'vmware' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::VmwareCredential'
# when 'scm' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::???Credential'
when 'scm' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::ScmCredential'
when 'aws' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::AmazonCredential'
when 'rax' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::RackspaceCredential'
when 'satellite6' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::Satellite6Credential'
Expand All @@ -96,7 +96,7 @@ def credentials
# when 'azure' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::???Credential'
when 'azure_rm' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::AzureCredential'
when 'openstack' then 'ManageIQ::Providers::AnsibleTower::AutomationManager::OpenstackCredential'
else 'ManageIQ::Providers::AutomationManager::Authentication'
else 'ManageIQ::Providers::AnsibleTower::AutomationManager::Credential'
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class ManageIQ::Providers::AnsibleTower::InventoryCollectionDefault::AutomationM
class << self
def inventory_root_groups(extra_attributes = {})
attributes = {
:model_class => ManageIQ::Providers::AutomationManager::InventoryRootGroup,
:model_class => ManageIQ::Providers::AnsibleTower::AutomationManager::InventoryRootGroup,
:association => :inventory_root_groups,
}
attributes.merge!(extra_attributes)
Expand All @@ -28,7 +28,7 @@ def configuration_scripts(extra_attributes = {})

def configuration_script_sources(extra_attributes = {})
attributes = {
:model_class => ConfigurationScriptSource,
:model_class => ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScriptSource,
:association => :configuration_script_sources,
:manager_ref => [:manager_ref],
}
Expand All @@ -46,7 +46,7 @@ def configuration_script_payloads(extra_attributes = {})

def credentials(extra_attributes = {})
attributes = {
:model_class => ManageIQ::Providers::AutomationManager::Authentication,
:model_class => ManageIQ::Providers::AnsibleTower::AutomationManager::Credential,
:association => :credentials,
:manager_ref => [:manager_ref],
}
Expand Down
1 change: 1 addition & 0 deletions app/models/manageiq/providers/automation_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class ManageIQ::Providers::AutomationManager < ::ExtManagementSystem
require_nested :Authentication
require_nested :ConfigurationScript
require_nested :ConfigurationScriptPayload
require_nested :ConfigurationScriptSource
require_nested :ConfiguredSystem
require_nested :InventoryGroup
require_nested :InventoryRootGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class ManageIQ::Providers::AutomationManager::ConfigurationScriptSource < ConfigurationScriptSource
end
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager < ManageIQ::Provid
require_nested :VmwareCredential

require_nested :ConfigurationScript
require_nested :ConfigurationScriptSource
require_nested :ConfiguredSystem
require_nested :Job
require_nested :Playbook
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScriptSource <
ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptSource
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class ManageIQ::Providers::EmbeddedAutomationManager < ManageIQ::Providers::Auto
require_nested :Authentication
require_nested :ConfigurationScript
require_nested :ConfigurationScriptPayload
require_nested :ConfigurationScriptSource
require_nested :ConfiguredSystem
require_nested :OrchestrationStack
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptSource <
ManageIQ::Providers::AutomationManager::ConfigurationScriptSource
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class ManageIQ::Providers::ExternalAutomationManager < ManageIQ::Providers::Auto
require_nested :Authentication
require_nested :ConfigurationScript
require_nested :ConfigurationScriptPayload
require_nested :ConfigurationScriptSource
require_nested :ConfiguredSystem
require_nested :OrchestrationStack
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ManageIQ::Providers::ExternalAutomationManager::ConfigurationScriptSource <
ManageIQ::Providers::AutomationManager::ConfigurationScriptSource
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module MiqAeMethodService
class MiqAeServiceConfigurationScriptSource < MiqAeServiceModelBase
expose :manager, :association => true
expose :authentication, :association => true
expose :configuration_script_payloads
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_AnsibleTower_AutomationManager_ConfigurationScriptSource <
MiqAeServiceManageIQ_Providers_ExternalAutomationManager_ConfigurationScriptSource
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_AutomationManager_ConfigurationScriptSource <
MiqAeServiceConfigurationScriptSource
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_EmbeddedAnsible_AutomationManager_ConfigurationScriptSource <
MiqAeServiceManageIQ_Providers_EmbeddedAutomationManager_ConfigurationScriptSource
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_EmbeddedAutomationManager_ConfigurationScriptSource <
MiqAeServiceManageIQ_Providers_AutomationManager_ConfigurationScriptSource
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_ExternalAutomationManager_ConfigurationScriptSource <
MiqAeServiceManageIQ_Providers_AutomationManager_ConfigurationScriptSource
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def assert_playbooks

def assert_configuration_script_sources
expect(automation_manager.configuration_script_sources.count).to eq(6)
expect(expected_configuration_script_source).to be_an_instance_of(ConfigurationScriptSource)
expect(expected_configuration_script_source).to be_an_instance_of(ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScriptSource)
expect(expected_configuration_script_source).to have_attributes(
:name => 'Demo Project',
:description => 'A great demo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def assert_playbooks

def assert_configuration_script_sources
expect(automation_manager.configuration_script_sources.count).to eq(6)
expect(expected_configuration_script_source).to be_an_instance_of(ConfigurationScriptSource)
expect(expected_configuration_script_source).to be_an_instance_of(ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScriptSource)
expect(expected_configuration_script_source).to have_attributes(
:name => 'db-projects',
:description => 'projects',
Expand Down