The cinder.volume.drivers.vmware.datastore Module

Classes and utility methods for datastore selection.

class DatastoreSelector(vops, session)

Bases: object

Class for selecting datastores which satisfy input requirements.

HARD_AFFINITY_DS_TYPE = 'hardAffinityDatastoreTypes'
HARD_ANTI_AFFINITY_DS = 'hardAntiAffinityDatastores'
PREF_UTIL_THRESH = 'preferredUtilizationThreshold'
PROFILE_NAME = 'storageProfileName'
SIZE_BYTES = 'sizeBytes'
get_profile_id(profile_name)

Get vCenter profile ID for the given profile name.

Parameters:profile_name – profile name
Returns:vCenter profile ID
Raises:ProfileNotFoundException
is_datastore_compliant(datastore, profile_name)

Check if the datastore is compliant with given profile.

Parameters:
  • datastore – datastore to check the compliance
  • profile_name – profile to check the compliance against
Returns:

True if the datastore is compliant; False otherwise

Raises:

ProfileNotFoundException

select_datastore(req, hosts=None)

Selects a datastore satisfying the given requirements.

Returns the selected datastore summary along with a compute host and resource pool where a VM can be created.

Parameters:
  • req – selection requirements
  • hosts – list of hosts to consider
Returns:

(host, resourcePool, summary)

class DatastoreType

Bases: object

Supported datastore types.

NFS = 'nfs'
VMFS = 'vmfs'
VSAN = 'vsan'
VVOL = 'vvol'
static get_all_types()

Previous topic

The cinder.volume.drivers.violin.v7000_fcp Module

Next topic

The cinder.volume.drivers.vmware.exceptions Module

Project Source

This Page