The cinder.volume.drivers.netapp.eseries.client
Module¶
Client classes for web services.
-
class
RestClient
(scheme, host, port, service_path, username, password, **kwargs)¶ Bases:
cinder.volume.drivers.netapp.eseries.client.WebserviceClient
REST client specific to e-series storage service.
-
ASUP_VALID_VERSION
= (1, 52, 9000, 3)¶
-
CHAP_VALID_VERSION
= (1, 53, 9010, 15)¶
-
ID
= ‘id’¶
-
NAME
= ‘label’¶
-
RESOURCE_PATHS
= {‘persistent-store’: ‘/storage-systems/{system-id}/persistent-records/{key}’, ‘cgroup_members’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/member-volumes’, ‘snapshot_group’: ‘/storage-systems/{system-id}/snapshot-groups/{object-id}’, ‘cgroup_snapshot’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/snapshots/{seq-num}’, ‘persistent-stores’: ‘/storage-systems/{system-id}/persistent-records/’, ‘snapshot_image’: ‘/storage-systems/{system-id}/snapshot-images/{object-id}’, ‘pool_operation_progress’: ‘/storage-systems/{system-id}/storage-pools/{object-id}/action-progress’, ‘cgroups’: ‘/storage-systems/{system-id}/consistency-groups’, ‘snapshot_volume’: ‘/storage-systems/{system-id}/snapshot-volumes/{object-id}’, ‘cgroup_snapshot_views’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/views/{view-id}/views’, ‘ssc_volumes’: ‘/storage-systems/{system-id}/ssc/volumes’, ‘snapshot_groups’: ‘/storage-systems/{system-id}/snapshot-groups’, ‘volumes’: ‘/storage-systems/{system-id}/volumes’, ‘snapshot_images’: ‘/storage-systems/{system-id}/snapshot-images’, ‘volume’: ‘/storage-systems/{system-id}/volumes/{object-id}’, ‘cgroup_cgsnap_views’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/views/’, ‘thin_volume_expand’: ‘/storage-systems/{system-id}/thin-volumes/{object-id}/expand’, ‘snapshot_volumes’: ‘/storage-systems/{system-id}/snapshot-volumes’, ‘cgroup_member’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/member-volumes/{vol-id}’, ‘volume_expand’: ‘/storage-systems/{system-id}/volumes/{object-id}/expand’, ‘ssc_volume’: ‘/storage-systems/{system-id}/ssc/volumes/{object-id}’, ‘cgroup_snapshots’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/snapshots’, ‘cgroup_cgsnap_view’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/views/{seq-num}’, ‘cgroup_snapshots_by_seq’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}/snapshots/{seq-num}’, ‘cgroup’: ‘/storage-systems/{system-id}/consistency-groups/{object-id}’}¶
-
REST_1_3_VERSION
= (1, 53, 9000, 1)¶
-
REST_1_4_VERSIONS
= ((1, 54, 9000, 1), (1, 54, 9090, 0))¶
-
SSC_VALID_VERSIONS
= ((1, 53, 9000, 1), (1, 53, 9010, 17))¶
-
WWN
= ‘worldWideName’¶
-
add_autosupport_data
(key, data)¶ Register driver statistics via autosupport log.
-
add_consistency_group_member
(volume_id, cg_id, repo_percent=20.0)¶ Add a volume to a consistency group
:param volume_id the eseries volume id :param cg_id: the eseries cg id :param repo_percent: percentage capacity of the volume to use for capacity of the copy-on-write repository
-
control_volume_copy_job
(obj_id, control=’start’)¶ Controls a volume copy job.
-
create_cg_snapshot_view
(cg_id, name, snap_id)¶ Define a snapshot view for the cgsnapshot
In order to define a snapshot view for a snapshot defined under a consistency group, the view must be defined at the cgsnapshot level.
Parameters: - cg_id – E-Series cg identifier
- name – the label for the view
- snap_id – E-Series snapshot view to locate
Raises: NetAppDriverException – if the snapshot view cannot be located for the snapshot identified by snap_id
Returns: snapshot view for snapshot identified by snap_id
-
create_consistency_group
(name, warn_at_percent_full=75, rollback_priority=’medium’, full_policy=’failbasewrites’)¶ Define a new consistency group
-
create_consistency_group_snapshot
(cg_id)¶ Define a consistency group snapshot
-
create_host
(label, host_type, ports=None, group_id=None)¶ Creates host on array.
-
create_host_group
(label)¶ Creates a host group on the array.
-
create_host_with_ports
(label, host_type, port_ids, port_type=’iscsi’, group_id=None)¶ Creates host on array with given port information.
-
create_snapshot_group
(label, object_id, storage_pool_id=None, repo_percent=99, warn_thres=99, auto_del_limit=0, full_policy=’failbasewrites’)¶ Creates snapshot group on array.
-
create_snapshot_image
(group_id)¶ Creates snapshot image in snapshot group.
-
create_snapshot_volume
(image_id, label, base_object_id, storage_pool_id=None, repo_percent=99, full_thres=99, view_mode=’readOnly’)¶ Creates snapshot volume.
-
create_volume
(pool, label, size, unit=’gb’, seg_size=0, read_cache=None, write_cache=None, flash_cache=None, data_assurance=None, thin_provision=False)¶ Creates a volume on array with the configured attributes
Note: if read_cache, write_cache, flash_cache, or data_assurance are not provided, the default will be utilized by the Webservice.
Parameters: - pool – The pool unique identifier
- label – The unqiue label for the volume
- size – The capacity in units
- unit – The unit for capacity
- seg_size – The segment size for the volume, expressed in KB. Default will allow the Webservice to choose.
- read_cache – If true, enable read caching, if false, explicitly disable it.
- write_cache – If true, enable write caching, if false, explicitly disable it.
- flash_cache – If true, add the volume to a Flash Cache
- data_assurance – If true, enable the Data Assurance capability
Returns: The created volume
-
create_volume_copy_job
(src_id, tgt_id, priority=’priority4’, tgt_wrt_protected=’true’)¶ Creates a volume copy job.
-
create_volume_mapping
(object_id, target_id, lun)¶ Creates volume mapping on array.
-
delete_cg_snapshot_view
(cg_id, view_id)¶
-
delete_consistency_group
(object_id)¶
-
delete_consistency_group_snapshot
(cg_id, seq_num)¶ Define a consistency group snapshot
-
delete_snapshot_group
(object_id)¶ Deletes given snapshot group from array.
-
delete_snapshot_image
(object_id)¶ Deletes given snapshot image in snapshot group.
-
delete_snapshot_volume
(object_id)¶ Deletes given snapshot volume.
-
delete_vol_copy_job
(object_id)¶ Delete volume copy job.
-
delete_volume
(object_id)¶ Deletes given volume from array.
-
delete_volume_mapping
(map_object_id)¶ Deletes given volume mapping from array.
-
expand_volume
(object_id, new_capacity, thin_provisioned, capacity_unit=’gb’)¶ Increase the capacity of a volume
-
get_asup_info
()¶ Returns a dictionary of relevant autosupport information.
Currently returned fields are: model – E-series model name serial_numbers – Serial number for each controller firmware_version – Version of active firmware chassis_sn – Serial number for whole chassis
-
get_consistency_group
(object_id)¶ Retrieve the consistency group identified by object_id
-
get_consistency_group_snapshots
(cg_id)¶ Retrieve all snapshots defined for a consistency group
-
get_eseries_api_info
(verify=False)¶ Get E-Series API information from the array.
-
get_host
(host_ref)¶ Gets a single host from the array.
-
get_host_group
(host_group_ref)¶ Gets a single host group from the array.
-
get_host_group_by_name
(name)¶ Gets a single host group by name from the array.
-
get_pool_operation_progress
(object_id)¶ Retrieve the progress long-running operations on a storage pool
Example:
[ { "volumeRef": "3232....", # Volume being referenced "progressPercentage": 0, # Approxmate percent complete "estimatedTimeToCompletion": 0, # ETA in minutes "currentAction": "none" # Current volume action } ... ]
Parameters: object_id – A pool id Returns: A dict representing the action progress
-
get_ssc_storage_pool
(volume_group_ref)¶ Get storage pool service quality information from the array.
-
get_storage_pool
(volume_group_ref)¶ Get storage pool information from the array.
-
get_system_id
()¶ Get the storage system id.
-
get_volume_mappings
()¶ Creates volume mapping on array.
-
get_volume_mappings_for_host
(host_ref)¶ Gets all volume mappings for given host from array.
-
get_volume_mappings_for_host_group
(hg_ref)¶ Gets all volume mappings for given host group from array.
-
get_volume_mappings_for_volume
(volume)¶ Gets all host mappings for given volume from array.
-
list_backend_store
(key)¶ Retrieve data by key from the persistent store on the backend.
Example response: {“key”: “cinder-snapshots”, “value”: “[]”}
Parameters: key – the persistent store to retrieve Returns: a json body representing the value of the store, or an empty json object
-
list_cg_snapshot_views
(cg_id, view_id)¶
-
list_consistency_groups
()¶ Retrieve all consistency groups defined on the array
-
list_drives
()¶ Lists drives in the array.
-
list_hardware_inventory
()¶ Lists objects in the hardware inventory.
-
list_host_groups
()¶ Lists host groups on the array.
-
list_host_types
()¶ Lists host types in storage system.
-
list_hosts
()¶ Lists host objects in the system.
-
list_snapshot_group
(object_id)¶ Retrieve given snapshot group from the array.
-
list_snapshot_groups
()¶ Lists snapshot groups.
-
list_snapshot_image
(object_id)¶ Retrieve given snapshot image from the array.
-
list_snapshot_images
()¶ Lists snapshot images.
-
list_snapshot_volumes
()¶ Lists snapshot volumes/views defined on the array.
-
list_ssc_storage_pools
()¶ Lists pools and their service quality defined on the array.
-
list_storage_pools
()¶ Lists storage pools in the array.
-
list_storage_system
()¶ List current storage system registered with web service.
-
list_storage_systems
()¶ Lists managed storage systems registered with web service.
-
list_target_wwpns
()¶ Lists the world-wide port names of the target.
-
list_vol_copy_job
(object_id)¶ List volume copy job.
-
list_volume
(object_id)¶ Retrieve the given volume from array.
Parameters: object_id – The volume id, label, or wwn Returns: The volume identified by object_id Raise: VolumeNotFound if the volume could not be found
-
list_volumes
()¶ Lists all volumes in storage array.
-
move_volume_mapping_via_symbol
(map_ref, to_ref, lun_id)¶ Moves a map from one host/host_group object to another.
-
register_storage_system
(controller_addresses, password=None, wwn=None)¶ Registers storage system with web service.
-
remove_consistency_group_member
(volume_id, cg_id)¶ Remove a volume from a consistency group
-
save_backend_store
(key, store_data)¶ Save a json value to the persistent storage on the backend.
The storage backend provides a small amount of persistent storage that we can utilize for storing driver information.
Parameters: - key – The key utilized for storing/retrieving the data
- store_data – a python data structure that will be stored as a json value
-
set_chap_authentication
(target_iqn, chap_username, chap_password)¶ Configures CHAP credentials for target IQN from backend.
-
set_counter
(key, value)¶
-
set_host_group_for_host
(host_ref, host_group_ref=‘0000000000000000000000000000000000000000’)¶ Sets or clears which host group a host is in.
-
set_system_id
(system_id)¶ Set the storage system id.
-
update_host
(host_ref, data)¶ Updates host type for a given host.
-
update_host_type
(host_ref, host_type)¶ Updates host type for a given host.
-
update_snapshot_group
(group_id, label)¶ Modify a snapshot group on the array.
-
update_snapshot_volume
(snap_vol_id, label=None, full_thres=None)¶ Modify an existing snapshot volume.
-
update_stored_system_password
(password)¶ Update array password stored on web service.
-
update_volume
(object_id, label)¶ Renames given volume on array.
-