The cinder.volume.drivers.hitachi.vsp_common
Module¶
Common module for Hitachi VSP Driver.
-
class
VSPCommon
(conf, driverinfo, db)¶ Bases:
object
Common class for Hitachi VSP Driver.
-
check_param
()¶ Check parameter values and consistency among them.
-
check_param_iscsi
()¶ Check iSCSI-related parameter values and consistency among them.
-
check_ports_info
()¶ Check if available storage ports exist.
-
check_vvol
(ldev)¶ Return True if the specified LDEV is V-VOL, False otherwise.
-
config_lock
()¶ Initialize lock resource names.
-
connect_storage
()¶ Prepare for using the storage.
-
copy_on_storage
(pvol, size, metadata, sync)¶ Create a copy of the specified LDEV on the storage.
-
create_cloned_volume
(volume, src_vref)¶ Create a clone of the specified volume and return its properties.
-
create_ldev
(size, is_vvol=False)¶ Create an LDEV and return its LDEV number.
-
create_ldev_on_storage
(ldev, size, is_vvol)¶ Create an LDEV on the storage system.
-
create_mapping_targets
(targets, connector)¶ Create server-storage connection for all specified storage ports.
-
create_pair_on_storage
(pvol, svol, is_thin)¶ Create a copy pair on the storage.
-
create_snapshot
(snapshot)¶ Create a snapshot from a volume and return its properties.
-
create_target_to_storage
(port, connector, hba_ids)¶ Create a host group or an iSCSI target on the specified port.
-
create_volume
(volume)¶ Create a volume and return its properties.
-
create_volume_from_snapshot
(volume, snapshot)¶ Create a volume from a snapshot and return its properties.
-
delete_ldev_from_storage
(ldev)¶ Delete the specified LDEV from the storage.
-
delete_pair
(ldev, all_split=True)¶ Disconnect all volume pairs to which the specified LDEV belongs.
-
delete_pair_based_on_pvol
(pair_info, all_split)¶ Disconnect all volume pairs to which the specified P-VOL belongs.
-
delete_pair_based_on_svol
(pvol, svol_info)¶ Disconnect all volume pairs to which the specified S-VOL belongs.
-
delete_pair_from_storage
(pvol, svol, is_thin)¶ Disconnect the volume pair that consists of the specified LDEVs.
-
delete_snapshot
(snapshot)¶ Delete the specified snapshot.
-
delete_target_from_storage
(port, gid)¶ Delete the host group or the iSCSI target from the port.
-
delete_volume
(volume)¶ Delete the specified volume.
-
discard_zero_page
(volume)¶ Return the volume’s no-data pages to the storage pool.
-
do_setup
(context)¶ Prepare for the startup of the driver.
-
extend_ldev
(ldev, old_size, new_size)¶ Extend the specified LDEV to the specified new size.
-
extend_volume
(volume, new_size)¶ Extend the specified volume to the specified size.
-
find_all_mapped_targets_from_storage
(targets, ldev)¶ Add all port-gids connected with the LDEV to the list.
-
find_mapped_targets_from_storage
(targets, ldev, target_ports)¶ Find and store IDs of ports used for server-LDEV connection.
-
find_targets_from_storage
(targets, connector, target_ports)¶ Find mapped ports, memorize them and return unmapped port count.
-
get_copy_method
(metadata)¶ Return copy method(FULL or THIN).
-
get_hba_ids_from_connector
(connector)¶ Return the HBA ID stored in the connector.
-
get_ldev_size_in_gigabyte
(ldev, existing_ref)¶ Return the size[GB] of the specified LDEV.
-
get_pair_info
(ldev)¶ Return volume pair info(LDEV number, pair status and pair type).
-
get_pool_id
()¶ Return the storage pool ID as integer.
-
get_pool_info
()¶ Return the total and free capacity of the storage pool.
-
get_properties
(targets, connector, target_lun=None)¶ Return server-LDEV connection info.
-
get_properties_fc
(targets)¶ Return FC-specific server-LDEV connection info.
-
get_properties_iscsi
(targets, multipath)¶ Return iSCSI-specific server-LDEV connection info.
-
get_storage_cli_info
()¶ Return a tuple of the storage CLI name and its version.
-
get_target_ports
(connector)¶ Return a list of ports corresponding to the specified connector.
-
get_unmap_targets_list
(target_list, mapped_list)¶ Return a list of IDs of ports that need to be disconnected.
-
get_unused_ldev
()¶ Find an unused LDEV and return its LDEV number.
-
get_volume_stats
(refresh=False)¶ Return properties, capabilities and current states of the driver.
-
init_cinder_hosts
(**kwargs)¶ Initialize server-storage connection.
-
initialize_connection
(volume, connector)¶ Initialize connection between the server and the volume.
-
manage_existing
(existing_ref)¶ Return volume properties which Cinder needs to manage the volume.
-
manage_existing_get_size
(existing_ref)¶ Return the size[GB] of the specified volume.
-
map_ldev
(targets, ldev)¶ Create the path between the server and the LDEV and return LUN.
-
output_param_to_log
()¶ Output configuration parameter values to the log file.
-
run_and_verify_storage_cli
(*cmd, **kwargs)¶ Run storage CLI and return the result or raise an exception.
-
run_storage_cli
(*cmd, **kwargs)¶ Run storage CLI.
-
set_hba_ids
(port, gid, hba_ids)¶ Connect all specified HBAs with the specified port.
-
set_target_mode
(port, gid)¶ Configure the target to meet the environment.
-
terminate_connection
(volume, connector)¶ Terminate connection between the server and the volume.
-
unmanage
(volume)¶ Prepare the volume for removing it from Cinder management.
-
unmap_ldev
(targets, ldev)¶ Delete the LUN between the specified LDEV and port-gid.
-
unmap_ldev_from_storage
(ldev)¶ Delete the connection between the specified LDEV and servers.
-
wait_full_copy_completion
(pvol, svol)¶ Wait until FULL copy is completed.
-