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

Migrate model display names from locale/en.yml to plugin #55

Merged
merged 1 commit into from
Jun 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 @@ -35,4 +35,8 @@ def self.description
def supported_catalog_types
%w(generic_ansible_tower)
end

def self.display_name(number = 1)
n_('Automation Manager (Ansible Tower)', 'Automation Managers (Ansible Tower)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::AmazonCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AmazonCredential

def self.display_name(number = 1)
n_('Credential (Amazon)', 'Credentials (Amazon)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 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

def self.display_name(number = 1)
n_('Credential (Microsoft Azure)', 'Credentials (Microsoft Azure)', number)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript

include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfigurationScript
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::TowerApi

def self.display_name(number = 1)
n_('Job Template (Ansible Tower)', 'Job Templates (Ansible Tower)', number)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem <

include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ConfiguredSystem
include ProviderObjectMixin

def self.display_name(number = 1)
n_('Configured System (Ansible Tower)', 'Configured Systems (Ansible Tower)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::GoogleCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::GoogleCredential

def self.display_name(number = 1)
n_('Credential (Google)', 'Credentials (Google)', number)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::Job <
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Job

require_nested :Status

def self.display_name(number = 1)
n_('Ansible Tower Job', 'Ansible Tower Jobs', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::MachineCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::Credential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::MachineCredential

def self.display_name(number = 1)
n_('Credential (Machine)', 'Credentials (Machine)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::NetworkCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::Credential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::NetworkCredential

def self.display_name(number = 1)
n_('Credential (Network)', 'Credentials (Network)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::OpenstackCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::OpenstackCredential

def self.display_name(number = 1)
n_('Credential (OpenStack)', 'Credentials (OpenStack)', number)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::Playbook <
ManageIQ::Providers::ExternalAutomationManager::ConfigurationScriptPayload

has_many :jobs, :class_name => 'OrchestrationStack', :foreign_key => :configuration_script_base_id

def self.display_name(number = 1)
n_('Playbook (Ansible Tower)', 'Playbooks (Ansible Tower)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::Satellite6Credential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Satellite6Credential

def self.display_name(number = 1)
n_('Credential (Satellite)', 'Credentials (Satellite)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::ScmCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::Credential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::ScmCredential

def self.display_name(number = 1)
n_('Credential (SCM)', 'Credentials (SCM)', number)
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::VmwareCredential < ManageIQ::Providers::AnsibleTower::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::VmwareCredential

def self.display_name(number = 1)
n_('Credential (VMware)', 'Credentials (VMware)', number)
end
end