From 9683ab60d1f8f178a032dda7bea68dc04925dba3 Mon Sep 17 00:00:00 2001 From: Greg Blomquist Date: Thu, 29 Jun 2017 13:18:34 -0400 Subject: [PATCH 1/2] Avoid Tower in notifications for embedded ansible ManageIQ should not indicate that anything "Tower" exists when dealing with Embedded Ansible. This should change the logs and notifications to use a more "embedded ansibly" term when talking about embedded ansibly things. Before: "The operation Ansible Tower Credential creation (name=...) on Tower(manager_id=...) completed successfully." ^^^^^ After: "The operation Ansible Automation Inside Credential creation (name=...) on EMS(manager_id=1) completed successfully." ^^^ https://bugzilla.redhat.com/show_bug.cgi?id=1458593 --- .../ansible_tower/shared/automation_manager/tower_api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/ansible_tower/shared/automation_manager/tower_api.rb b/app/models/manageiq/providers/ansible_tower/shared/automation_manager/tower_api.rb index 95d18f51..3c7f34d4 100644 --- a/app/models/manageiq/providers/ansible_tower/shared/automation_manager/tower_api.rb +++ b/app/models/manageiq/providers/ansible_tower/shared/automation_manager/tower_api.rb @@ -35,7 +35,7 @@ def notify(op, manager_id, params, success) :options => { :op_name => "#{self::FRIENDLY_NAME} #{op}", :op_arg => "(#{op_arg})", - :tower => "Tower(manager_id=#{manager_id})" + :tower => "EMS(manager_id=#{manager_id})" } ) end From bc16c7c105673d24c7e378f2d7da8e1a8f7041b5 Mon Sep 17 00:00:00 2001 From: Greg Blomquist Date: Mon, 17 Jul 2017 17:04:16 -0400 Subject: [PATCH 2/2] Fixing up specs to avoid mentions of Tower --- .../automation_manager/configuration_script_source.rb | 6 +++--- .../support/ansible_shared/automation_manager/credential.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/support/ansible_shared/automation_manager/configuration_script_source.rb b/spec/support/ansible_shared/automation_manager/configuration_script_source.rb index 28795714..95ca1f3f 100644 --- a/spec/support/ansible_shared/automation_manager/configuration_script_source.rb +++ b/spec/support/ansible_shared/automation_manager/configuration_script_source.rb @@ -33,7 +33,7 @@ :options => { :op_name => "#{described_class::FRIENDLY_NAME} creation", :op_arg => "(name=My Project)", - :tower => "Tower(manager_id=#{manager.id})" + :tower => "EMS(manager_id=#{manager.id})" } } end @@ -106,7 +106,7 @@ def store_new_project(project, manager) :options => { :op_name => "#{described_class::FRIENDLY_NAME} deletion", :op_arg => "(manager_ref=#{tower_project.id})", - :tower => "Tower(manager_id=#{manager.id})" + :tower => "EMS(manager_id=#{manager.id})" } } end @@ -152,7 +152,7 @@ def store_new_project(project, manager) :options => { :op_name => "#{described_class::FRIENDLY_NAME} update", :op_arg => "()", - :tower => "Tower(manager_id=#{manager.id})" + :tower => "EMS(manager_id=#{manager.id})" } } end diff --git a/spec/support/ansible_shared/automation_manager/credential.rb b/spec/support/ansible_shared/automation_manager/credential.rb index a561a56d..ab01a095 100644 --- a/spec/support/ansible_shared/automation_manager/credential.rb +++ b/spec/support/ansible_shared/automation_manager/credential.rb @@ -36,7 +36,7 @@ :options => { :op_name => "#{described_class::FRIENDLY_NAME} creation", :op_arg => "(name=My Credential)", - :tower => "Tower(manager_id=#{manager.id})" + :tower => "EMS(manager_id=#{manager.id})" } } end @@ -98,7 +98,7 @@ def store_new_credential(credential, manager) :options => { :op_name => "#{described_class::FRIENDLY_NAME} deletion", :op_arg => "(manager_ref=#{credential.id})", - :tower => "Tower(manager_id=#{manager.id})" + :tower => "EMS(manager_id=#{manager.id})" } } end @@ -145,7 +145,7 @@ def store_new_credential(credential, manager) :options => { :op_name => "#{described_class::FRIENDLY_NAME} update", :op_arg => "()", - :tower => "Tower(manager_id=#{manager.id})" + :tower => "EMS(manager_id=#{manager.id})" } } end