Skip to content

Commit

Permalink
Provide base graph refresh attributes for ::Snapshot
Browse files Browse the repository at this point in the history
Witht this commit we provide base function to be used when
inventoring snapshots.

Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
  • Loading branch information
miha-plesko committed Apr 24, 2018
1 parent 7558ac5 commit 34e9197
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ def orchestration_templates(extra_attributes = {})
attributes.merge!(extra_attributes)
end

def snapshots(extra_attributes = {})
attributes = {
:model_class => ::Snapshot,
:association => :snapshots,
:manager_ref => [:vm_or_template, :ems_ref],
:parent_inventory_collections => [:vms, :miq_templates],
}

attributes.merge!(extra_attributes)
end

def orchestration_stack_ancestry(extra_attributes = {})
orchestration_stack_ancestry_save_block = lambda do |_ems, inventory_collection|
stacks_inventory_collection = inventory_collection.dependency_attributes[:orchestration_stacks].try(:first)
Expand Down

0 comments on commit 34e9197

Please sign in to comment.