Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide base graph refresh attributes for ::Snapshot #17335

Merged
merged 1 commit into from
Apr 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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