ManageIQ / manageiq-providers-cisco_intersight

ManageIQ provider for Cisco Intersight
Apache License 2.0
2 stars 15 forks source link

Fix server-chassis relationship #47

Closed ghost closed 2 years ago

ghost commented 2 years ago

This PR fixes server-chasses relationship.

In the code below, server is object, obtained from the Intersight gem - it belongs to class IntersightClient::ComputePhysicalSummary.

On the Intersight side, server's attribute equipment_chassis was removed, making value server.equipment_chassis.moid equal to nil and consequently, making physical_chassis equal to nil so there was no relationship between servers and chassis.

Instead, I parsed server's parent value and obtained parent's moid (unique ID for Intersight objects).

ghost commented 2 years ago

Before, there were to tests to for relationships between servers and chasses. Adding it with the following commit.