Skip to content

Commit

Permalink
Merge pull request ManageIQ#3367 from alexander-demichev/improve-filt…
Browse files Browse the repository at this point in the history
…ering

Remove openstack infra provider from network actions
  • Loading branch information
mzazrivec authored Feb 6, 2018
2 parents 4bddbcf + 58e9f54 commit d2ce22d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/application_controller/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ module ApplicationController::Network
extend ActiveSupport::Concern

def network_managers
openstack_network_manager = Rbac::Filterer.filtered(ManageIQ::Providers::Openstack::NetworkManager).select(:id, :name, :parent_ems_id)
ems_clouds = ManageIQ::Providers::Openstack::NetworkManager.joins(:parent_manager).where(:parent_managers_ext_management_systems=>{:type=>'ManageIQ::Providers::Openstack::CloudManager'})
openstack_network_manager = Rbac::Filterer.filtered(ems_clouds).select(:id, :name, :parent_ems_id)
redhat_network_manager = Rbac::Filterer.filtered(ManageIQ::Providers::Redhat::NetworkManager).select(:id, :name, :parent_ems_id)
openstack_network_manager + redhat_network_manager
end
Expand Down

0 comments on commit d2ce22d

Please sign in to comment.