vmware.vsphere.datastore¶
- vmware.vsphere.datastore.get(attr_name, attr_value, obj, **kwargs):
Get a specific datastore identified by an attribute. Will only return the first object that matches
- Parameters:
attr_name – Name of the attribute that shall be used for selecting the object. Using “rel_path” will fail and generate an error
attr_value – Value which attr_name must contain
obj (object) – The object within we shall search for the datastore
- Returns:
First object that matched the selection. Returns bool:False if no match was found
- Return type:
object
- Keyword Arguments:
vc_obj (
object) vCenter-object that was created by vmware.vsphere.get_content(). This will overwrite the object that was registered as default by vmware.vsphere.default()
- vmware.vsphere.datastore.get_datastore_cluster(obj):
Get the datastore-cluster the datastore is part of
- Parameters:
obj (object) – The datastore-object
- Returns:
datastore-cluster object. Returns “False” if it is not clustered
- Return type:
bool
- vmware.vsphere.datastore.get_dict(obj, **kwargs):
This function is not yet implemented
- vmware.vsphere.datastore.get_host_mounts(obj):
Get a list of the host mountpoints
- Parameters:
obj (object) – The datastore-object
- Returns:
List of objects
- Return type:
list
- vmware.vsphere.datastore.get_hosts(obj):
Get a list of all hosts that are mounting the datastore
- Parameters:
obj (object) – The datastore-object
- Returns:
List of objects
- Return type:
list
- vmware.vsphere.datastore.get_list(obj, **kwargs):
Get all datastores beneath the object and return a list. This function requires the vCenter-object to be present (passed within kwargs or present as default)
- Parameters:
obj (object) – The object within we shall search for datastores
- Returns:
List of objects
- Return type:
list
- Keyword Arguments:
vc_obj (
object) vCenter-object that was created by vmware.vsphere.get_content(). This will overwrite the object that was registered as default by vmware.vsphere.default()
- vmware.vsphere.datastore.get_vms(obj, **kwargs):
Get a list of all VMs using the datastore
- Parameters:
obj (object) – The datastore-object
- Returns:
List of objects
- Return type:
list
- vmware.vsphere.datastore.is_clustered(obj):
Check if datastore is part of a datastore-cluster
- Parameters:
obj (object) – The datastore-object
- Returns:
True if the datastore is part of a cluster, False if not
- Return type:
bool
- vmware.vsphere.datastore.is_datastore(obj):
Check if passed object is a datastore
- Parameters:
obj (object) – The object
- Returns:
True if it is a datastore, false if not
- Return type:
bool
- vmware.vsphere.datastore.is_type(obj):
Check if passed object is a datastore
- Parameters:
obj (object) – The object
- Returns:
True if it is a datastore, false if not
- Return type:
bool