Fix some format error in docstrings

Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.

[1] http://sphinx-doc.org/domains.html#info-field-lists

Change-Id: I0fe2d2faa7a1abd6d5e84f05e7fdbb13661a94dc
This commit is contained in:
XieYingYun 2017-03-25 18:22:32 +08:00
parent 5f66f158bf
commit 1293e25115
30 changed files with 127 additions and 127 deletions

View File

@ -1141,7 +1141,7 @@ class Controller(object):
constraints and calls it with the supplied arguments. constraints and calls it with the supplied arguments.
:returns: Returns the result of the method called :returns: Returns the result of the method called
:raises: VersionNotFoundForAPIMethod if there is no method which :raises VersionNotFoundForAPIMethod: if there is no method which
matches the name and version constraints matches the name and version constraints
""" """

View File

@ -154,7 +154,7 @@ class VolumeController(volumes_v2.VolumeController):
:param req: the request :param req: the request
:param body: the request body :param body: the request body
:returns: dict -- the new volume dictionary :returns: dict -- the new volume dictionary
:raises: HTTPNotFound, HTTPBadRequest :raises HTTPNotFound, HTTPBadRequest:
""" """
self.assert_valid_body(body, 'volume') self.assert_valid_body(body, 'volume')

View File

@ -88,9 +88,9 @@ class API(base.Base):
:param context: running context :param context: running context
:param backup: the dict of backup that is got from DB. :param backup: the dict of backup that is got from DB.
:param force: indicate force delete or not :param force: indicate force delete or not
:raises: InvalidBackup :raises InvalidBackup:
:raises: BackupDriverException :raises BackupDriverException:
:raises: ServiceNotFound :raises ServiceNotFound:
""" """
check_policy(context, 'delete') check_policy(context, 'delete')
if not force and backup.status not in [fields.BackupStatus.AVAILABLE, if not force and backup.status not in [fields.BackupStatus.AVAILABLE,
@ -410,7 +410,7 @@ class API(base.Base):
:param context: running context :param context: running context
:param backup_id: which backup's status to be reset :param backup_id: which backup's status to be reset
:parma status: backup's status to be reset :parma status: backup's status to be reset
:raises: InvalidBackup :raises InvalidBackup:
""" """
# get backup info # get backup info
backup = self.get(context, backup_id) backup = self.get(context, backup_id)
@ -430,7 +430,7 @@ class API(base.Base):
:param backup_id: backup id to export :param backup_id: backup id to export
:returns: dictionary -- a description of how to import the backup :returns: dictionary -- a description of how to import the backup
:returns: contains 'backup_url' and 'backup_service' :returns: contains 'backup_url' and 'backup_service'
:raises: InvalidBackup :raises InvalidBackup:
""" """
check_policy(context, 'backup-export') check_policy(context, 'backup-export')
backup = self.get(context, backup_id) backup = self.get(context, backup_id)
@ -470,8 +470,8 @@ class API(base.Base):
:param context: running context :param context: running context
:param backup_url: backup description to be used by the backup driver :param backup_url: backup description to be used by the backup driver
:return: BackupImport object :return: BackupImport object
:raises: InvalidBackup :raises InvalidBackup:
:raises: InvalidInput :raises InvalidInput:
""" """
# Deserialize string backup record into a dictionary # Deserialize string backup record into a dictionary
backup_record = objects.Backup.decode_record(backup_url) backup_record = objects.Backup.decode_record(backup_url)
@ -520,9 +520,9 @@ class API(base.Base):
:param context: running context :param context: running context
:param backup_service: backup service name :param backup_service: backup service name
:param backup_url: backup description to be used by the backup driver :param backup_url: backup description to be used by the backup driver
:raises: InvalidBackup :raises InvalidBackup:
:raises: ServiceNotFound :raises ServiceNotFound:
:raises: InvalidInput :raises InvalidInput:
""" """
check_policy(context, 'backup-import') check_policy(context, 'backup-import')

View File

@ -421,6 +421,6 @@ class BackupDriverWithVerify(BackupDriver):
operation. operation.
:param backup: backup id of the backup to verify :param backup: backup id of the backup to verify
:raises: InvalidBackup, NotImplementedError :raises InvalidBackup, NotImplementedError:
""" """
return return

View File

@ -642,7 +642,7 @@ class BackupManager(manager.ThreadPoolManager):
:returns: backup_record - a description of how to import the backup :returns: backup_record - a description of how to import the backup
:returns: contains 'backup_url' - how to import the backup, and :returns: contains 'backup_url' - how to import the backup, and
:returns: 'backup_service' describing the needed driver. :returns: 'backup_service' describing the needed driver.
:raises: InvalidBackup :raises InvalidBackup:
""" """
LOG.info('Export record started, backup: %s.', backup.id) LOG.info('Export record started, backup: %s.', backup.id)
@ -694,8 +694,8 @@ class BackupManager(manager.ThreadPoolManager):
:param backup_service: The needed backup driver for import :param backup_service: The needed backup driver for import
:param backup_url: An identifier string to locate the backup :param backup_url: An identifier string to locate the backup
:param backup_hosts: Potential hosts to execute the import :param backup_hosts: Potential hosts to execute the import
:raises: InvalidBackup :raises InvalidBackup:
:raises: ServiceNotFound :raises ServiceNotFound:
""" """
LOG.info('Import record started, backup_url: %s.', backup_url) LOG.info('Import record started, backup_url: %s.', backup_url)
@ -803,9 +803,9 @@ class BackupManager(manager.ThreadPoolManager):
:param context: running context :param context: running context
:param backup: The backup object for reset status operation :param backup: The backup object for reset status operation
:param status: The status to be set :param status: The status to be set
:raises: InvalidBackup :raises InvalidBackup:
:raises: BackupVerifyUnsupportedDriver :raises BackupVerifyUnsupportedDriver:
:raises: AttributeError :raises AttributeError:
""" """
LOG.info('Reset backup status started, backup_id: ' LOG.info('Reset backup status started, backup_id: '
'%(backup_id)s, status: %(status)s.', '%(backup_id)s, status: %(status)s.',

View File

@ -655,7 +655,7 @@ class LVM(executor.Executor):
:param name: Name of LV to activate :param name: Name of LV to activate
:param is_snapshot: whether LV is a snapshot :param is_snapshot: whether LV is a snapshot
:param permanent: whether we should drop skipactivation flag :param permanent: whether we should drop skipactivation flag
:raises: putils.ProcessExecutionError :raises putils.ProcessExecutionError:
""" """
# This is a no-op if requested for a snapshot on a version # This is a no-op if requested for a snapshot on a version

View File

@ -1032,7 +1032,7 @@ def quota_allocated_update(context, project_id,
resource, allocated): resource, allocated):
"""Update allocated quota to subprojects or raise if it does not exist. """Update allocated quota to subprojects or raise if it does not exist.
:raises: cinder.exception.ProjectQuotaNotFound :raises cinder.exception.ProjectQuotaNotFound:
""" """
return IMPL.quota_allocated_update(context, project_id, return IMPL.quota_allocated_update(context, project_id,
resource, allocated) resource, allocated)

View File

@ -72,7 +72,7 @@ def _parse_image_ref(image_href):
:param image_href: href of an image :param image_href: href of an image
:returns: a tuple of the form (image_id, netloc, use_ssl) :returns: a tuple of the form (image_id, netloc, use_ssl)
:raises ValueError :raises ValueError:
""" """
url = urllib.parse.urlparse(image_href) url = urllib.parse.urlparse(image_href)
@ -400,8 +400,8 @@ class GlanceImageService(object):
def delete(self, context, image_id): def delete(self, context, image_id):
"""Delete the given image. """Delete the given image.
:raises: ImageNotFound if the image does not exist. :raises ImageNotFound: if the image does not exist.
:raises: NotAuthorized if the user is not an owner. :raises NotAuthorized: if the user is not an owner.
""" """
try: try:

View File

@ -34,5 +34,5 @@ class BackupDriverWithVerify(backup_driver.BackupDriver):
operation. operation.
:param backup: Backup id of the backup to verify. :param backup: Backup id of the backup to verify.
:raises: InvalidBackup, NotImplementedError :raises InvalidBackup, NotImplementedError:
""" """

View File

@ -50,7 +50,7 @@ class VolumeDriverCore(base.CinderInterface):
credentials can be used to log in the storage backend, and whether any credentials can be used to log in the storage backend, and whether any
external dependencies are present and working. external dependencies are present and working.
:raises: VolumeBackendAPIException in case of setup error. :raises VolumeBackendAPIException: in case of setup error.
""" """
def get_volume_stats(self, refresh=False): def get_volume_stats(self, refresh=False):
@ -152,7 +152,7 @@ class VolumeDriverCore(base.CinderInterface):
:param volume: Volume object containing specifics to create. :param volume: Volume object containing specifics to create.
:returns: (Optional) dict of database updates for the new volume. :returns: (Optional) dict of database updates for the new volume.
:raises: VolumeBackendAPIException if creation failed. :raises VolumeBackendAPIException: if creation failed.
""" """
def delete_volume(self, volume): def delete_volume(self, volume):
@ -163,7 +163,7 @@ class VolumeDriverCore(base.CinderInterface):
the process of deleting the volume. the process of deleting the volume.
:param volume: The volume to delete. :param volume: The volume to delete.
:raises: VolumeIsBusy if the volume is still attached or has snapshots. :raises VolumeIsBusy: if the volume is still attached or has snapshots.
VolumeBackendAPIException on error. VolumeBackendAPIException on error.
""" """

View File

@ -56,10 +56,10 @@ class VolumeManagementDriver(base.CinderInterface):
:param existing_ref: Dictionary with keys 'source-id', 'source-name' :param existing_ref: Dictionary with keys 'source-id', 'source-name'
with driver-specific values to identify a backend with driver-specific values to identify a backend
storage object. storage object.
:raises: ManageExistingInvalidReference If the existing_ref doesn't :raises ManageExistingInvalidReference: If the existing_ref doesn't
make sense, or doesn't refer to an existing backend storage make sense, or doesn't refer to an existing backend storage
object. object.
:raises: ManageExistingVolumeTypeMismatch If there is a mismatch :raises ManageExistingVolumeTypeMismatch: If there is a mismatch
between the volume type and the properties of the existing between the volume type and the properties of the existing
backend storage object. backend storage object.
""" """
@ -73,7 +73,7 @@ class VolumeManagementDriver(base.CinderInterface):
:param existing_ref: Dictionary with keys 'source-id', 'source-name' :param existing_ref: Dictionary with keys 'source-id', 'source-name'
with driver-specific values to identify a backend with driver-specific values to identify a backend
storage object. storage object.
:raises: ManageExistingInvalidReference If the existing_ref doesn't :raises ManageExistingInvalidReference: If the existing_ref doesn't
make sense, or doesn't refer to an existing backend storage make sense, or doesn't refer to an existing backend storage
object. object.
""" """

View File

@ -47,7 +47,7 @@ class VolumeSnapshotManagementDriver(base.CinderInterface):
:param existing_ref: Dictionary with keys 'source-id', 'source-name' :param existing_ref: Dictionary with keys 'source-id', 'source-name'
with driver-specific values to identify a backend with driver-specific values to identify a backend
storage object. storage object.
:raises: ManageExistingInvalidReference If the existing_ref doesn't :raises ManageExistingInvalidReference: If the existing_ref doesn't
make sense, or doesn't refer to an existing backend storage make sense, or doesn't refer to an existing backend storage
object. object.
""" """
@ -61,7 +61,7 @@ class VolumeSnapshotManagementDriver(base.CinderInterface):
:param existing_ref: Dictionary with keys 'source-id', 'source-name' :param existing_ref: Dictionary with keys 'source-id', 'source-name'
with driver-specific values to identify a backend with driver-specific values to identify a backend
storage object. storage object.
:raises: ManageExistingInvalidReference If the existing_ref doesn't :raises ManageExistingInvalidReference: If the existing_ref doesn't
make sense, or doesn't refer to an existing backend storage make sense, or doesn't refer to an existing backend storage
object. object.
""" """

View File

@ -130,7 +130,7 @@ class Backup(base.CinderPersistentObject, base.CinderObject,
def decode_record(backup_url): def decode_record(backup_url):
"""Deserialize backup metadata from string into a dictionary. """Deserialize backup metadata from string into a dictionary.
:raises: InvalidInput :raises InvalidInput:
""" """
try: try:
return jsonutils.loads(base64.decode_as_text(backup_url)) return jsonutils.loads(base64.decode_as_text(backup_url))

View File

@ -173,7 +173,7 @@ class _FakeImageService(object):
def create(self, context, metadata, data=None): def create(self, context, metadata, data=None):
"""Store the image data and return the new image id. """Store the image data and return the new image id.
:raises: Duplicate if the image already exist. :raises Duplicate: if the image already exist.
""" """
image_id = str(metadata.get('id', uuid.uuid4())) image_id = str(metadata.get('id', uuid.uuid4()))
@ -189,7 +189,7 @@ class _FakeImageService(object):
purge_props=False): purge_props=False):
"""Replace the contents of the given image with the new data. """Replace the contents of the given image with the new data.
:raises: ImageNotFound if the image does not exist. :raises ImageNotFound: if the image does not exist.
""" """
if not self.images.get(image_id): if not self.images.get(image_id):
@ -208,7 +208,7 @@ class _FakeImageService(object):
def delete(self, context, image_id): def delete(self, context, image_id):
"""Delete the given image. """Delete the given image.
:raises: ImageNotFound if the image does not exist. :raises ImageNotFound: if the image does not exist.
""" """
removed = self.images.pop(image_id, None) removed = self.images.pop(image_id, None)

View File

@ -98,7 +98,7 @@ def service_json_request(ip_addr, port, http_method, uri, body,
:param uri: the request URI :param uri: the request URI
:param body: the request payload :param body: the request payload
:returns: a tuple of two elements: (response body, response headers) :returns: a tuple of two elements: (response body, response headers)
:raises: CoprHdError in case of HTTP errors with err_code 3 :raises CoprHdError: in case of HTTP errors with err_code 3
""" """
SEC_AUTHTOKEN_HEADER = 'X-SDS-AUTH-TOKEN' SEC_AUTHTOKEN_HEADER = 'X-SDS-AUTH-TOKEN'

View File

@ -30,7 +30,7 @@ class Project(common.CoprHDResource):
:param name: name of project :param name: name of project
:returns: UUID of project :returns: UUID of project
:raises: CoprHdError - when project name is not found :raises CoprHdError: - when project name is not found
""" """
if common.is_uri(name): if common.is_uri(name):
return name return name

View File

@ -360,7 +360,7 @@ class StorageCenterApiHelper(object):
"""Creates the StorageCenterApi object. """Creates the StorageCenterApi object.
:return: StorageCenterApi object. :return: StorageCenterApi object.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
connection = None connection = None
LOG.info('open_connection to %(ssn)s at %(ip)s', LOG.info('open_connection to %(ssn)s at %(ip)s',
@ -622,7 +622,7 @@ class StorageCenterApi(object):
def open_connection(self): def open_connection(self):
"""Authenticate with Dell REST interface. """Authenticate with Dell REST interface.
:raises: VolumeBackendAPIException. :raises VolumeBackendAPIException.:
""" """
# Set our fo state. # Set our fo state.
self.failed_over = (self.primaryssn != self.ssn) self.failed_over = (self.primaryssn != self.ssn)
@ -697,7 +697,7 @@ class StorageCenterApi(object):
"""Check that the SC is there and being managed by EM. """Check that the SC is there and being managed by EM.
:returns: The SC SSN. :returns: The SC SSN.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
# We might be looking for another ssn. If not then # We might be looking for another ssn. If not then
# look for our default. # look for our default.
@ -1739,7 +1739,7 @@ class StorageCenterApi(object):
:param scvolume: The dell sc volume object. :param scvolume: The dell sc volume object.
:returns: iSCSI property dictionary. :returns: iSCSI property dictionary.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
LOG.debug('find_iscsi_properties: scvolume: %s', scvolume) LOG.debug('find_iscsi_properties: scvolume: %s', scvolume)
# Our mutable process object. # Our mutable process object.
@ -2224,7 +2224,7 @@ class StorageCenterApi(object):
:param group_qos: Group QOS Profile to use. :param group_qos: Group QOS Profile to use.
:param dr_profile: Data reduction profile to use. :param dr_profile: Data reduction profile to use.
:returns: The new volume's Dell volume object. :returns: The new volume's Dell volume object.
:raises: VolumeBackendAPIException if error doing copy. :raises VolumeBackendAPIException: if error doing copy.
""" """
LOG.info('create_cloned_volume: Creating %(dst)s from %(src)s', LOG.info('create_cloned_volume: Creating %(dst)s from %(src)s',
{'dst': volumename, {'dst': volumename,
@ -2451,7 +2451,7 @@ class StorageCenterApi(object):
:param name: Name of the replay profile object. This is the :param name: Name of the replay profile object. This is the
consistency group id. consistency group id.
:return: Dell SC replay profile or None. :return: Dell SC replay profile or None.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
self.cg_except_on_no_support() self.cg_except_on_no_support()
pf = self._get_payload_filter() pf = self._get_payload_filter()
@ -2497,7 +2497,7 @@ class StorageCenterApi(object):
:param profile: SC replay profile. :param profile: SC replay profile.
:return: Nothing. :return: Nothing.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
self.cg_except_on_no_support() self.cg_except_on_no_support()
r = self.client.delete('StorageCenter/ScReplayProfile/%s' % r = self.client.delete('StorageCenter/ScReplayProfile/%s' %
@ -2804,7 +2804,7 @@ class StorageCenterApi(object):
:param newname: Name to rename the volume to. :param newname: Name to rename the volume to.
:param existing: The existing volume dict.. :param existing: The existing volume dict..
:return: scvolume. :return: scvolume.
:raises: VolumeBackendAPIException, ManageExistingInvalidReference :raises VolumeBackendAPIException, ManageExistingInvalidReference:
""" """
vollist = self._get_volume_list(existing.get('source-name'), vollist = self._get_volume_list(existing.get('source-name'),
existing.get('source-id'), existing.get('source-id'),
@ -2843,7 +2843,7 @@ class StorageCenterApi(object):
:param existing: Existing volume dict. :param existing: Existing volume dict.
:return: The SC configuredSize string. :return: The SC configuredSize string.
:raises: ManageExistingInvalidReference :raises ManageExistingInvalidReference:
""" """
vollist = self._get_volume_list(existing.get('source-name'), vollist = self._get_volume_list(existing.get('source-name'),
existing.get('source-id'), existing.get('source-id'),
@ -2870,7 +2870,7 @@ class StorageCenterApi(object):
:param scvolume: The Dell SC volume object. :param scvolume: The Dell SC volume object.
:return: Nothing. :return: Nothing.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
newname = 'Unmanaged_' + scvolume['name'] newname = 'Unmanaged_' + scvolume['name']
payload = {} payload = {}

View File

@ -789,7 +789,7 @@ class DellCommonDriver(driver.ManageableVD,
:param context: the context of the caller. :param context: the context of the caller.
:param group: the dictionary of the consistency group to be created. :param group: the dictionary of the consistency group to be created.
:returns: Nothing on success. :returns: Nothing on success.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
gid = group['id'] gid = group['id']
with self._client.open_connection() as api: with self._client.open_connection() as api:
@ -874,7 +874,7 @@ class DellCommonDriver(driver.ManageableVD,
:param cgsnapshot: Information about the snapshot to take. :param cgsnapshot: Information about the snapshot to take.
:param snapshots: List of snapshots for this cgsnapshot. :param snapshots: List of snapshots for this cgsnapshot.
:returns: Updated model_update, snapshots. :returns: Updated model_update, snapshots.
:raises: VolumeBackendAPIException. :raises VolumeBackendAPIException:
""" """
cgid = cgsnapshot['consistencygroup_id'] cgid = cgsnapshot['consistencygroup_id']
snapshotid = cgsnapshot['id'] snapshotid = cgsnapshot['id']
@ -912,7 +912,7 @@ class DellCommonDriver(driver.ManageableVD,
:param context: the context of the caller. :param context: the context of the caller.
:param cgsnapshot: Information about the snapshot to delete. :param cgsnapshot: Information about the snapshot to delete.
:returns: Updated model_update, snapshots. :returns: Updated model_update, snapshots.
:raises: VolumeBackendAPIException. :raises VolumeBackendAPIException.:
""" """
cgid = cgsnapshot['consistencygroup_id'] cgid = cgsnapshot['consistencygroup_id']
snapshotid = cgsnapshot['id'] snapshotid = cgsnapshot['id']
@ -1030,7 +1030,7 @@ class DellCommonDriver(driver.ManageableVD,
:param specname: The pretty name of the parameter. :param specname: The pretty name of the parameter.
:param spectype: The actual spec string. :param spectype: The actual spec string.
:return: current, requested spec. :return: current, requested spec.
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
spec = (diff['extra_specs'].get(spectype)) spec = (diff['extra_specs'].get(spectype))
if spec: if spec:

View File

@ -232,7 +232,7 @@ class VMAXCommon(object):
:param arrayInfoList: :param arrayInfoList:
:return: finalArrayInfoList :return: finalArrayInfoList
:raises: Exception :raises Exception:
""" """
try: try:
sloWorkloadSet = set() sloWorkloadSet = set()
@ -377,7 +377,7 @@ class VMAXCommon(object):
:param volume: volume Object :param volume: volume Object
:param snapshot: snapshot object :param snapshot: snapshot object
:returns: model_update, dict :returns: model_update, dict
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
LOG.debug("Entering create_volume_from_snapshot.") LOG.debug("Entering create_volume_from_snapshot.")
extraSpecs = self._initial_setup(snapshot, host=volume['host']) extraSpecs = self._initial_setup(snapshot, host=volume['host'])
@ -508,7 +508,7 @@ class VMAXCommon(object):
:param volume: the volume Object :param volume: the volume Object
:param connector: the connector Object :param connector: the connector Object
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
extraSpecs = self._initial_setup(volume) extraSpecs = self._initial_setup(volume)
if self.utils.is_volume_failed_over(volume): if self.utils.is_volume_failed_over(volume):
@ -576,7 +576,7 @@ class VMAXCommon(object):
:param volume: volume Object :param volume: volume Object
:param connector: the connector Object :param connector: the connector Object
:returns: dict -- deviceInfoDict - device information dict :returns: dict -- deviceInfoDict - device information dict
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
portGroupName = None portGroupName = None
extraSpecs = self._initial_setup(volume) extraSpecs = self._initial_setup(volume)
@ -642,7 +642,7 @@ class VMAXCommon(object):
:param isLiveMigration: boolean, can be None :param isLiveMigration: boolean, can be None
:returns: dict -- deviceInfoDict :returns: dict -- deviceInfoDict
String -- port group name String -- port group name
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
volumeName = volume['name'] volumeName = volume['name']
maskingViewDict = self._populate_masking_dict( maskingViewDict = self._populate_masking_dict(
@ -769,7 +769,7 @@ class VMAXCommon(object):
:params volume: the volume Object :params volume: the volume Object
:params newSize: the new size to increase the volume to :params newSize: the new size to increase the volume to
:returns: dict -- modifiedVolumeDict - the extended volume Object :returns: dict -- modifiedVolumeDict - the extended volume Object
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
originalVolumeSize = volume['size'] originalVolumeSize = volume['size']
volumeName = volume['name'] volumeName = volume['name']
@ -798,7 +798,7 @@ class VMAXCommon(object):
:param originalVolumeSize: :param originalVolumeSize:
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:return: dict -- modifiedVolumeDict - the extended volume Object :return: dict -- modifiedVolumeDict - the extended volume Object
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
if int(originalVolumeSize) > int(newSize): if int(originalVolumeSize) > int(newSize):
exceptionMessage = (_( exceptionMessage = (_(
@ -1403,7 +1403,7 @@ class VMAXCommon(object):
:param sourceFastPolicyName: the source FAST policy name :param sourceFastPolicyName: the source FAST policy name
:param volumeName: the volume Name :param volumeName: the volume Name
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
controllerConfigurationService = ( controllerConfigurationService = (
self.utils.find_controller_configuration_service( self.utils.find_controller_configuration_service(
@ -1675,7 +1675,7 @@ class VMAXCommon(object):
"""Get the ecom connection. """Get the ecom connection.
:returns: pywbem.WBEMConnection -- conn, the ecom connection :returns: pywbem.WBEMConnection -- conn, the ecom connection
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
ecomx509 = None ecomx509 = None
if self.ecomUseSSL: if self.ecomUseSSL:
@ -1717,7 +1717,7 @@ class VMAXCommon(object):
:param isv3: True/False :param isv3: True/False
:returns: foundPoolInstanceName - the CIM Instance Name of the Pool :returns: foundPoolInstanceName - the CIM Instance Name of the Pool
:returns: string -- systemNameStr :returns: string -- systemNameStr
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
foundPoolInstanceName = None foundPoolInstanceName = None
systemNameStr = None systemNameStr = None
@ -1957,7 +1957,7 @@ class VMAXCommon(object):
:param storageSystem: the storage system name :param storageSystem: the storage system name
:param connector: the connector dict :param connector: the connector dict
:returns: list -- targetWwns, the target WWN list :returns: list -- targetWwns, the target WWN list
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
targetWwns = set() targetWwns = set()
@ -2089,7 +2089,7 @@ class VMAXCommon(object):
"""Given the array record set the ecom credentials. """Given the array record set the ecom credentials.
:param arrayInfo: record :param arrayInfo: record
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
ip = arrayInfo['EcomServerIp'] ip = arrayInfo['EcomServerIp']
port = arrayInfo['EcomServerPort'] port = arrayInfo['EcomServerPort']
@ -2121,7 +2121,7 @@ class VMAXCommon(object):
:param volume: the volume Object :param volume: the volume Object
:param volumeTypeId: Optional override of volume['volume_type_id'] :param volumeTypeId: Optional override of volume['volume_type_id']
:returns: dict -- extra spec dict :returns: dict -- extra spec dict
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
try: try:
extraSpecs, configurationFile, qosSpecs = ( extraSpecs, configurationFile, qosSpecs = (
@ -2175,7 +2175,7 @@ class VMAXCommon(object):
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: poolInstanceName The pool instance name :returns: poolInstanceName The pool instance name
:returns: string -- the storage system name :returns: string -- the storage system name
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
try: try:
@ -2299,7 +2299,7 @@ class VMAXCommon(object):
:param fastPolicyName: the fast policy name (String) :param fastPolicyName: the fast policy name (String)
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: dict -- maskingViewDict with masking view information :returns: dict -- maskingViewDict with masking view information
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
try: try:
volumeInstance = self.utils.find_volume_instance( volumeInstance = self.utils.find_volume_instance(
@ -2491,7 +2491,7 @@ class VMAXCommon(object):
:param extraSpecs: extra specs :param extraSpecs: extra specs
:param isSnapshot: boolean -- Defaults to False :param isSnapshot: boolean -- Defaults to False
:returns: dict -- cloneDict the cloned volume dictionary :returns: dict -- cloneDict the cloned volume dictionary
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
sourceName = sourceVolume['name'] sourceName = sourceVolume['name']
cloneName = cloneVolume['name'] cloneName = cloneVolume['name']
@ -2585,7 +2585,7 @@ class VMAXCommon(object):
:param cloneDict: clone dictionary :param cloneDict: clone dictionary
:param cloneName: clone name :param cloneName: clone name
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
# Check if the clone/snapshot volume already part of the default sg. # Check if the clone/snapshot volume already part of the default sg.
cloneInstance = self.utils.find_volume_instance( cloneInstance = self.utils.find_volume_instance(
@ -2774,7 +2774,7 @@ class VMAXCommon(object):
:param volume: volume object to be deleted :param volume: volume object to be deleted
:param connector: volume object to be deleted :param connector: volume object to be deleted
:returns: int -- numVolumesMapped :returns: int -- numVolumesMapped
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
volumename = volume['name'] volumename = volume['name']
@ -2820,7 +2820,7 @@ class VMAXCommon(object):
"""Helper function to delete the specified snapshot. """Helper function to delete the specified snapshot.
:param snapshot: snapshot object to be deleted :param snapshot: snapshot object to be deleted
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
LOG.debug("Entering _delete_snapshot.") LOG.debug("Entering _delete_snapshot.")
@ -2839,7 +2839,7 @@ class VMAXCommon(object):
:param context: the context :param context: the context
:param group: the group object to be created :param group: the group object to be created
:returns: dict -- modelUpdate = {'status': 'available'} :returns: dict -- modelUpdate = {'status': 'available'}
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
LOG.info("Create Consistency Group: %(group)s.", LOG.info("Create Consistency Group: %(group)s.",
{'group': group['id']}) {'group': group['id']})
@ -2873,7 +2873,7 @@ class VMAXCommon(object):
:param volumes: the list of volumes in the consisgroup to be deleted :param volumes: the list of volumes in the consisgroup to be deleted
:returns: dict -- modelUpdate :returns: dict -- modelUpdate
:returns: list -- list of volume objects :returns: list -- list of volume objects
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
LOG.info("Delete Consistency Group: %(group)s.", LOG.info("Delete Consistency Group: %(group)s.",
{'group': group['id']}) {'group': group['id']})
@ -2973,7 +2973,7 @@ class VMAXCommon(object):
:param snapshots: snapshots :param snapshots: snapshots
:returns: dict -- modelUpdate :returns: dict -- modelUpdate
:returns: list -- list of snapshots :returns: list -- list of snapshots
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
consistencyGroup = cgsnapshot.get('consistencygroup') consistencyGroup = cgsnapshot.get('consistencygroup')
@ -3129,7 +3129,7 @@ class VMAXCommon(object):
:param snapshots: snapshots :param snapshots: snapshots
:returns: dict -- modelUpdate :returns: dict -- modelUpdate
:returns: list -- list of snapshots :returns: list -- list of snapshots
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
consistencyGroup = cgsnapshot.get('consistencygroup') consistencyGroup = cgsnapshot.get('consistencygroup')
model_update = {} model_update = {}
@ -3211,7 +3211,7 @@ class VMAXCommon(object):
:returns: int -- return code :returns: int -- return code
:returns: dict -- volumeDict :returns: dict -- volumeDict
:returns: string -- storageSystemName :returns: string -- storageSystemName
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
if not memberCount: if not memberCount:
memberCount, errorDesc = self.utils.determine_member_count( memberCount, errorDesc = self.utils.determine_member_count(
@ -3315,7 +3315,7 @@ class VMAXCommon(object):
:returns: int -- return code :returns: int -- return code
:returns: dict -- volumeDict :returns: dict -- volumeDict
:returns: string -- storageSystemName :returns: string -- storageSystemName
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
rc = -1 rc = -1
volumeDict = {} volumeDict = {}
@ -3457,7 +3457,7 @@ class VMAXCommon(object):
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: int -- return code :returns: int -- return code
:returns: dict -- modifiedVolumeDict :returns: dict -- modifiedVolumeDict
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
# Is the volume extendable. # Is the volume extendable.
isConcatenated = self.utils.check_if_volume_is_extendable( isConcatenated = self.utils.check_if_volume_is_extendable(
@ -3754,7 +3754,7 @@ class VMAXCommon(object):
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:param poolRecord: pool record :param poolRecord: pool record
:returns: dict -- the extraSpecs :returns: dict -- the extraSpecs
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
try: try:
stripedMetaCount = extraSpecs[STRIPECOUNT] stripedMetaCount = extraSpecs[STRIPECOUNT]
@ -3890,7 +3890,7 @@ class VMAXCommon(object):
:param fastPolicyName: the FAST policy name(if it exists) :param fastPolicyName: the FAST policy name(if it exists)
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: int -- return code :returns: int -- return code
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
storageSystemName = volumeInstance['SystemName'] storageSystemName = volumeInstance['SystemName']
controllerConfigurationService = ( controllerConfigurationService = (
@ -3971,7 +3971,7 @@ class VMAXCommon(object):
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:param volume: the cinder volume object :param volume: the cinder volume object
:returns: int -- return code :returns: int -- return code
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
storageSystemName = volumeInstance['SystemName'] storageSystemName = volumeInstance['SystemName']
controllerConfigurationService = ( controllerConfigurationService = (
@ -4027,7 +4027,7 @@ class VMAXCommon(object):
:param isSnapshot: check to see if it is a snapshot :param isSnapshot: check to see if it is a snapshot
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: int -- return code :returns: int -- return code
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
# Check if the source volume contains any meta devices. # Check if the source volume contains any meta devices.
metaHeadInstanceName = self.utils.get_volume_meta_head( metaHeadInstanceName = self.utils.get_volume_meta_head(
@ -4413,7 +4413,7 @@ class VMAXCommon(object):
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: dict -- modelUpdate :returns: dict -- modelUpdate
:returns: list -- the updated list of member volumes :returns: list -- the updated list of member volumes
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
replicationService = self.utils.find_replication_service( replicationService = self.utils.find_replication_service(
self.conn, storageSystem) self.conn, storageSystem)
@ -4495,7 +4495,7 @@ class VMAXCommon(object):
:param volume: the volume Object :param volume: the volume Object
:param extraSpecs: extraSpecs provided in the volume type :param extraSpecs: extraSpecs provided in the volume type
:returns: string -- pool :returns: string -- pool
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
pool = None pool = None
# Volume is None in CG ops. # Volume is None in CG ops.
@ -4569,7 +4569,7 @@ class VMAXCommon(object):
:param volume: the volume object including the volume_type_id :param volume: the volume object including the volume_type_id
:param external_ref: reference to the existing volume :param external_ref: reference to the existing volume
:returns: dict -- model_update :returns: dict -- model_update
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
extraSpecs = self._initial_setup(volume) extraSpecs = self._initial_setup(volume)
self.conn = self._get_ecom_connection() self.conn = self._get_ecom_connection()
@ -4711,7 +4711,7 @@ class VMAXCommon(object):
Leave the volume intact on the backend array. Leave the volume intact on the backend array.
:param volume: the volume object :param volume: the volume object
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
volumeName = volume['name'] volumeName = volume['name']
volumeId = volume['id'] volumeId = volume['id']

View File

@ -305,7 +305,7 @@ class VMAXFast(object):
:param fastPolicyName: the fast policy name (String) :param fastPolicyName: the fast policy name (String)
:param extraSpecs: additional info :param extraSpecs: additional info
:returns: int -- return code :returns: int -- return code
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
# 5 is ("Add InElements to Policy"). # 5 is ("Add InElements to Policy").
modificationType = '5' modificationType = '5'

View File

@ -75,7 +75,7 @@ class VMAXMasking(object):
:param maskingViewDict: the masking view dict :param maskingViewDict: the masking view dict
:param extraSpecs: additional info :param extraSpecs: additional info
:returns: dict -- rollbackDict :returns: dict -- rollbackDict
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
rollbackDict = {} rollbackDict = {}
@ -639,7 +639,7 @@ class VMAXMasking(object):
:param volumeName: volume name :param volumeName: volume name
:param maskingViewDict: the masking view dictionary :param maskingViewDict: the masking view dictionary
:param storageGroupInstanceName: storage group instance name :param storageGroupInstanceName: storage group instance name
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
assocVolumeInstanceNames = self.get_devices_from_storage_group( assocVolumeInstanceNames = self.get_devices_from_storage_group(
@ -919,7 +919,7 @@ class VMAXMasking(object):
:param conn: the connection to the ecom :param conn: the connection to the ecom
:param connector: the connector object :param connector: the connector object
:returns: list -- list of found initiator names :returns: list -- list of found initiator names
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
foundinitiatornames = [] foundinitiatornames = []
name = 'initiator name' name = 'initiator name'
@ -1074,7 +1074,7 @@ class VMAXMasking(object):
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: int -- return code :returns: int -- return code
:returns: dict -- job :returns: dict -- job
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
rc, job = conn.InvokeMethod( rc, job = conn.InvokeMethod(
'CreateMaskingView', configService, ElementName=maskingViewName, 'CreateMaskingView', configService, ElementName=maskingViewName,
@ -1181,7 +1181,7 @@ class VMAXMasking(object):
:param defaultStorageGroupInstanceName: default storage group instance :param defaultStorageGroupInstanceName: default storage group instance
name (can be None for Non FAST) name (can be None for Non FAST)
:returns: instance name storageGroupInstanceName :returns: instance name storageGroupInstanceName
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
storageGroupInstanceName = self.utils.find_storage_masking_group( storageGroupInstanceName = self.utils.find_storage_masking_group(
conn, maskingViewDict['controllerConfigService'], conn, maskingViewDict['controllerConfigService'],
@ -1292,7 +1292,7 @@ class VMAXMasking(object):
:param conn: the connection to the ecom server :param conn: the connection to the ecom server
:param rollbackDict: the rollback dictionary :param rollbackDict: the rollback dictionary
:returns: message :returns: message
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
message = None message = None
# Check if ig has been created. If so, check for other # Check if ig has been created. If so, check for other
@ -1548,7 +1548,7 @@ class VMAXMasking(object):
:param hardwareIdinstanceNames: one or more hardware id instance names :param hardwareIdinstanceNames: one or more hardware id instance names
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:returns: foundInitiatorGroupInstanceName :returns: foundInitiatorGroupInstanceName
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
rc, job = conn.InvokeMethod( rc, job = conn.InvokeMethod(
'CreateGroup', controllerConfigService, GroupName=igGroupName, 'CreateGroup', controllerConfigService, GroupName=igGroupName,
@ -1642,7 +1642,7 @@ class VMAXMasking(object):
:param maskingViewName: maskingview name (String) :param maskingViewName: maskingview name (String)
:param maskingViewInstanceName: the masking view instance name :param maskingViewInstanceName: the masking view instance name
:param extraSpecs: extra specifications :param extraSpecs: extra specifications
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
rc, job = conn.InvokeMethod('DeleteMaskingView', rc, job = conn.InvokeMethod('DeleteMaskingView',
controllerConfigService, controllerConfigService,
@ -2274,7 +2274,7 @@ class VMAXMasking(object):
:param volumeInstance: volumeInstance :param volumeInstance: volumeInstance
:param volumeName: the volume name :param volumeName: the volume name
:param extraSpecs: additional info :param extraSpecs: additional info
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
rep_enabled = self.utils.is_replication_enabled(extraSpecs) rep_enabled = self.utils.is_replication_enabled(extraSpecs)
isCompressionDisabled = self.utils.is_compression_disabled(extraSpecs) isCompressionDisabled = self.utils.is_compression_disabled(extraSpecs)

View File

@ -128,7 +128,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:returns: Tuple containing the service parameters (label, :returns: Tuple containing the service parameters (label,
export path and export file system) or error if no configuration is export path and export file system) or error if no configuration is
found. found.
:raises: ParameterNotFound :raises ParameterNotFound:
""" """
LOG.debug("_get_service: volume: %(vol)s", {'vol': volume}) LOG.debug("_get_service: volume: %(vol)s", {'vol': volume})
label = utils.extract_host(volume.host, level='pool') label = utils.extract_host(volume.host, level='pool')
@ -159,7 +159,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:param volume: dictionary volume reference :param volume: dictionary volume reference
:param new_size: int size in GB to extend :param new_size: int size in GB to extend
:raises: InvalidResults :raises InvalidResults:
""" """
nfs_mount = volume.provider_location nfs_mount = volume.provider_location
path = self._get_file_path(nfs_mount, volume.name) path = self._get_file_path(nfs_mount, volume.name)
@ -469,7 +469,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:param vol_ref: driver-specific information used to identify a volume :param vol_ref: driver-specific information used to identify a volume
:returns: a volume reference where share is in IP format or raises :returns: a volume reference where share is in IP format or raises
error error
:raises: e.strerror :raises e.strerror:
""" """
# First strip out share and convert to IP format. # First strip out share and convert to IP format.
@ -497,7 +497,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:param vol_ref: driver-specific information used to identify a volume :param vol_ref: driver-specific information used to identify a volume
:returns: NFS Share, NFS mount, volume path or raise error :returns: NFS Share, NFS mount, volume path or raise error
:raises: ManageExistingInvalidReference :raises ManageExistingInvalidReference:
""" """
# Check that the reference is valid. # Check that the reference is valid.
if 'source-name' not in vol_ref: if 'source-name' not in vol_ref:
@ -556,7 +556,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:param existing_vol_ref: driver-specific information used to identify a :param existing_vol_ref: driver-specific information used to identify a
volume volume
:returns: the provider location :returns: the provider location
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
# Attempt to find NFS share, NFS mount, and volume path from vol_ref. # Attempt to find NFS share, NFS mount, and volume path from vol_ref.
@ -605,7 +605,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:param volume: cinder volume reference :param volume: cinder volume reference
:param nfs_share: NFS share passed to manage :param nfs_share: NFS share passed to manage
:raises: ManageExistingVolumeTypeMismatch :raises ManageExistingVolumeTypeMismatch:
""" """
pool_from_vol_type = hnas_utils.get_pool(self.config, volume) pool_from_vol_type = hnas_utils.get_pool(self.config, volume)
@ -650,7 +650,7 @@ class HNASNFSDriver(nfs.NfsDriver):
:param volume: cinder volume to manage :param volume: cinder volume to manage
:param existing_vol_ref: existing volume to take under management :param existing_vol_ref: existing volume to take under management
:returns: the size of the volume or raise error :returns: the size of the volume or raise error
:raises: VolumeBackendAPIException :raises VolumeBackendAPIException:
""" """
return self._manage_existing_get_size(existing_vol_ref) return self._manage_existing_get_size(existing_vol_ref)

View File

@ -1655,7 +1655,7 @@ class HPE3PARCommon(object):
otherwise return the persona ID. otherwise return the persona ID.
:param persona_value: :param persona_value:
:raises: exception.InvalidInput :raises exception.InvalidInput:
:returns: persona ID :returns: persona ID
""" """
if persona_value not in self.valid_persona_values: if persona_value not in self.valid_persona_values:

View File

@ -543,7 +543,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver):
:param target_group: target group :param target_group: target group
:param target_member: target member :param target_member: target member
:return: True if target member in target group, else False :return: True if target member in target group, else False
:raises: NexentaException if target group doesn't exist :raises NexentaException: if target group doesn't exist
""" """
members = self.nms.stmf.list_targetgroup_members(target_group) members = self.nms.stmf.list_targetgroup_members(target_group)
if not members: if not members:
@ -554,7 +554,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver):
"""Check if LU exists on appliance. """Check if LU exists on appliance.
:param zvol_name: Zvol name :param zvol_name: Zvol name
:raises: NexentaException if zvol not exists :raises NexentaException: if zvol not exists
:return: True if LU exists, else False :return: True if LU exists, else False
""" """
try: try:
@ -568,7 +568,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver):
"""Check if LU exists on appliance and shared. """Check if LU exists on appliance and shared.
:param zvol_name: Zvol name :param zvol_name: Zvol name
:raises: NexentaException if Zvol not exist :raises NexentaException: if Zvol not exist
:return: True if LU exists and shared, else False :return: True if LU exists and shared, else False
""" """
try: try:

View File

@ -63,7 +63,7 @@ class DatastoreSelector(object):
:param profile_name: profile name :param profile_name: profile name
:return: vCenter profile ID :return: vCenter profile ID
:raises: ProfileNotFoundException :raises ProfileNotFoundException:
""" """
profile_id = pbm.get_profile_id_by_name(self._session, profile_name) profile_id = pbm.get_profile_id_by_name(self._session, profile_name)
if profile_id is None: if profile_id is None:
@ -282,7 +282,7 @@ class DatastoreSelector(object):
:param datastore: datastore to check the compliance :param datastore: datastore to check the compliance
:param profile_name: profile to check the compliance against :param profile_name: profile to check the compliance against
:return: True if the datastore is compliant; False otherwise :return: True if the datastore is compliant; False otherwise
:raises: ProfileNotFoundException :raises ProfileNotFoundException:
""" """
LOG.debug("Checking datastore: %(datastore)s compliance against " LOG.debug("Checking datastore: %(datastore)s compliance against "
"profile: %(profile)s.", "profile: %(profile)s.",

View File

@ -80,7 +80,7 @@ class BrcdFCSanLookupService(fc_service.FCSanLookupService):
} }
} }
:raises: Exception when connection to fabric is failed :raises Exception: when connection to fabric is failed
""" """
device_map = {} device_map = {}
formatted_target_list = [] formatted_target_list = []

View File

@ -82,7 +82,7 @@ class BrcdHTTPFCZoneClient(object):
:param header: Request Headers :param header: Request Headers
:returns: HTTP response data :returns: HTTP response data
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
if header is None: if header is None:
@ -144,7 +144,7 @@ class BrcdHTTPFCZoneClient(object):
return authentication header (Base64(username:password:random no)). return authentication header (Base64(username:password:random no)).
:returns: Authentication Header :returns: Authentication Header
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
# Send GET request to secinfo.html to get random number # Send GET request to secinfo.html to get random number
@ -177,7 +177,7 @@ class BrcdHTTPFCZoneClient(object):
header (Base64(username:xxx:random no)). header (Base64(username:xxx:random no)).
:returns: Authentication status :returns: Authentication status
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
headers = {zone_constant.AUTH_HEADER: self.auth_header} headers = {zone_constant.AUTH_HEADER: self.auth_header}
try: try:
@ -268,7 +268,7 @@ class BrcdHTTPFCZoneClient(object):
:param session_info: Session information from the switch :param session_info: Session information from the switch
:returns: manageable VF list :returns: manageable VF list
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
# Check the value of manageableLFList NVP, # Check the value of manageableLFList NVP,
@ -289,7 +289,7 @@ class BrcdHTTPFCZoneClient(object):
:param vfid: VFID to which context should be changed. :param vfid: VFID to which context should be changed.
:param session_data: Session information from the switch :param session_data: Session information from the switch
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
managable_vf_list = self.get_managable_vf_list(session_data) managable_vf_list = self.get_managable_vf_list(session_data)
@ -410,7 +410,7 @@ class BrcdHTTPFCZoneClient(object):
This only checks major and minor version. This only checks major and minor version.
:returns: True if firmware is supported else False. :returns: True if firmware is supported else False.
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
isfwsupported = False isfwsupported = False
@ -460,7 +460,7 @@ class BrcdHTTPFCZoneClient(object):
'active_zone_config': 'OpenStack_Cfg' 'active_zone_config': 'OpenStack_Cfg'
} }
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
active_zone_set = {} active_zone_set = {}
zones_map = {} zones_map = {}
@ -506,7 +506,7 @@ class BrcdHTTPFCZoneClient(object):
:param activate: True will activate the zone config. :param activate: True will activate the zone config.
:param active_zone_set: Active zone set dict retrieved from :param active_zone_set: Active zone set dict retrieved from
get_active_zone_set method get_active_zone_set method
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
LOG.debug("Add zones - zones passed: %(zones)s.", LOG.debug("Add zones - zones passed: %(zones)s.",
{'zones': add_zones_info}) {'zones': add_zones_info})
@ -568,7 +568,7 @@ class BrcdHTTPFCZoneClient(object):
:param operation: ZONE_ADD or ZONE_REMOVE :param operation: ZONE_ADD or ZONE_REMOVE
:param active_zone_set: Active zone set dict retrieved from :param active_zone_set: Active zone set dict retrieved from
get_active_zone_set method get_active_zone_set method
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
LOG.debug("Update zones - zones passed: %(zones)s.", LOG.debug("Update zones - zones passed: %(zones)s.",
{'zones': zone_info}) {'zones': zone_info})
@ -612,7 +612,7 @@ class BrcdHTTPFCZoneClient(object):
:param ifas: ifas map :param ifas: ifas map
:param activate: True will activate config. :param activate: True will activate config.
:returns: zonestring in the required format :returns: zonestring in the required format
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
zoneString = zone_constant.ZONE_STRING_PREFIX zoneString = zone_constant.ZONE_STRING_PREFIX
@ -788,7 +788,7 @@ class BrcdHTTPFCZoneClient(object):
:param delete_zones_info: Zones map to add :param delete_zones_info: Zones map to add
:param active_cfg: Existing active cfg :param active_cfg: Existing active cfg
:returns: updated zones, zone config sets, and active zone config :returns: updated zones, zone config sets, and active zone config
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
delete_zones_info = delete_zones_info.split(";") delete_zones_info = delete_zones_info.split(";")
@ -934,7 +934,7 @@ class BrcdHTTPFCZoneClient(object):
def _disconnect(self): def _disconnect(self):
"""Disconnect from the switch using HTTP/HTTPS protocol. """Disconnect from the switch using HTTP/HTTPS protocol.
:raises: BrocadeZoningHttpException :raises BrocadeZoningHttpException:
""" """
try: try:
headers = {zone_constant.AUTH_HEADER: self.auth_header} headers = {zone_constant.AUTH_HEADER: self.auth_header}

View File

@ -95,7 +95,7 @@ class CiscoFCSanLookupService(fc_service.FCSanLookupService):
} }
} }
:raises: Exception when connection to fabric is failed :raises Exception: when connection to fabric is failed
""" """
device_map = {} device_map = {}
formatted_target_list = [] formatted_target_list = []

View File

@ -159,7 +159,7 @@ class CiscoFCZoneClientCLI(object):
:param active_zone_set: Active zone set dict retrieved from :param active_zone_set: Active zone set dict retrieved from
get_active_zone_set method get_active_zone_set method
:param zone_status: Status of the zone :param zone_status: Status of the zone
:raises: CiscoZoningCliException :raises CiscoZoningCliException:
""" """
LOG.debug("Add Zones - Zones passed: %s", zones) LOG.debug("Add Zones - Zones passed: %s", zones)
@ -224,7 +224,7 @@ class CiscoFCZoneClientCLI(object):
:param active_zone_set: Active zone set dict retrieved from :param active_zone_set: Active zone set dict retrieved from
get_active_zone_set method get_active_zone_set method
:param zone_status: Status of the zone :param zone_status: Status of the zone
:raises: CiscoZoningCliException :raises CiscoZoningCliException:
""" """
LOG.debug("Update Zones - Operation: %(op)s - Zones " LOG.debug("Update Zones - Operation: %(op)s - Zones "

View File

@ -72,7 +72,7 @@ class FCSanLookupService(fc_common.FCCommon):
} }
} }
:raises: Exception when a lookup service implementation is not :raises Exception: when a lookup service implementation is not
specified in cinder.conf:fc_san_lookup_service specified in cinder.conf:fc_san_lookup_service
""" """
# Initialize vendor specific implementation of FCZoneDriver # Initialize vendor specific implementation of FCZoneDriver