vmware.vsphere.datastore =============================================== .. toctree:: :maxdepth: 1 vmware.vsphere.datastore.cluster.rst .. py:function:: 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 :param attr_name: Name of the attribute that shall be used for selecting the object. Using "rel_path" will fail and generate an error :type obj: string :param attr_value: Value which attr_name must contain :type obj: string :param obj: The object within we shall search for the datastore :type obj: object :return: First object that matched the selection. Returns bool:False if no match was found :rtype: 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() .. py:function:: vmware.vsphere.datastore.get_datastore_cluster(obj): Get the datastore-cluster the datastore is part of :param obj: The datastore-object :type obj: object :return: datastore-cluster object. Returns "False" if it is not clustered :rtype: bool .. py:function:: vmware.vsphere.datastore.get_dict(obj, **kwargs): This function is not yet implemented .. py:function:: vmware.vsphere.datastore.get_host_mounts(obj): Get a list of the host mountpoints :param obj: The datastore-object :type obj: object :return: List of objects :rtype: list .. py:function:: vmware.vsphere.datastore.get_hosts(obj): Get a list of all hosts that are mounting the datastore :param obj: The datastore-object :type obj: object :return: List of objects :rtype: list .. py:function:: 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) :param obj: The object within we shall search for datastores :type obj: object :return: List of objects :rtype: 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() .. py:function:: vmware.vsphere.datastore.get_vms(obj, **kwargs): Get a list of all VMs using the datastore :param obj: The datastore-object :type obj: object :return: List of objects :rtype: list .. py:function:: vmware.vsphere.datastore.is_clustered(obj): Check if datastore is part of a datastore-cluster :param obj: The datastore-object :type obj: object :return: True if the datastore is part of a cluster, False if not :rtype: bool .. py:function:: vmware.vsphere.datastore.is_datastore(obj): Check if passed object is a datastore :param obj: The object :type obj: object :return: True if it is a datastore, false if not :rtype: bool .. py:function:: vmware.vsphere.datastore.is_type(obj): Check if passed object is a datastore :param obj: The object :type obj: object :return: True if it is a datastore, false if not :rtype: bool