Skip to content

Commit

Permalink
Add CloudManager vm_and_template_taggings relation
Browse files Browse the repository at this point in the history
  • Loading branch information
cben committed Jan 3, 2018
1 parent 5353916 commit 2001fef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/manageiq/providers/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class << model_name
has_many :security_groups, :through => :network_manager
has_one :source_tenant, :as => :source, :class_name => 'Tenant'
has_many :vm_and_template_labels, :through => :vms_and_templates, :source => :labels
# Only taggings mapped from labels, excluding user-assigned tags.
has_many :vm_and_template_taggings, -> { joins(:tag).merge(Tag.controlled_by_mapping) },
:through => :vms_and_templates, :source => :taggings

validates_presence_of :zone

Expand Down

0 comments on commit 2001fef

Please sign in to comment.