The cinder.volume.drivers.netapp.dataontap.nfs_base
Module¶
Volume driver for NetApp NFS storage.
-
class
NetAppNfsDriver
(*args, **kwargs)¶ Bases:
cinder.volume.driver.ManageableVD
,cinder.volume.driver.CloneableImageVD
,cinder.volume.drivers.nfs.NfsDriver
Base class for NetApp NFS driver for Data ONTAP.
-
CI_WIKI_NAME
= ‘NetApp_CI’¶
-
DEFAULT_FILTER_FUNCTION
= ‘capabilities.utilization < 70’¶
-
DEFAULT_GOODNESS_FUNCTION
= ‘100 - capabilities.utilization’¶
-
REQUIRED_FLAGS
= [‘netapp_login’, ‘netapp_password’, ‘netapp_server_hostname’]¶
-
VERSION
= ‘1.0.0’¶
-
check_for_setup_error
(*args, **kwargs)¶ Returns an error if prerequisites aren’t met.
-
clone_image
(*args, **kwargs)¶ Create a volume efficiently from an existing image.
image_location is a string whose format depends on the image service backend in use. The driver should use it to determine whether cloning is possible.
Returns a dict of volume properties eg. provider_location, boolean indicating whether cloning occurred.
-
copy_image_to_volume
(*args, **kwargs)¶ Fetch the image from image_service and write it to the volume.
-
create_cgsnapshot
(*args, **kwargs)¶ Creates a Cinder cgsnapshot object.
The Cinder cgsnapshot object is created by making use of an ONTAP CG snapshot in order to provide write-order consistency for a set of backing flexvols. First, a list of the flexvols backing the given Cinder volumes in the CG is determined. An ONTAP CG snapshot of the flexvols creates a write-order consistent snapshot of each backing flexvol. For each Cinder volume in the CG, it is then necessary to clone its volume from the ONTAP CG snapshot. The naming convention used to create the clones indicates the clone’s role as a Cinder snapshot and its inclusion in a Cinder CG snapshot. The ONTAP CG snapshots, of each backing flexvol, are deleted after the cloning operation is completed.
Returns: An implicit update for the cgsnapshot and snapshot models that is then used by the manager to set the models to available.
-
create_cloned_volume
(*args, **kwargs)¶ Creates a clone of the specified volume.
-
create_consistencygroup
(*args, **kwargs)¶ Driver entry point for creating a consistency group.
ONTAP does not maintain an actual CG construct. As a result, no communtication to the backend is necessary for consistency group creation.
Returns: Hard-coded model update for consistency group model.
-
create_consistencygroup_from_src
(*args, **kwargs)¶ Creates a CG from a either a cgsnapshot or group of cinder vols.
Returns: An implicit update for the volumes model that is interpreted by the manager as a successful operation.
-
create_snapshot
(*args, **kwargs)¶ Creates a snapshot.
-
create_volume
(*args, **kwargs)¶ Creates a volume.
Parameters: volume – volume reference
-
create_volume_from_snapshot
(*args, **kwargs)¶ Creates a volume from a snapshot.
-
delete_cgsnapshot
(*args, **kwargs)¶ Delete files backing each snapshot in the cgsnapshot.
-
delete_consistencygroup
(*args, **kwargs)¶ Driver entry point for deleting a consistency group.
Returns: Updated consistency group model and list of volume models for the volumes that were deleted.
-
delete_snapshot
(*args, **kwargs)¶ Deletes a snapshot.
-
do_setup
(*args, **kwargs)¶
-
extend_volume
(*args, **kwargs)¶ Extend an existing volume to the new size.
-
get_default_filter_function
(*args, **kwargs)¶ Get the default filter_function string.
-
get_default_goodness_function
(*args, **kwargs)¶ Get the default goodness_function string.
-
get_pool
(*args, **kwargs)¶ Return pool name where volume resides.
Parameters: volume – The volume hosted by the driver. Returns: Name of the pool where given volume is hosted.
-
manage_existing
(*args, **kwargs)¶ Manages an existing volume.
The specified Cinder volume is to be taken into Cinder management. The driver will verify its existence and then rename it to the new Cinder volume name. It is expected that the existing volume reference is an NFS share point and some [/path]/volume; e.g., 10.10.32.1:/openstack/vol_to_manage or 10.10.32.1:/openstack/some_directory/vol_to_manage
Parameters: - volume – Cinder volume to manage
- existing_vol_ref – Driver-specific information used to identify a volume
-
manage_existing_get_size
(*args, **kwargs)¶ Returns the size of volume to be managed by manage_existing.
When calculating the size, round up to the next GB.
Parameters: - volume – Cinder volume to manage
- existing_vol_ref – Existing volume to take under management
-
unmanage
(*args, **kwargs)¶ Removes the specified volume from Cinder management.
Does not delete the underlying backend storage object. A log entry will be made to notify the Admin that the volume is no longer being managed.
Parameters: volume – Cinder volume to unmanage
-
update_consistencygroup
(*args, **kwargs)¶ Driver entry point for updating a consistency group.
Since no actual CG construct is ever created in ONTAP, it is not necessary to update any metadata on the backend. Since this is a NO-OP, there is guaranteed to be no change in any of the volumes’ statuses.
-