Skip to content

Commit

Permalink
Migrate model display names from locale/en.yml to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Feb 9, 2018
1 parent 7ebd8ef commit 24f02f0
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 0 deletions.
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

0 comments on commit 24f02f0

Please sign in to comment.