From 924044c7ce7398000de85125be04d33f1f128a89 Mon Sep 17 00:00:00 2001 From: Harpreet Kataria Date: Sat, 18 Apr 2020 21:55:05 -0400 Subject: [PATCH] Added a named_scope to exclude Ansible records Added named_scope to exclude Ansible records on Configured Systems under Configuration. Ansible Configured systems are being displayed on Automation Manager explorer --- app/models/configured_system.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/configured_system.rb b/app/models/configured_system.rb index 6dfa4a1180c1..b8a332922566 100644 --- a/app/models/configured_system.rb +++ b/app/models/configured_system.rb @@ -46,6 +46,8 @@ class ConfiguredSystem < ApplicationRecord scope :with_manager, ->(manager_id) { where(:manager_id => manager_id) } scope :with_configuration_profile_id, ->(profile_id) { where(:configuration_profile_id => profile_id) } scope :without_configuration_profile_id, -> { where(:configuration_profile_id => nil) } + scope :not_ansible, -> { where.not(:type => ["ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfiguredSystem", + "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem"]) } def configuration_architecture tag_hash[ConfigurationArchitecture]