Skip to content

Commit

Permalink
Merge pull request #62 from jameswnl/rhev
Browse files Browse the repository at this point in the history
Tower Rhv credential type
  • Loading branch information
agrare authored Mar 13, 2018
2 parents 3069093 + 319daac commit fdc757d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
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 :ScmCredential
require_nested :Satellite6Credential
require_nested :VmwareCredential
require_nested :RhvCredential

require_nested :ConfigurationScript
require_nested :ConfigurationScriptSource
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::RhvCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::RhvCredential
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::RhvCredential
COMMON_ATTRIBUTES = {
:userid => {
:label => N_('Username'),
:help_text => N_('Username for this credential')
},
:password => {
:type => :password,
:label => N_('Password'),
:help_text => N_('Password for this credential')
}
}.freeze

EXTRA_ATTRIBUTES = {}.freeze

API_ATTRIBUTES = COMMON_ATTRIBUTES.merge(EXTRA_ATTRIBUTES).freeze

API_OPTIONS = {
:label => N_('Red Hat Virtualization'),
:type => 'cloud',
:attributes => API_ATTRIBUTES
}.freeze
TOWER_KIND = 'rhv'.freeze
end
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def miq_credential_types
'satellite6' => "#{provider_module}::AutomationManager::Satellite6Credential",
'gce' => "#{provider_module}::AutomationManager::GoogleCredential",
'azure_rm' => "#{provider_module}::AutomationManager::AzureCredential",
'openstack' => "#{provider_module}::AutomationManager::OpenstackCredential"
'openstack' => "#{provider_module}::AutomationManager::OpenstackCredential",
'rhv' => "#{provider_module}::AutomationManager::RhvCredential"
}.select { |_tower_type, miq_type| supported_types.include?(miq_type) }
end
end
Expand Down

0 comments on commit fdc757d

Please sign in to comment.