The cinder.volume.drivers.hitachi.vsp_utils
Module¶
Utility module for Hitachi VSP Driver.
-
class
VSPMsg
(error_info)¶ Bases:
enum.Enum
messages for Hitachi VSP Driver.
-
ADD_HBA_WWN_FAILED
= <VSPMsg.ADD_HBA_WWN_FAILED: {'loglevel': 30, 'msg': u'Failed to assign the WWN. (port: %(port)s, gid: %(gid)s, wwn: %(wwn)s)', 'msg_id': 317, 'suffix': 'W'}>¶
-
ADD_PAIR_TARGET_FAILED
= <VSPMsg.ADD_PAIR_TARGET_FAILED: {'loglevel': 40, 'msg': u'Failed to add the pair target.', 'msg_id': 638, 'suffix': 'E'}>¶
-
CONNECT_VOLUME_FAILED
= <VSPMsg.CONNECT_VOLUME_FAILED: {'loglevel': 40, 'msg': u'Failed to attach the logical device. (LDEV: %(ldev)s, reason: %(reason)s)', 'msg_id': 634, 'suffix': 'E'}>¶
-
CREATE_HORCM_CONF_FILE_FAILED
= <VSPMsg.CREATE_HORCM_CONF_FILE_FAILED: {'loglevel': 40, 'msg': u'Failed to open a file. (file: %(file)s, ret: %(ret)s, stderr: %(err)s)', 'msg_id': 632, 'suffix': 'E'}>¶
-
CREATE_HOST_GROUP_FAILED
= <VSPMsg.CREATE_HOST_GROUP_FAILED: {'loglevel': 30, 'msg': u'A host group could not be added. (port: %(port)s)', 'msg_id': 308, 'suffix': 'W'}>¶
-
CREATE_ISCSI_TARGET_FAILED
= <VSPMsg.CREATE_ISCSI_TARGET_FAILED: {'loglevel': 30, 'msg': u'An iSCSI target could not be added. (port: %(port)s)', 'msg_id': 309, 'suffix': 'W'}>¶
-
CREATE_LDEV_FAILED
= <VSPMsg.CREATE_LDEV_FAILED: {'loglevel': 40, 'msg': u'Failed to add the logical device.', 'msg_id': 636, 'suffix': 'E'}>¶
-
DELETE_DEVICE_GRP_FAILED
= <VSPMsg.DELETE_DEVICE_GRP_FAILED: {'loglevel': 30, 'msg': u'Failed to delete the configuration of full copy pair. (P-VOL: %(pvol)s, S-VOL: %(svol)s)', 'msg_id': 327, 'suffix': 'W'}>¶
-
DELETE_LDEV_FAILED
= <VSPMsg.DELETE_LDEV_FAILED: {'loglevel': 30, 'msg': u'Failed to delete a logical device. (LDEV: %(ldev)s)', 'msg_id': 313, 'suffix': 'W'}>¶
-
DELETE_SI_PAIR_FAILED
= <VSPMsg.DELETE_SI_PAIR_FAILED: {'loglevel': 30, 'msg': u'Failed to delete full copy pair. (P-VOL: %(pvol)s, S-VOL: %(svol)s)', 'msg_id': 324, 'suffix': 'W'}>¶
-
DELETE_TARGET_FAILED
= <VSPMsg.DELETE_TARGET_FAILED: {'loglevel': 30, 'msg': u'A host group or an iSCSI target could not be deleted. (port: %(port)s, gid: %(id)s)', 'msg_id': 306, 'suffix': 'W'}>¶
-
DELETE_TI_PAIR_FAILED
= <VSPMsg.DELETE_TI_PAIR_FAILED: {'loglevel': 30, 'msg': u'Failed to delete thin copy pair. (P-VOL: %(pvol)s, S-VOL: %(svol)s)', 'msg_id': 325, 'suffix': 'W'}>¶
-
DISCARD_ZERO_PAGE_FAILED
= <VSPMsg.DISCARD_ZERO_PAGE_FAILED: {'loglevel': 30, 'msg': u'Failed to perform a zero-page reclamation. (LDEV: %(ldev)s)', 'msg_id': 315, 'suffix': 'W'}>¶
-
DISCONNECT_VOLUME_FAILED
= <VSPMsg.DISCONNECT_VOLUME_FAILED: {'loglevel': 30, 'msg': u'Failed to detach the logical device. (LDEV: %(ldev)s, reason: %(reason)s)', 'msg_id': 329, 'suffix': 'W'}>¶
-
DRIVER_INITIALIZATION_START
= <VSPMsg.DRIVER_INITIALIZATION_START: {'loglevel': 20, 'msg': u'Initialization of %(driver)s %(version)s started.', 'msg_id': 4, 'suffix': 'I'}>¶
-
DRIVER_READY_FOR_USE
= <VSPMsg.DRIVER_READY_FOR_USE: {'loglevel': 20, 'msg': u'The storage backend can be used. (config_group: %(config_group)s)', 'msg_id': 3, 'suffix': 'I'}>¶
-
HORCM_LOGIN_FAILED
= <VSPMsg.HORCM_LOGIN_FAILED: {'loglevel': 30, 'msg': u'Failed to perform user authentication of HORCM. (user: %(user)s)', 'msg_id': 323, 'suffix': 'W'}>¶
-
HORCM_RESTART_FAILED
= <VSPMsg.HORCM_RESTART_FAILED: {'loglevel': 40, 'msg': u'Failed to restart HORCM. (inst: %(inst)s)', 'msg_id': 609, 'suffix': 'E'}>¶
-
HORCM_RESTART_FOR_SI_FAILED
= <VSPMsg.HORCM_RESTART_FOR_SI_FAILED: {'loglevel': 30, 'msg': u'Failed to reload the configuration of full copy pair. (inst: %(inst)s)', 'msg_id': 322, 'suffix': 'W'}>¶
-
HORCM_SHUTDOWN_FAILED
= <VSPMsg.HORCM_SHUTDOWN_FAILED: {'loglevel': 40, 'msg': u'Failed to shutdown HORCM. (inst: %(inst)s)', 'msg_id': 608, 'suffix': 'E'}>¶
-
HORCM_START_FAILED
= <VSPMsg.HORCM_START_FAILED: {'loglevel': 30, 'msg': u'Failed to start HORCM. (inst: %(inst)s)', 'msg_id': 320, 'suffix': 'W'}>¶
-
INVALID_LDEV_ATTR_FOR_MANAGE
= <VSPMsg.INVALID_LDEV_ATTR_FOR_MANAGE: {'loglevel': 40, 'msg': u'Failed to manage the specified LDEV (%(ldev)s). The LDEV must be an unpaired %(ldevtype)s.', 'msg_id': 702, 'suffix': 'E'}>¶
-
INVALID_LDEV_FOR_CONNECTION
= <VSPMsg.INVALID_LDEV_FOR_CONNECTION: {'loglevel': 40, 'msg': u'The volume %(volume_id)s to be mapped was not found.', 'msg_id': 619, 'suffix': 'E'}>¶
-
INVALID_LDEV_FOR_DELETION
= <VSPMsg.INVALID_LDEV_FOR_DELETION: {'loglevel': 30, 'msg': u'Failed to specify a logical device to be deleted. (method: %(method)s, id: %(id)s)', 'msg_id': 304, 'suffix': 'W'}>¶
-
INVALID_LDEV_FOR_EXTENSION
= <VSPMsg.INVALID_LDEV_FOR_EXTENSION: {'loglevel': 40, 'msg': u'The volume %(volume_id)s to be extended was not found.', 'msg_id': 613, 'suffix': 'E'}>¶
-
INVALID_LDEV_FOR_MANAGE
= <VSPMsg.INVALID_LDEV_FOR_MANAGE: {'loglevel': 40, 'msg': u'No valid value is specified for "source-id". A valid LDEV number must be specified in "source-id" to manage the volume.', 'msg_id': 707, 'suffix': 'E'}>¶
-
INVALID_LDEV_FOR_UNMAPPING
= <VSPMsg.INVALID_LDEV_FOR_UNMAPPING: {'loglevel': 30, 'msg': u'Failed to specify a logical device for the volume %(volume_id)s to be unmapped.', 'msg_id': 302, 'suffix': 'W'}>¶
-
INVALID_LDEV_FOR_VOLUME_COPY
= <VSPMsg.INVALID_LDEV_FOR_VOLUME_COPY: {'loglevel': 40, 'msg': u'The %(type)s %(id)s source to be replicated was not found.', 'msg_id': 624, 'suffix': 'E'}>¶
-
INVALID_LDEV_PORT_FOR_MANAGE
= <VSPMsg.INVALID_LDEV_PORT_FOR_MANAGE: {'loglevel': 40, 'msg': u'Failed to manage the specified LDEV (%(ldev)s). The LDEV must not be mapped.', 'msg_id': 704, 'suffix': 'E'}>¶
-
INVALID_LDEV_SIZE_FOR_MANAGE
= <VSPMsg.INVALID_LDEV_SIZE_FOR_MANAGE: {'loglevel': 40, 'msg': u'Failed to manage the specified LDEV (%(ldev)s). The LDEV size must be expressed in gigabytes.', 'msg_id': 703, 'suffix': 'E'}>¶
-
INVALID_LDEV_STATUS_FOR_COPY
= <VSPMsg.INVALID_LDEV_STATUS_FOR_COPY: {'loglevel': 40, 'msg': u'The source logical device to be replicated does not exist in the storage system. (LDEV: %(ldev)s)', 'msg_id': 612, 'suffix': 'E'}>¶
-
INVALID_LDEV_TYPE_FOR_UNMANAGE
= <VSPMsg.INVALID_LDEV_TYPE_FOR_UNMANAGE: {'loglevel': 40, 'msg': u'Failed to unmanage the volume %(volume_id)s. The volume type must be %(volume_type)s.', 'msg_id': 706, 'suffix': 'E'}>¶
-
INVALID_PARAMETER
= <VSPMsg.INVALID_PARAMETER: {'loglevel': 40, 'msg': u'A parameter is invalid. (%(param)s)', 'msg_id': 601, 'suffix': 'E'}>¶
-
INVALID_PARAMETER_VALUE
= <VSPMsg.INVALID_PARAMETER_VALUE: {'loglevel': 40, 'msg': u'A parameter value is invalid. (%(meta)s)', 'msg_id': 602, 'suffix': 'E'}>¶
-
INVALID_VOLUME_SIZE_FOR_COPY
= <VSPMsg.INVALID_VOLUME_SIZE_FOR_COPY: {'loglevel': 40, 'msg': u'Failed to create a volume from a %(type)s. The size of the new volume must be equal to or greater than the size of the original %(type)s. (new volume: %(volume_id)s)', 'msg_id': 617, 'suffix': 'E'}>¶
-
INVALID_VOLUME_SIZE_FOR_TI
= <VSPMsg.INVALID_VOLUME_SIZE_FOR_TI: {'loglevel': 40, 'msg': u'Failed to create a volume from a %(type)s. The size of the new volume must be equal to the size of the original %(type)s when the new volume is created by %(copy_method)s. (new volume: %(volume_id)s)', 'msg_id': 621, 'suffix': 'E'}>¶
-
INVALID_VOLUME_TYPE_FOR_EXTEND
= <VSPMsg.INVALID_VOLUME_TYPE_FOR_EXTEND: {'loglevel': 40, 'msg': u'The volume %(volume_id)s could not be extended. The volume type must be Normal.', 'msg_id': 618, 'suffix': 'E'}>¶
-
LDEV_CREATION_WAIT_TIMEOUT
= <VSPMsg.LDEV_CREATION_WAIT_TIMEOUT: {'loglevel': 40, 'msg': u'The creation of a logical device could not be completed. (LDEV: %(ldev)s)', 'msg_id': 653, 'suffix': 'E'}>¶
-
LDEV_DELETION_WAIT_TIMEOUT
= <VSPMsg.LDEV_DELETION_WAIT_TIMEOUT: {'loglevel': 40, 'msg': u'Failed to delete a logical device. (LDEV: %(ldev)s)', 'msg_id': 652, 'suffix': 'E'}>¶
-
LDEV_NOT_EXIST
= <VSPMsg.LDEV_NOT_EXIST: {'loglevel': 30, 'msg': u'The logical device does not exist in the storage system. (LDEV: %(ldev)s)', 'msg_id': 319, 'suffix': 'W'}>¶
-
MAP_LDEV_FAILED
= <VSPMsg.MAP_LDEV_FAILED: {'loglevel': 30, 'msg': u'Failed to map a logical device. (LDEV: %(ldev)s, port: %(port)s, id: %(id)s, lun: %(lun)s)', 'msg_id': 314, 'suffix': 'W'}>¶
-
METHOD_END
= <VSPMsg.METHOD_END: {'loglevel': 20, 'msg': u'%(method)s ended. (config_group: %(config_group)s)', 'msg_id': 2, 'suffix': 'I'}>¶
-
METHOD_START
= <VSPMsg.METHOD_START: {'loglevel': 20, 'msg': u'%(method)s starts. (config_group: %(config_group)s)', 'msg_id': 0, 'suffix': 'I'}>¶
-
NO_AVAILABLE_MIRROR_UNIT
= <VSPMsg.NO_AVAILABLE_MIRROR_UNIT: {'loglevel': 40, 'msg': u'A pair could not be created. The maximum number of pair is exceeded. (copy method: %(copy_method)s, P-VOL: %(pvol)s)', 'msg_id': 615, 'suffix': 'E'}>¶
-
NO_AVAILABLE_RESOURCE
= <VSPMsg.NO_AVAILABLE_RESOURCE: {'loglevel': 40, 'msg': u'There are no resources available for use. (resource: %(resource)s)', 'msg_id': 648, 'suffix': 'E'}>¶
-
NO_CONNECTED_TARGET
= <VSPMsg.NO_CONNECTED_TARGET: {'loglevel': 40, 'msg': u'The host group or iSCSI target was not found.', 'msg_id': 649, 'suffix': 'E'}>¶
-
NO_HBA_WWN_ADDED_TO_HOST_GRP
= <VSPMsg.NO_HBA_WWN_ADDED_TO_HOST_GRP: {'loglevel': 40, 'msg': u'No WWN is assigned. (port: %(port)s, gid: %(gid)s)', 'msg_id': 614, 'suffix': 'E'}>¶
-
NO_MAPPING_FOR_LDEV
= <VSPMsg.NO_MAPPING_FOR_LDEV: {'loglevel': 40, 'msg': u'Failed to map a logical device to any pair targets. (LDEV: %(ldev)s)', 'msg_id': 639, 'suffix': 'E'}>¶
-
OBJECT_CREATED
= <VSPMsg.OBJECT_CREATED: {'loglevel': 20, 'msg': u'Created %(object)s. (%(details)s)', 'msg_id': 6, 'suffix': 'I'}>¶
-
OUTPUT_PARAMETER_VALUES
= <VSPMsg.OUTPUT_PARAMETER_VALUES: {'loglevel': 20, 'msg': u'The parameter of the storage backend. (config_group: %(config_group)s)', 'msg_id': 1, 'suffix': 'I'}>¶
-
POOL_INFO_RETRIEVAL_FAILED
= <VSPMsg.POOL_INFO_RETRIEVAL_FAILED: {'loglevel': 40, 'msg': u'Failed to provide information about a pool. (pool: %(pool)s)', 'msg_id': 620, 'suffix': 'E'}>¶
-
POOL_NOT_FOUND
= <VSPMsg.POOL_NOT_FOUND: {'loglevel': 40, 'msg': u'A pool could not be found. (pool: %(pool)s)', 'msg_id': 640, 'suffix': 'E'}>¶
-
RESOURCE_NOT_FOUND
= <VSPMsg.RESOURCE_NOT_FOUND: {'loglevel': 40, 'msg': u'The resource %(resource)s was not found.', 'msg_id': 650, 'suffix': 'E'}>¶
-
SET_CONFIG_VALUE
= <VSPMsg.SET_CONFIG_VALUE: {'loglevel': 20, 'msg': u'Set %(object)s to %(value)s.', 'msg_id': 5, 'suffix': 'I'}>¶
-
SI_PAIR_STATUS_WAIT_TIMEOUT
= <VSPMsg.SI_PAIR_STATUS_WAIT_TIMEOUT: {'loglevel': 40, 'msg': u'The status change of full copy pair could not be completed. (S-VOL: %(svol)s)', 'msg_id': 610, 'suffix': 'E'}>¶
-
STORAGE_COMMAND_FAILED
= <VSPMsg.STORAGE_COMMAND_FAILED: {'loglevel': 40, 'msg': u'The command %(cmd)s failed. (ret: %(ret)s, stdout: %(out)s, stderr: %(err)s)', 'msg_id': 600, 'suffix': 'E'}>¶
-
TI_PAIR_STATUS_WAIT_TIMEOUT
= <VSPMsg.TI_PAIR_STATUS_WAIT_TIMEOUT: {'loglevel': 40, 'msg': u'The status change of thin copy pair could not be completed. (S-VOL: %(svol)s)', 'msg_id': 611, 'suffix': 'E'}>¶
-
UNABLE_TO_DELETE_PAIR
= <VSPMsg.UNABLE_TO_DELETE_PAIR: {'loglevel': 40, 'msg': u'A pair cannot be deleted. (P-VOL: %(pvol)s, S-VOL: %(svol)s)', 'msg_id': 616, 'suffix': 'E'}>¶
-
UNMAP_LDEV_FAILED
= <VSPMsg.UNMAP_LDEV_FAILED: {'loglevel': 30, 'msg': u'Failed to unmap a logical device. (LDEV: %(ldev)s)', 'msg_id': 310, 'suffix': 'W'}>¶
-
VOLUME_COPY_FAILED
= <VSPMsg.VOLUME_COPY_FAILED: {'loglevel': 40, 'msg': u'Failed to copy a volume. (copy method: %(copy_method)s, P-VOL: %(pvol)s, S-VOL: %(svol)s)', 'msg_id': 722, 'suffix': 'E'}>¶
-
WAIT_SI_PAIR_STATUS_FAILED
= <VSPMsg.WAIT_SI_PAIR_STATUS_FAILED: {'loglevel': 30, 'msg': u'Failed to change the status of full copy pair. (P-VOL: %(pvol)s, S-VOL: %(svol)s)', 'msg_id': 326, 'suffix': 'W'}>¶
-
output_log
(**kwargs)¶ Output the message to the log file and return the message.
-
-
build_initiator_target_map
(connector, target_wwns, lookup_service)¶ Return a dictionary mapping server-wwns and lists of storage-wwns.
-
check_ignore_error
(ignore_error, stderr)¶ Return True if ignore_error is in stderr, False otherwise.
-
check_opt_value
(conf, names)¶ Check if the parameter names and values are valid.
-
check_opts
(conf, opts)¶ Check if the specified configuration is valid.
-
check_timeout
(start_time, timeout)¶ Return True if the specified time has passed, False otherwise.
-
execute
(*cmd, **kwargs)¶ Run the specified command and return its results.
-
get_ldev
(obj)¶ Get the LDEV number from the given object and return it as integer.
-
get_volume_metadata
(volume)¶ Return a dictionary of the metadata of the specified volume.
-
import_object
(conf, driver_info, db)¶ Import a class and return an instance of it.
-
mask_password
(cmd)¶ Return a string in which the password is masked.
-
output_log
(msg_enum, **kwargs)¶ Output the specified message to the log file and return the message.
-
output_opt_info
(conf, names)¶ Output parameter names and values to the log file.
-
output_opts
(conf, opts)¶ Output parameter names and values to the log file.
-
output_start_end_log
(func)¶ Output the log of the start and the end of the method.
-
output_storage_cli_info
(name, version)¶ Output storage CLI info to the log file.
-
require_target_existed
(targets)¶ Check if the target list includes one or more members.
-
update_conn_info
(conn_info, connector, lookup_service)¶ Set wwn mapping list to the connection info.