The cinder.volume.drivers.netapp.dataontap.block_base Module

Volume driver library for NetApp 7/C-mode block storage systems.

class NetAppBlockStorageLibrary(*args, **kwargs)

Bases: object

NetApp block storage library for Data ONTAP.

ALLOWED_IGROUP_HOST_TYPES = ['linux', 'aix', 'hpux', 'windows', 'solaris', 'netware', 'default', 'vmware', 'openvms', 'xen', 'hyper_v']
ALLOWED_LUN_OS_TYPES = ['linux', 'aix', 'hpux', 'image', 'windows', 'windows_2008', 'windows_gpt', 'solaris', 'solaris_efi', 'netware', 'openvms', 'hyper_v']
DEFAULT_FILTER_FUNCTION = 'capabilities.utilization < 70'
DEFAULT_GOODNESS_FUNCTION = '100 - capabilities.utilization'
DEFAULT_HOST_TYPE = 'linux'
DEFAULT_LUN_OS = 'linux'
REQUIRED_FLAGS = ['netapp_login', 'netapp_password', 'netapp_server_hostname']
VERSION = '1.0.0'
check_for_setup_error(*args, **kwargs)

Check that the driver is working and can communicate.

Discovers the LUNs on the NetApp server.

create_cgsnapshot(*args, **kwargs)

Creates a Cinder cgsnapshot object.

The Cinder cgsnapshot object is created by making use of an ephemeral ONTAP CG in order to provide write-order consistency for a set of flexvol snapshots. First, a list of the flexvols backing the given Cinder CG must be gathered. An ONTAP cg-snapshot of these flexvols will create a snapshot copy of all the Cinder volumes in the CG group. For each Cinder volume in the CG, it is then necessary to clone its backing LUN from the ONTAP cg-snapshot. The naming convention used for the clones is what indicates the clone’s role as a Cinder snapshot and its inclusion in a Cinder CG. The ONTAP CG-snapshot of the flexvols is no longer required after having cloned the LUNs backing the Cinder volumes in the Cinder CG.

Returns:An implicit update for cgsnapshot and snapshots models that

is interpreted by the manager to set their models to available.

create_cloned_volume(*args, **kwargs)
create_consistencygroup(*args, **kwargs)

Driver entry point for creating a consistency group.

ONTAP does not maintain an actual CG construct. As a result, no communication 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_export(*args, **kwargs)

Driver entry point to get the export info for a new volume.

create_snapshot(*args, **kwargs)

Driver entry point for creating a snapshot.

This driver implements snapshots by using efficient single-file (LUN) cloning.

create_volume(*args, **kwargs)

Driver entry point for creating a new volume (Data ONTAP LUN).

create_volume_from_snapshot(*args, **kwargs)
delete_cgsnapshot(*args, **kwargs)

Delete LUNs backing each snapshot in the cgsnapshot.

Returns:An implicit update for snapshots models that is interpreted

by the manager to set their models to deleted.

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)

Driver entry point for deleting a snapshot.

delete_volume(*args, **kwargs)

Driver entry point for destroying existing volumes.

do_setup(*args, **kwargs)
ensure_export(*args, **kwargs)

Driver entry point to get the export info for an existing volume.

extend_volume(*args, **kwargs)

Driver entry point to increase the size of a volume.

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.
get_volume_stats(*args, **kwargs)

Get volume stats.

If ‘refresh’ is True, update the stats first.

initialize_connection_fc(*args, **kwargs)

Initializes the connection and returns connection info.

Assign any created volume to a compute node/host so that it can be used from that host.

The driver returns a driver_volume_type of ‘fibre_channel’. The target_wwn can be a single entry or a list of wwns that correspond to the list of remote wwn(s) that will export the volume. Example return values:

{

‘driver_volume_type’: ‘fibre_channel’ ‘data’: {

‘target_discovered’: True, ‘target_lun’: 1, ‘target_wwn’: ‘500a098280feeba5’, ‘initiator_target_map’: {

‘21000024ff406cc3’: [‘500a098280feeba5’], ‘21000024ff406cc2’: [‘500a098280feeba5’]

}

}

}

or

{

‘driver_volume_type’: ‘fibre_channel’ ‘data’: {

‘target_discovered’: True, ‘target_lun’: 1, ‘target_wwn’: [‘500a098280feeba5’, ‘500a098290feeba5’,

‘500a098190feeba5’, ‘500a098180feeba5’],
‘initiator_target_map’: {
‘21000024ff406cc3’: [‘500a098280feeba5’,
‘500a098290feeba5’],
‘21000024ff406cc2’: [‘500a098190feeba5’,
‘500a098180feeba5’]

}

}

}

initialize_connection_iscsi(*args, **kwargs)

Driver entry point to attach a volume to an instance.

Do the LUN masking on the storage system so the initiator can access the LUN on the target. Also return the iSCSI properties so the initiator can find the LUN. This implementation does not call _get_iscsi_properties() to get the properties because cannot store the LUN number in the database. We only find out what the LUN number will be during this method call so we construct the properties dictionary ourselves.

manage_existing(*args, **kwargs)

Brings an existing storage object under Cinder management.

existing_ref can contain source-id or source-name or both. source-id: lun uuid. source-name: complete lun path eg. /vol/vol0/lun.

manage_existing_get_size(*args, **kwargs)

Return size of volume to be managed by manage_existing.

When calculating the size, round up to the next GB.

remove_export(*args, **kwargs)

Driver entry point to remove an export for a volume.

Since exporting is idempotent in this driver, we have nothing to do for unexporting.

terminate_connection_fc(*args, **kwargs)

Disallow connection from connector.

Return empty data if other volumes are in the same zone. The FibreChannel ZoneManager doesn’t remove zones if there isn’t an initiator_target_map in the return of terminate_connection.

Returns:data - the target_wwns and initiator_target_map if the zone is to be removed, otherwise the same map with an empty dict for the ‘data’ key
terminate_connection_iscsi(*args, **kwargs)

Driver entry point to unattach a volume from an instance.

Unmask the LUN on the storage system so the given initiator can no longer access it.

unmanage(*args, **kwargs)

Removes the specified volume from Cinder management.

Does not delete the underlying backend storage object.

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.

class NetAppLun(handle, name, size, metadata_dict)

Bases: object

Represents a LUN on NetApp storage.

get_metadata_property(prop)

Get the metadata property of a LUN.

Previous topic

The cinder.volume.drivers.netapp.dataontap.block_7mode Module

Next topic

The cinder.volume.drivers.netapp.dataontap.block_cmode Module

Project Source

This Page