You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some commands like host_get, vm_guest_info_get, and vm_env_items_get the results are indexed by name. Since names can be ambiguous (more so for VMs than hosts), it would be better to index results by MOID, otherwise two VMs with the same name in different datacenters might bash over each-other in the results. Further, if someone does a lookup of a host or a VM by MOID, they want the result indexed by MOID.
In general one should encourage folks to use get_moid to resolve something's name to a MOID, and then use the MOID for the rest of the time. This eliminates ambiguity in results, and is especially important when making modifications to things (to make sure the correct object is being manipulated). I see there is already logic in inventory.py to check for multiple objects and raise an exception.
The text was updated successfully, but these errors were encountered:
In some commands like
host_get
,vm_guest_info_get
, andvm_env_items_get
the results are indexed by name. Since names can be ambiguous (more so for VMs than hosts), it would be better to index results by MOID, otherwise two VMs with the same name in different datacenters might bash over each-other in the results. Further, if someone does a lookup of a host or a VM by MOID, they want the result indexed by MOID.In general one should encourage folks to use get_moid to resolve something's name to a MOID, and then use the MOID for the rest of the time. This eliminates ambiguity in results, and is especially important when making modifications to things (to make sure the correct object is being manipulated). I see there is already logic in inventory.py to check for multiple objects and raise an exception.
The text was updated successfully, but these errors were encountered: