Skip to content

Commit

Permalink
Limit selectable template to the local region
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Mar 22, 2017
1 parent 548d782 commit 7853c6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/miq_provision_virt_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def allowed_templates(options = {})
end

rails_logger('allowed_templates', 0)
vms = VmOrTemplate.all
vms = VmOrTemplate.in_my_region.all
condition = allowed_template_condition

unless options[:tag_filters].blank?
Expand All @@ -309,7 +309,7 @@ def allowed_templates(options = {})

unless tag_conditions.blank?
_log.info "Filtering VM templates with the following tag_filters: <#{tag_conditions.inspect}>"
vms = MiqTemplate.where(condition).find_tags_by_grouping(tag_conditions, :ns => "/managed")
vms = MiqTemplate.in_my_region.where(condition).find_tags_by_grouping(tag_conditions, :ns => "/managed")
end
end

Expand Down

0 comments on commit 7853c6f

Please sign in to comment.