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

Tower Rhv credential type #62

Merged
merged 1 commit into from
Mar 13, 2018
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 :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 @@ -87,7 +87,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