Todo
rework
NAS share manager managers creating shares and access rights.
Related Flags
share_driver: | Used by ShareManager. |
---|
Bases: manila.manager.SchedulerDependentManager
Manages NAS storages.
Migrates a share from current host to another host.
Drivers for shares.
Bases: object
Provides an executable functionality to a driver class.
Bases: object
Augment derived classes with Ganesha configuration.
Bases: object
Class defines interface of NAS driver.
Allocate network resources using given network information.
Allow access to the share.
Check for setup error.
Method that allows driver to choose share server for provided share.
If compatible share-server is not found, method should return None.
Parameters: |
|
---|---|
Returns: | share-server or None |
Create a consistency group snapshot.
Parameters: |
|
---|---|
Returns: | (cgsnapshot_update, member_update_list) cgsnapshot_update - a dict containing any values to be updated for the CGSnapshot in the database. This value may be None. member_update_list - a list of dictionaries containing for every member of the cgsnapshot. Each dict should contains values to be updated for teh CGSnapshotMember in the database. This list may be empty or None. |
Create a consistency group.
Parameters: |
|
---|---|
Returns: | (cg_model_update, share_update_list) cg_model_update - a dict containing any values to be updated for the CG in the database. This value may be None. |
Create a consistency group from a cgsnapshot.
Parameters: |
|
---|---|
Returns: | (cg_model_update, share_update_list) cg_model_update - a dict containing any values to be updated for the CG in the database. This value may be None. share_update_list - a list of dictionaries containing dicts for every share created in the CG. Any share dicts should at a minimum contain the ‘id’ key and ‘export_locations’. Export locations should be in the same format as returned by a share_create. This list may be empty or None. EXAMPLE: .. code: [{'id': 'uuid', 'export_locations': ['export_path']}]
|
Is called to create share.
Is called to create share from snapshot.
Is called to create snapshot.
Parameters: |
|
---|
Deallocate network resources for the given share server.
Delete a consistency group snapshot
Parameters: |
|
---|---|
Returns: | (cgsnapshot_update, member_update_list) cgsnapshot_update - a dict containing any values to be updated for the CGSnapshot in the database. This value may be None. |
Delete a consistency group
Parameters: |
|
---|---|
Returns: | cg_model_update cg_model_update - a dict containing any values to be updated for the CG in the database. This value may be None. |
Is called to remove share.
Is called to remove snapshot.
Parameters: |
|
---|
Deny access to the share.
Any initialization the share driver does while starting.
Invoked to ensure that share is exported.
Driver can use this method to update the list of export locations of the share if it changes. To do that, you should return list with export locations.
:return None or list with export locations
Extends size of existing share.
Parameters: |
|
---|
Is called to provide necessary driver migration logic.
Is called to provide necessary generic migration logic.
Returns number of network allocations for creating VIFs.
Drivers that use Nova for share servers should return zero (0) here same as Generic driver does. Because Nova will handle network resources allocation. Drivers that handle networking itself should calculate it according to their own requirements. It can have 1+ network interfaces.
Dedicated for update/extend of data for existing share instances.
Redefine this method in share driver to be able to update/change/extend share instances data that will be used by periodic hook action. One of possible updates is add-on of “automount” CLI commands for each share instance for case of notification is enabled using ‘hook’ approach.
Parameters: |
|
---|---|
Returns: | list of share instances. |
Return pool name where the share resides on.
Parameters: | share – The share hosted by the driver. |
---|
Return list of pools related to a particular share server.
Parameters: | share_server – ShareServer class instance. |
---|
Get share status.
If ‘refresh’ is True, run update the stats first.
Brings an existing share under Manila management.
If provided share is not valid, then raise a ManageInvalidShare exception, specifying a reason for the failure.
The share has a share_type, and the driver can inspect that and compare against the properties of the referenced backend share. If they are incompatible, raise a ManageExistingShareTypeMismatch, specifying a reason for the failure.
Parameters: |
|
---|---|
Returns: | share_update dictionary with required key ‘size’, which should contain size of the share. |
Is called to perform driver migration.
Driver should implement this method if willing to perform migration in an optimized way, useful for when driver understands destination backend. :param context: The ‘context.RequestContext’ object for the request. :param share_ref: Reference to the share being migrated. :param host: Destination host and its capabilities. :param dest_driver_migration_info: Migration information provided by destination host. :returns: Boolean value indicating if driver migration succeeded. :returns: Dictionary containing a model update.
Shrinks size of existing share.
If consumed space on share larger than new_size driver should raise ShareShrinkingPossibleDataLoss exception: raise ShareShrinkingPossibleDataLoss(share_id=share[‘id’])
Parameters: |
|
---|
:raises ShareShrinkingPossibleDataLoss, NotImplementedError
Removes the specified share from Manila management.
Does not delete the underlying backend share.
For most drivers, this will not need to do anything. However, some drivers might use this call as an opportunity to clean up any Manila-specific configuration that they have associated with the backend share.
If provided share cannot be unmanaged, then raise an UnmanageInvalidShare exception, specifying a reason for the failure.
Authentication and Authorization
Enter search terms or a module, class or function name.