fog / fog-vsphere

Fog for vSphere
MIT License
36 stars 63 forks source link

Expose _ref from Compute::Network #265 #266

Closed pendor closed 3 years ago

pendor commented 3 years ago

The get_network function in lib/fog/vsphere/requests/compute/get_network.rb takes a name or _ref attribute. This commit expose that _reg attribute (already retrieved via previous vsphere call) so that clients of fog-vsphere can look up network objects via the globally unique _ref attribute instead of the non-unique Name attribute.

Additionally, this enables fixing a bug in clients where the id attribute is incorrectly substituted for _ref, retrieving an incorrect object in certain VSphere environments.

pendor commented 3 years ago

Would it be possible to have the test build re-run for this and for someone to take a look at merging it? As far as I can tell, but build failed for reasons unrelated to this change as the preceding builds also failed with the same issue.

chris1984 commented 3 years ago

@pendor I will take a look at this, test and merge

ezr-ondrej commented 3 years ago

Eh, it was just a RuboCop complaining, we should improve our rubocop notifications. I've fixed that.