Skip to content

Commit

Permalink
Merge pull request ManageIQ#15187 from djberg96/resource_group_assoc
Browse files Browse the repository at this point in the history
Save resource group information
  • Loading branch information
blomquisg authored Jun 7, 2017
2 parents bb12037 + ec39ab6 commit e4dd3f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/models/ems_refresh/save_inventory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def save_vms_inventory(ems, hashes, target = nil)
child_keys = [:operating_system, :hardware, :custom_attributes, :snapshots, :advanced_settings, :labels, :tags]
extra_infra_keys = [:host, :ems_cluster, :storage, :storages, :storage_profile, :raw_power_state, :parent_vm]
extra_cloud_keys = [
:resource_group,
:flavor,
:availability_zone,
:cloud_tenant,
Expand Down Expand Up @@ -79,6 +80,8 @@ def save_vms_inventory(ems, hashes, target = nil)
h[:cloud_tenant_id] = key_backup.fetch_path(:cloud_tenant, :id)
h[:cloud_tenant_ids] = key_backup.fetch_path(:cloud_tenants).compact.map { |x| x[:id] } if key_backup.fetch_path(:cloud_tenants, 0, :id)
h[:orchestration_stack_id] = key_backup.fetch_path(:orchestration_stack, :id)
h[:resource_group_id] = key_backup.fetch_path(:resource_group, :id)

begin
raise MiqException::MiqIncompleteData if h[:invalid]

Expand Down
2 changes: 1 addition & 1 deletion app/models/ems_refresh/save_inventory_cloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def save_ems_cloud_inventory(ems, hashes, target = nil)
end

child_keys = [
:resource_groups,
:cloud_tenants,
:flavors,
:availability_zones,
Expand All @@ -61,7 +62,6 @@ def save_ems_cloud_inventory(ems, hashes, target = nil)
:cloud_resource_quotas,
:cloud_object_store_containers,
:cloud_object_store_objects,
:resource_groups,
:cloud_services,
]

Expand Down

0 comments on commit e4dd3f6

Please sign in to comment.