Skip to content

Commit

Permalink
Fix the parent collections for hardwares/disks
Browse files Browse the repository at this point in the history
VMware has the vms_and_templates inventory collection not vms +
miq_templates so we need to update the hardware and disks accordingly
otherwise we get the error:

```
[RuntimeError]: Can't find InventoryCollection vms from InventoryCollection:<Disk>
```
  • Loading branch information
agrare committed Sep 27, 2017
1 parent 2dbade1 commit 83fd9e7
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,15 @@ def hosts(extra_attributes = {})
attributes = {:model_class => ManageIQ::Providers::Vmware::InfraManager::HostEsx}
super(attributes.merge(extra_attributes))
end

def hardwares(extra_attributes = {})
attributes = {:parent_inventory_collections => [:vms_and_templates]}
super(attributes.merge(extra_attributes))
end

def disks(extra_attributes = {})
attributes = {:parent_inventory_collections => [:vms_and_templates]}
super(attributes.merge(extra_attributes))
end
end
end

0 comments on commit 83fd9e7

Please sign in to comment.