diff --git a/app/models/ems_refresh/save_inventory.rb b/app/models/ems_refresh/save_inventory.rb index c42505c84da..5f032656bf3 100644 --- a/app/models/ems_refresh/save_inventory.rb +++ b/app/models/ems_refresh/save_inventory.rb @@ -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, @@ -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] diff --git a/app/models/ems_refresh/save_inventory_cloud.rb b/app/models/ems_refresh/save_inventory_cloud.rb index 9512f18ba50..8d868ad4a3e 100644 --- a/app/models/ems_refresh/save_inventory_cloud.rb +++ b/app/models/ems_refresh/save_inventory_cloud.rb @@ -46,6 +46,7 @@ def save_ems_cloud_inventory(ems, hashes, target = nil) end child_keys = [ + :resource_groups, :cloud_tenants, :flavors, :availability_zones, @@ -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, ]