Skip to content

Commit

Permalink
virtual col for parent blue folder path with no non-display folders
Browse files Browse the repository at this point in the history
  • Loading branch information
AparnaKarve committed Sep 11, 2018
1 parent c115691 commit f9521f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/vm_or_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class VmOrTemplate < ApplicationRecord
virtual_column :v_owning_blue_folder, :type => :string, :uses => :all_relationships
virtual_column :v_owning_blue_folder_path, :type => :string, :uses => :all_relationships
virtual_column :v_datastore_path, :type => :string, :uses => :storage
virtual_column :v_folder_path_no_non_display_folders, :type => :string, :uses => :all_relationships
virtual_column :thin_provisioned, :type => :boolean, :uses => {:hardware => :disks}
virtual_column :used_storage, :type => :integer, :uses => [:used_disk_storage, :mem_cpu]
virtual_column :used_storage_by_state, :type => :integer, :uses => :used_storage
Expand Down Expand Up @@ -803,6 +804,11 @@ def parent_datacenter
end
alias_method :owning_datacenter, :parent_datacenter

def parent_blue_folder_path_with_excluded_non_display_folders
parent_blue_folder_path(:exclude_non_display_folders => true)
end
alias_method :v_folder_path_no_non_display_folders, :parent_blue_folder_path_with_excluded_non_display_folders

def lans
!hardware.nil? ? hardware.nics.collect(&:lan).compact : []
end
Expand Down

0 comments on commit f9521f8

Please sign in to comment.