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

Azure Classic credential added #13

Merged
merged 1 commit into from
Jul 20, 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
@@ -0,0 +1,3 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::AzureClassicCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AzureClassicCredential
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This corresponds to Ansible Tower's Azure Resource Manager (azure_rm) type credential. We are not modeling the deprecated Azure classic
# This corresponds to Ansible Tower's Azure Resource Manager (azure_rm) type credential
class ManageIQ::Providers::AnsibleTower::AutomationManager::AzureCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AzureCredential
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AzureClassicCredential
COMMON_ATTRIBUTES = {
:userid => {
:type => :string,
:label => N_('Subscription ID'),
:help_text => N_('The Subscription UUID for the Microsoft Azure Classic account'),
:max_length => 1024,
:required => true
}
}.freeze

EXTRA_ATTRIBUTES = {
:ssh_key_data => {
:type => :password,
:multiline => true,
:label => N_('Management Certificate'),
:help_text => N_('Contents of the PEM file that corresponds to the certificate you uploaded in the Microsoft Azure console'),
:required => true
}
}.freeze

API_ATTRIBUTES = COMMON_ATTRIBUTES.merge(EXTRA_ATTRIBUTES).freeze

API_OPTIONS = {
:type => 'cloud',
:label => N_('Azure Classic (deprecated)'),
:attributes => API_ATTRIBUTES
}.freeze
TOWER_KIND = 'azure'.freeze
end
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def credentials
when 'satellite6' then "#{provider_module}::AutomationManager::Satellite6Credential"
# when 'cloudforms' then "#{provider_module}::AutomationManager::$$$Credential"
when 'gce' then "#{provider_module}::AutomationManager::GoogleCredential"
# when 'azure' then "#{provider_module}::AutomationManager::???Credential"
when 'azure' then "#{provider_module}::AutomationManager::AzureClassicCredential"
when 'azure_rm' then "#{provider_module}::AutomationManager::AzureCredential"
when 'openstack' then "#{provider_module}::AutomationManager::OpenstackCredential"
else "#{provider_module}::AutomationManager::Credential"
Expand Down