items
:param id_key: Attribute key used to retrieve the unique ID, used
to generate the next link marker for a pagination query
- :returns links
+ :returns: links
"""
item_count = item_count or len(items)
limit = _get_limit_param(request.GET.copy())
Default backup driver implementation has no extra information.
:param backup: backup object to export
- :returns driver_info - dictionary with extra information
+ :returns: driver_info - dictionary with extra information
"""
return {}
:param backup: backup object to export
:param driver_info: dictionary with driver specific backup record
information
- :returns nothing
+ :returns: nothing
"""
return
:param volume_id: Volume id for backup or as restore target
:param bckup_mode: TSM backup mode, either 'image' or 'file'
:raises: InvalidBackup
- :returns str -- hardlink path of the volume block device
+ :returns: str -- hardlink path of the volume block device
"""
if _image_mode(bckup_mode):
hardlink_path = utils.make_dev_path('%s-%s' %
value specified in check_attrs. This is needed because for file
backups, the parent directories may also be included the first a
volume is backed up.
- :returns bool -- indicate if requited output attribute found in output
+ :returns: bool -- indicate if requited output attribute found in output
"""
parsed_attrs = {}
:param volume_file: file object representing the volume
:param volume_id: Volume id for backup or as restore target
:raises: InvalidBackup
- :returns str -- real path of volume device
- :returns str -- backup mode to be used
+ :returns: str -- real path of volume device
+ :returns: str -- backup mode to be used
"""
try:
:param backup: backup information for volume
:param volume_id: volume id
:param volume_file: file object representing the volume
- :raises InvalidBackup
+ :raises: InvalidBackup
"""
# backup_path is the path that was originally backed up.
"""Delete the given backup from TSM server.
:param backup: backup information for volume
- :raises InvalidBackup
+ :raises: InvalidBackup
"""
delete_attrs = {'Total number of objects deleted': '1'}
Using this decorator on a function will cause its execution to be logged at
`DEBUG` level with arguments, return values, and exceptions.
- :returns a function decorator
+ :returns: a function decorator
"""
func_name = f.__name__
In this case, the same IP address will be returned.
:param hostname: Host name to resolve.
- :return: IP Address for Host name.
+ :returns: IP Address for Host name.
"""
result = socket.getaddrinfo(hostname, None)[0]
(family, socktype, proto, canonname, sockaddr) = result
def get_prefixed_property(self, property):
"""Return prefixed property name
- :return a prefixed property name string or None
+ :returns: a prefixed property name string or None
"""
if property and self.capabilities.get('vendor_prefix'):
find the default filter_function. When None is returned the scheduler
will always pass the driver instance.
- :return a filter_function string or None
+ :returns: a filter_function string or None
"""
ret_function = self.configuration.filter_function
if not ret_function:
find the default goodness_function. When None is returned the scheduler
will give the lowest score to the driver instance.
- :return a goodness_function string or None
+ :returns: a goodness_function string or None
"""
ret_function = self.configuration.goodness_function
if not ret_function:
Each driver could overwrite the method to return a well-known
default string if it is available.
- :return: None
+ :returns: None
"""
return None
Each driver could overwrite the method to return a well-known
default string if it is available.
- :return: None
+ :returns: None
"""
return None
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
msg = _("The method update_migrated_volume is not implemented.")
raise NotImplementedError(msg)
"""Return pool name where volume reside on.
:param volume: The volume hosted by the the driver.
- :return: name of the pool where given volume is in.
+ :returns: name of the pool where given volume is in.
"""
return None
:param volumes: List of Cinder volumes to check for updates
:param snapshots: List of Cinder snapshots to check for updates
- :return: tuple (volume_updates, snapshot_updates)
+ :returns: tuple (volume_updates, snapshot_updates)
where volume updates {'id': uuid, provider_id: <provider-id>}
and snapshot updates {'id': uuid, provider_id: <provider-id>}
:param context: the context of the caller.
:param group: the dictionary of the consistency group to be created.
- :return model_update
+ :returns: model_update
model_update will be in this format: {'status': xxx, ......}.
:param snapshots: a list of snapshot dictionaries in the cgsnapshot.
:param source_cg: the dictionary of a consistency group as source.
:param source_vols: a list of volume dictionaries in the source_cg.
- :return model_update, volumes_model_update
+ :returns: model_update, volumes_model_update
The source can be cgsnapshot or a source cg.
:param context: the context of the caller.
:param group: the dictionary of the consistency group to be deleted.
:param volumes: a list of volume dictionaries in the group.
- :return model_update, volumes_model_update
+ :returns: model_update, volumes_model_update
param volumes is retrieved directly from the db. It is a list of
cinder.db.sqlalchemy.models.Volume to be precise. It cannot be
:param group: the dictionary of the consistency group to be updated.
:param add_volumes: a list of volume dictionaries to be added.
:param remove_volumes: a list of volume dictionaries to be removed.
- :return model_update, add_volumes_update, remove_volumes_update
+ :returns: model_update, add_volumes_update, remove_volumes_update
model_update is a dictionary that the driver wants the manager
to update upon a successful return. If None is returned, the manager
:param context: the context of the caller.
:param cgsnapshot: the dictionary of the cgsnapshot to be created.
:param snapshots: a list of snapshot dictionaries in the cgsnapshot.
- :return model_update, snapshots_model_update
+ :returns: model_update, snapshots_model_update
param snapshots is retrieved directly from the db. It is a list of
cinder.db.sqlalchemy.models.Snapshot to be precise. It cannot be
:param context: the context of the caller.
:param cgsnapshot: the dictionary of the cgsnapshot to be deleted.
:param snapshots: a list of snapshot dictionaries in the cgsnapshot.
- :return model_update, snapshots_model_update
+ :returns: model_update, snapshots_model_update
param snapshots is retrieved directly from the db. It is a list of
cinder.db.sqlalchemy.models.Snapshot to be precise. It cannot be
"""Return pool name where volume reside on.
:param volume: The volume hosted by the the driver.
- :return: name of the pool where given volume is in.
+ :returns: name of the pool where given volume is in.
"""
return None
:param api: Dell SC API opbject.
:param scvolume: Dell SC Volume object.
:param volume: Cinder Volume object.
- :return: Nothing.
+ :returns: Nothing.
"""
if scvolume and volume.get('consistencygroup_id'):
profile = api.find_replay_profile(
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
# We use id as our volume name so we need to rename the backend
# volume to the original volume name.
:param context: the context of the caller.
:param group: the dictionary of the consistency group to be created.
- :return: Nothing on success.
+ :returns: Nothing on success.
:raises: VolumeBackendAPIException
"""
gid = group['id']
:param context: the context of the caller.
:param group: the dictionary of the consistency group to be created.
- :return: Updated model_update, volumes.
+ :returns: Updated model_update, volumes.
"""
gid = group['id']
with self._client.open_connection() as api:
:param group: the dictionary of the consistency group to be updated.
:param add_volumes: a list of volume dictionaries to be added.
:param remove_volumes: a list of volume dictionaries to be removed.
- :return model_update, add_volumes_update, remove_volumes_update
+ :returns: model_update, add_volumes_update, remove_volumes_update
model_update is a dictionary that the driver wants the manager
to update upon a successful return. If None is returned, the manager
:param context: the context of the caller.
:param cgsnapshot: Information about the snapshot to take.
- :return: Updated model_update, snapshots.
+ :returns: Updated model_update, snapshots.
:raises: VolumeBackendAPIException.
"""
cgid = cgsnapshot['consistencygroup_id']
:param context: the context of the caller.
:param cgsnapshot: Information about the snapshot to delete.
- :return: Updated model_update, snapshots.
+ :returns: Updated model_update, snapshots.
:raises: VolumeBackendAPIException.
"""
cgid = cgsnapshot['consistencygroup_id']
:param host: A dictionary describing the host to migrate to, where
host['host'] is its name, and host['capabilities'] is a
dictionary of its reported capabilities.
- :returns (False, None) if the driver does not support migration,
+ :returns: (False, None) if the driver does not support migration,
(True, None) if successful
"""
:param volumes: a list of volume dictionaries in the group.
:param cgsnapshot: the dictionary of the cgsnapshot as source.
:param snapshots: a list of snapshot dictionaries in the cgsnapshot.
- :return model_update, volumes_model_update
+ :returns: model_update, volumes_model_update
"""
if cgsnapshot and snapshots:
snap_by_anc = self.get_snapset_ancestors(cgsnapshot)
:param group: the dictionary of the consistency group to be updated.
:param add_volumes: a list of volume dictionaries to be added.
:param remove_volumes: a list of volume dictionaries to be removed.
- :return model_update, add_volumes_update, remove_volumes_update
+ :returns: model_update, add_volumes_update, remove_volumes_update
"""
add_volumes = add_volumes if add_volumes else []
remove_volumes = remove_volumes if remove_volumes else []
:param ip0: string IP address of controller
:param user: string user authentication for array
:param pw: string password authentication for array
- :return: formated string with version information
+ :returns: formated string with version information
"""
LOG.debug('Enable ssh: %s',
six.text_type(self.drv_configs['ssh_enabled']))
:param ip0: string IP address of controller
:param user: string user authentication for array
:param pw: string password authentication for array
- :return: formated string with version information
+ :returns: formated string with version information
"""
if (self.drv_configs['ssh_enabled'] == 'True' and
self.drv_configs['cluster_admin_ip0'] is not None):
:param ip0: string IP address of controller
:param user: string user authentication for array
:param pw: string password authentication for array
- :return: formated string with iSCSI information
+ :returns: formated string with iSCSI information
"""
out, err = self.run_cmd(cmd, ip0, user, pw,
:param user: string user authentication for array
:param pw: string password authentication for array
:param fslabel: filesystem label we want to get info
- :return: formated string with filesystems and fsids
+ :returns: formated string with filesystems and fsids
"""
if fslabel is None:
:param ip0: string IP address of controller
:param user: string user authentication for array
:param pw: string password authentication for array
- :return: EVS id of the file system
+ :returns: EVS id of the file system
"""
out, err = self.run_cmd(cmd, ip0, user, pw, "evsfs", "list",
:param evsid: EVSID for the file system
:param iqn: iSCSI qualified name
:param hlun: logical unit id
- :return: formated string
+ :returns: formated string
"""
out, err = self.run_cmd(cmd, ip0, user, pw, "console-context",
:param targetalias: alias of the target
:param hdp: data pool of the logical unit
:param secret: CHAP secret of the target
- :return: string with full IQN
+ :returns: string with full IQN
"""
_evsid = self.get_evs(cmd, ip0, user, pw, hdp)
:param pw: string password authentication for array
:param hdp: pool name used
:param target_alias: alias of the target
- :return True if target exists
- :return list with the target info
+ :returns: True if target exists
+ :returns: list with the target info
"""
LOG.debug("Checking if target %(tgt)s exists.", {'tgt': target_alias})
:param pw: string password authentication for array
:param volume_name: number of the LUN
:param hdp: storage pool of the LUN
- :return True if the lun is attached
- :return the LUN id
- :return Info related to the target
+ :returns: True if the lun is attached
+ :returns: the LUN id
+ :returns: Info related to the target
"""
LOG.debug("Checking if vol %s (hdp: %s) is attached.",
Get the available service parametersfor a given volume using its
type.
:param volume: dictionary volume reference
- :return HDP related to the service
+ :returns: HDP related to the service
"""
label = utils.extract_host(volume['host'], level='pool')
Convert that to an IP address and then restore the entire path.
:param vol_ref: driver-specific information used to identify a volume
- :return: a volume reference where share is in IP format
+ :returns: a volume reference where share is in IP format
"""
# First strip out share and convert to IP format.
if unsuccessful.
:param vol_ref: driver-specific information used to identify a volume
- :return: NFS Share, NFS mount, volume path or raise error
+ :returns: NFS Share, NFS mount, volume path or raise error
"""
# Check that the reference is valid.
if 'source-name' not in vol_ref:
:param persona_value:
:raises: exception.InvalidInput
- :return: persona ID
+ :returns: persona ID
"""
if persona_value not in self.valid_persona_values:
err = (_("Must specify a valid persona %(valid)s,"
:param type_id: id of type to get settings for
:param pool: CPG to use if type does not have one set
- :return: dict
+ :returns: dict
"""
hpe3par_keys, qos, volume_type, vvs_name = self.get_type_info(type_id)
:param volume:
:param host: Optional host to use for default pool.
- :return: dict
+ :returns: dict
"""
type_id = volume.get('volume_type_id', None)
:param volume_host: The volume's host string.
:param cpg: The actual pool (cpg) used, for example from the type.
- :return: dict Model update if we need to update volume host, else None
+ :returns: dict Model update if we need to update volume host, else None
"""
model_update = None
host = volume_utils.extract_host(volume_host, 'backend')
:param host: A dictionary describing the host to migrate to, where
host['host'] is its name, and host['capabilities'] is a
dictionary of its reported capabilities.
- :returns (False, None) if the driver does not support migration,
+ :returns: (False, None) if the driver does not support migration,
(True, model_update) if successful
"""
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
current_name = CONF.volume_name_template % new_volume['id']
original_volume_name = CONF.volume_name_template % volume['id']
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
LOG.debug(
'update migrated volume original volume id= %(volume_id)s '
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
LOG.debug(
'update migrated volume original volume id= %(volume_id)s '
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
name_id = None
provider_location = None
:param version: The version to validate
:param actual_version: The running version of the Webservice
- :return: True if the actual_version is equal or newer than the
+ :returns: True if the actual_version is equal or newer than the
current running version, otherwise False
"""
major_1, major_2, release, minor = version
explicitly disable it.
:param flash_cache: If true, add the volume to a Flash Cache
:param data_assurance: If true, enable the Data Assurance capability
- :return The created volume
+ :returns: The created volume
"""
# Utilize the new API if it is available
"""Retrieve the given volume from array.
:param object_id: The volume id, label, or wwn
- :return The volume identified by object_id
- :raise VolumeNotFound if the volume could not be found
+ :returns: The volume identified by object_id
+ :raise: VolumeNotFound if the volume could not be found
"""
if self.features.SSC_API_V2:
Example: (invalid, True)
- :returns (str, bool)
+ :returns: (str, bool)
"""
status = system.get('passwordStatus')
Example: (needsAttn, True)
- :returns (str, bool)
+ :returns: (str, bool)
"""
status = system.get('status')
status = status.lower() if status else ''
"""Return pool name where volume resides.
:param volume: The volume hosted by the driver.
- :return: Name of the pool where given volume is hosted.
+ :returns: Name of the pool where given volume is hosted.
"""
eseries_volume = self._get_volume(volume['name_id'])
storage_pool = self._client.get_storage_pool(
:param pool_id: The id of a storage pool
:param action: The anticipated action
- :return: A tuple (bool, set(str), int)
+ :returns: A tuple (bool, set(str), int)
"""
actions = set()
eta = 0
:param configuration: The volume driver configuration
:raise InvalidConfigurationValue: if configured regex pattern is invalid
- :return: A compiled regex for filtering pool names
+ :returns: A compiled regex for filtering pool names
"""
# If the configuration parameter is specified as an empty string
def __nonzero__(self):
"""Allow a FeatureState object to be tested for truth value
- :return True if the feature is supported, otherwise False
+ :returns: True if the feature is supported, otherwise False
"""
return self.supported
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
# TODO(vhou) This method may need to be updated after
# NFS snapshots are introduced.
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
name_id = None
provider_location = None
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
lcfg = self.configuration
:param new_volume: The migration volume object that was created on
this backend as part of the migration process
:param original_volume_status: The status of the original volume
- :return model_update to update DB with any needed changes
+ :returns: model_update to update DB with any needed changes
"""
original_name = CONF.volume_name_template % volume['id']
:param initiator_wwn_list: List of initiator port WWN
:param target_wwn_list: List of target port WWN
- :returns List -- device wwn map in following format
+ :returns: List -- device wwn map in following format
{
<San name>: {
'initiator_port_wwn_list':
('100000051e55a100', '100000051e55a121'..)
}
}
- :raises Exception when connection to fabric is failed
+ :raises: Exception when connection to fabric is failed
"""
device_map = {}
formatted_target_list = []
Parses nameserver raw data and adds the device port wwns to the list
- :returns list of device port wwn from ns info
+ :returns: list of device port wwn from ns info
"""
nsinfo_list = []
lines = switch_data.split('\n')
:param initiator_wwn_list: List of initiator port WWN
:param target_wwn_list: List of target port WWN
- :returns List -- device wwn map in following format
+ :returns: List -- device wwn map in following format
{
<San name>: {
'initiator_port_wwn_list':
('100000051e55a100', '100000051e55a121'..)
}
}
- :raises Exception when connection to fabric is failed
+ :raises: Exception when connection to fabric is failed
"""
device_map = {}
formatted_target_list = []
Parses nameserver raw data and adds the device port wwns to the list
- :returns list of device port wwn from ns info
+ :returns: list of device port wwn from ns info
"""
nsinfo_list = []
for line in switch_data:
available.
:param initiator_list list of initiator port WWN
:param target_list list of target port WWN
- :return device wwn map in following format
+ :returns: device wwn map in following format
{
<San name>: {
'initiator_port_wwn_list':
('100000051E55A100', '100000051E55A121'..)
}
}
- :raise Exception when a lookup service implementation is not specified
+ :raise: Exception when a lookup service implementation is not specified
in cinder.conf:fc_san_lookup_service
"""
# Initialize vendor specific implementation of FCZoneDriver