Skip to content

Commit

Permalink
Merge pull request #318 from nasark/rename_ansible_tower_to_ansible_a…
Browse files Browse the repository at this point in the history
…utomation_platform

Rename 'Ansible Tower' to 'Ansible Automation Platform'
  • Loading branch information
agrare committed Dec 11, 2024
2 parents 6e79cfc + c837402 commit ab3869b
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ def self.ems_type
end

def self.description
@description ||= "Ansible Tower Automation".freeze
@description ||= "Ansible Automation Platform".freeze
end

def self.catalog_types
{"generic_ansible_tower" => N_("Ansible Tower")}
{"generic_ansible_tower" => N_("Ansible Automation Platform")}
end

def self.display_name(number = 1)
n_('Automation Manager (Ansible Tower)', 'Automation Managers (Ansible Tower)', number)
n_('Automation Manager (Ansible Automation Platform)', 'Automation Managers (Ansible Automation Platform)', number)
end

def name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def run_with_miq_job(options, userid = nil)
end

def self.display_name(number = 1)
n_('Job Template (Ansible Tower)', 'Job Templates (Ansible Tower)', number)
n_('Job Template (Ansible Automation Platform)', 'Job Templates (Ansible Automation Platform)', number)
end

FRIENDLY_NAME = 'Ansible Tower Job Template'.freeze
FRIENDLY_NAME = 'Ansible Automation Platform Job Template'.freeze
end
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScriptS

supports :create

FRIENDLY_NAME = 'Ansible Tower Project'.freeze
FRIENDLY_NAME = 'Ansible Automation Platform Project'.freeze
end
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def run_with_miq_job(options, userid = nil)
end

def self.display_name(number = 1)
n_('Workflow Template (Ansible Tower)', 'Workflow Templates (Ansible Tower)', number)
n_('Workflow Template (Ansible Automation Platform)', 'Workflow Templates (Ansible Automation Platform)', number)
end

FRIENDLY_NAME = 'Ansible Tower Workflow Job Template'.freeze
FRIENDLY_NAME = 'Ansible Automation Platform Workflow Job Template'.freeze
end
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem <
ManageIQ::Providers::Awx::AutomationManager::ConfiguredSystem

def self.display_name(number = 1)
n_('Configured System (Ansible Tower)', 'Configured Systems (Ansible Tower)', number)
n_('Configured System (Ansible Automation Platform)', 'Configured Systems (Ansible Automation Platform)', number)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::Credential < ManageI

supports :create

FRIENDLY_NAME = 'Ansible Tower Credential'.freeze
FRIENDLY_NAME = 'Ansible Automation Platform Credential'.freeze
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class ManageIQ::Providers::AnsibleTower::AutomationManager::Job < ManageIQ::Providers::Awx::AutomationManager::Job
def self.display_name(number = 1)
n_('Ansible Tower Job', 'Ansible Tower Jobs', number)
n_('Ansible Automation Platform Job', 'Ansible Automation Platform Jobs', number)
end

def refresh_ems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::Playbook <
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)
n_('Playbook (Ansible Automation Platform)', 'Playbooks (Ansible Automation Platform)', number)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ManageIQ::Providers::AnsibleTower::AutomationManager::WorkflowJob <
alias jobs orchestration_stacks

def self.display_name(number = 1)
n_('Ansible Tower Workflow Job', 'Ansible Tower Workflow Jobs', number)
n_('Ansible Automation Platform Workflow Job', 'Ansible Automation Platform Workflow Jobs', number)
end

def raw_status
Expand Down
2 changes: 1 addition & 1 deletion lib/manageiq/providers/ansible_tower/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def self.vmdb_plugin?
end

def self.plugin_name
_('Ansible Tower Provider')
_('Ansible Automation Platform Provider')
end

def self.init_loggers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@

describe ".create_from_params" do
it "delegates endpoints, zone, name to provider" do
params = {:zone => FactoryBot.create(:zone), :name => "Ansible Tower"}
params = {:zone => FactoryBot.create(:zone), :name => "Ansible Automation Platform"}
endpoints = [{"role" => "default", "url" => "https://tower", "verify_ssl" => 0}]
authentications = [{"authtype" => "default", "userid" => "admin", "password" => "smartvm"}]

automation_manager = described_class.create_from_params(params, endpoints, authentications)

expect(automation_manager.provider.name).to eq("Ansible Tower")
expect(automation_manager.provider.name).to eq("Ansible Automation Platform")
expect(automation_manager.provider.endpoints.count).to eq(1)
end
end

describe "#edit_with_params" do
let(:automation_manager) do
FactoryBot.build(:automation_manager_ansible_tower, :name => "Ansible Tower", :url => "https://localhost")
FactoryBot.build(:automation_manager_ansible_tower, :name => "Ansible Automation Platform", :url => "https://localhost")
end

it "updates the provider" do
params = {:zone => FactoryBot.create(:zone), :name => "Ansible Tower 2"}
params = {:zone => FactoryBot.create(:zone), :name => "Ansible Automation Platform 2"}
endpoints = [{"role" => "default", "url" => "https://tower", "verify_ssl" => 0}]
authentications = [{"authtype" => "default", "userid" => "admin", "password" => "smartvm"}]

provider = automation_manager.provider
expect(provider.name).to eq("Ansible Tower")
expect(provider.name).to eq("Ansible Automation Platform")
expect(provider.url).to eq("https://localhost")

automation_manager.edit_with_params(params, endpoints, authentications)

provider.reload
expect(provider.name).to eq("Ansible Tower 2")
expect(provider.name).to eq("Ansible Automation Platform 2")
expect(provider.url).to eq("https://tower")
end
end
Expand Down

0 comments on commit ab3869b

Please sign in to comment.