diff --git a/cinder/api/openstack/wsgi.py b/cinder/api/openstack/wsgi.py index f0a5f78017c..1903cfe801e 100644 --- a/cinder/api/openstack/wsgi.py +++ b/cinder/api/openstack/wsgi.py @@ -1141,7 +1141,7 @@ class Controller(object): constraints and calls it with the supplied arguments. :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 """ diff --git a/cinder/api/v3/volumes.py b/cinder/api/v3/volumes.py index 16753e0aaea..d6d9d2cc5e4 100644 --- a/cinder/api/v3/volumes.py +++ b/cinder/api/v3/volumes.py @@ -154,7 +154,7 @@ class VolumeController(volumes_v2.VolumeController): :param req: the request :param body: the request body :returns: dict -- the new volume dictionary - :raises: HTTPNotFound, HTTPBadRequest + :raises HTTPNotFound, HTTPBadRequest: """ self.assert_valid_body(body, 'volume') diff --git a/cinder/backup/api.py b/cinder/backup/api.py index 6ad8a56020b..755870167a4 100644 --- a/cinder/backup/api.py +++ b/cinder/backup/api.py @@ -88,9 +88,9 @@ class API(base.Base): :param context: running context :param backup: the dict of backup that is got from DB. :param force: indicate force delete or not - :raises: InvalidBackup - :raises: BackupDriverException - :raises: ServiceNotFound + :raises InvalidBackup: + :raises BackupDriverException: + :raises ServiceNotFound: """ check_policy(context, 'delete') if not force and backup.status not in [fields.BackupStatus.AVAILABLE, @@ -410,7 +410,7 @@ class API(base.Base): :param context: running context :param backup_id: which backup's status to be reset :parma status: backup's status to be reset - :raises: InvalidBackup + :raises InvalidBackup: """ # get backup info backup = self.get(context, backup_id) @@ -430,7 +430,7 @@ class API(base.Base): :param backup_id: backup id to export :returns: dictionary -- a description of how to import the backup :returns: contains 'backup_url' and 'backup_service' - :raises: InvalidBackup + :raises InvalidBackup: """ check_policy(context, 'backup-export') backup = self.get(context, backup_id) @@ -470,8 +470,8 @@ class API(base.Base): :param context: running context :param backup_url: backup description to be used by the backup driver :return: BackupImport object - :raises: InvalidBackup - :raises: InvalidInput + :raises InvalidBackup: + :raises InvalidInput: """ # Deserialize string backup record into a dictionary backup_record = objects.Backup.decode_record(backup_url) @@ -520,9 +520,9 @@ class API(base.Base): :param context: running context :param backup_service: backup service name :param backup_url: backup description to be used by the backup driver - :raises: InvalidBackup - :raises: ServiceNotFound - :raises: InvalidInput + :raises InvalidBackup: + :raises ServiceNotFound: + :raises InvalidInput: """ check_policy(context, 'backup-import') diff --git a/cinder/backup/driver.py b/cinder/backup/driver.py index 3d636fa79a2..372b2e63aed 100644 --- a/cinder/backup/driver.py +++ b/cinder/backup/driver.py @@ -421,6 +421,6 @@ class BackupDriverWithVerify(BackupDriver): operation. :param backup: backup id of the backup to verify - :raises: InvalidBackup, NotImplementedError + :raises InvalidBackup, NotImplementedError: """ return diff --git a/cinder/backup/manager.py b/cinder/backup/manager.py index d8ec76d02bf..03720adce49 100644 --- a/cinder/backup/manager.py +++ b/cinder/backup/manager.py @@ -642,7 +642,7 @@ class BackupManager(manager.ThreadPoolManager): :returns: backup_record - a description of how to import the backup :returns: contains 'backup_url' - how to import the backup, and :returns: 'backup_service' describing the needed driver. - :raises: InvalidBackup + :raises InvalidBackup: """ 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_url: An identifier string to locate the backup :param backup_hosts: Potential hosts to execute the import - :raises: InvalidBackup - :raises: ServiceNotFound + :raises InvalidBackup: + :raises ServiceNotFound: """ LOG.info('Import record started, backup_url: %s.', backup_url) @@ -803,9 +803,9 @@ class BackupManager(manager.ThreadPoolManager): :param context: running context :param backup: The backup object for reset status operation :param status: The status to be set - :raises: InvalidBackup - :raises: BackupVerifyUnsupportedDriver - :raises: AttributeError + :raises InvalidBackup: + :raises BackupVerifyUnsupportedDriver: + :raises AttributeError: """ LOG.info('Reset backup status started, backup_id: ' '%(backup_id)s, status: %(status)s.', diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index e4e44bed340..11a8e85945a 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -655,7 +655,7 @@ class LVM(executor.Executor): :param name: Name of LV to activate :param is_snapshot: whether LV is a snapshot :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 diff --git a/cinder/db/api.py b/cinder/db/api.py index 5060ef8da9f..a83656f947b 100644 --- a/cinder/db/api.py +++ b/cinder/db/api.py @@ -1032,7 +1032,7 @@ def quota_allocated_update(context, project_id, resource, allocated): """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, resource, allocated) diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 5da4cf9f8f7..122ed159d3b 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -72,7 +72,7 @@ def _parse_image_ref(image_href): :param image_href: href of an image :returns: a tuple of the form (image_id, netloc, use_ssl) - :raises ValueError + :raises ValueError: """ url = urllib.parse.urlparse(image_href) @@ -400,8 +400,8 @@ class GlanceImageService(object): def delete(self, context, image_id): """Delete the given image. - :raises: ImageNotFound if the image does not exist. - :raises: NotAuthorized if the user is not an owner. + :raises ImageNotFound: if the image does not exist. + :raises NotAuthorized: if the user is not an owner. """ try: diff --git a/cinder/interface/backup_verify_driver.py b/cinder/interface/backup_verify_driver.py index 5f4d34b5bd0..15c8307c81b 100644 --- a/cinder/interface/backup_verify_driver.py +++ b/cinder/interface/backup_verify_driver.py @@ -34,5 +34,5 @@ class BackupDriverWithVerify(backup_driver.BackupDriver): operation. :param backup: Backup id of the backup to verify. - :raises: InvalidBackup, NotImplementedError + :raises InvalidBackup, NotImplementedError: """ diff --git a/cinder/interface/volume_driver.py b/cinder/interface/volume_driver.py index be57af8cb87..ed54ed27f56 100644 --- a/cinder/interface/volume_driver.py +++ b/cinder/interface/volume_driver.py @@ -50,7 +50,7 @@ class VolumeDriverCore(base.CinderInterface): credentials can be used to log in the storage backend, and whether any 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): @@ -152,7 +152,7 @@ class VolumeDriverCore(base.CinderInterface): :param volume: Volume object containing specifics to create. :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): @@ -163,7 +163,7 @@ class VolumeDriverCore(base.CinderInterface): the process of deleting the volume. :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. """ diff --git a/cinder/interface/volume_management_driver.py b/cinder/interface/volume_management_driver.py index fac6074456e..ec2abb68808 100644 --- a/cinder/interface/volume_management_driver.py +++ b/cinder/interface/volume_management_driver.py @@ -56,10 +56,10 @@ class VolumeManagementDriver(base.CinderInterface): :param existing_ref: Dictionary with keys 'source-id', 'source-name' with driver-specific values to identify a backend 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 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 backend storage object. """ @@ -73,7 +73,7 @@ class VolumeManagementDriver(base.CinderInterface): :param existing_ref: Dictionary with keys 'source-id', 'source-name' with driver-specific values to identify a backend 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 object. """ diff --git a/cinder/interface/volume_snapshotmanagement_driver.py b/cinder/interface/volume_snapshotmanagement_driver.py index 0eb3475d3eb..0b18d601da4 100644 --- a/cinder/interface/volume_snapshotmanagement_driver.py +++ b/cinder/interface/volume_snapshotmanagement_driver.py @@ -47,7 +47,7 @@ class VolumeSnapshotManagementDriver(base.CinderInterface): :param existing_ref: Dictionary with keys 'source-id', 'source-name' with driver-specific values to identify a backend 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 object. """ @@ -61,7 +61,7 @@ class VolumeSnapshotManagementDriver(base.CinderInterface): :param existing_ref: Dictionary with keys 'source-id', 'source-name' with driver-specific values to identify a backend 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 object. """ diff --git a/cinder/objects/backup.py b/cinder/objects/backup.py index f89a11f329b..0dfbad6e898 100644 --- a/cinder/objects/backup.py +++ b/cinder/objects/backup.py @@ -130,7 +130,7 @@ class Backup(base.CinderPersistentObject, base.CinderObject, def decode_record(backup_url): """Deserialize backup metadata from string into a dictionary. - :raises: InvalidInput + :raises InvalidInput: """ try: return jsonutils.loads(base64.decode_as_text(backup_url)) diff --git a/cinder/tests/unit/image/fake.py b/cinder/tests/unit/image/fake.py index f721726ac08..1f1e860c647 100644 --- a/cinder/tests/unit/image/fake.py +++ b/cinder/tests/unit/image/fake.py @@ -173,7 +173,7 @@ class _FakeImageService(object): def create(self, context, metadata, data=None): """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())) @@ -189,7 +189,7 @@ class _FakeImageService(object): purge_props=False): """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): @@ -208,7 +208,7 @@ class _FakeImageService(object): def delete(self, context, image_id): """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) diff --git a/cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py b/cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py index eafdb2e3c0d..8f61e12a1ae 100644 --- a/cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py +++ b/cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py @@ -98,7 +98,7 @@ def service_json_request(ip_addr, port, http_method, uri, body, :param uri: the request URI :param body: the request payload :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' diff --git a/cinder/volume/drivers/coprhd/helpers/project.py b/cinder/volume/drivers/coprhd/helpers/project.py index 45f662f059b..3cc7b00e1ca 100644 --- a/cinder/volume/drivers/coprhd/helpers/project.py +++ b/cinder/volume/drivers/coprhd/helpers/project.py @@ -30,7 +30,7 @@ class Project(common.CoprHDResource): :param name: name 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): return name diff --git a/cinder/volume/drivers/dell/dell_storagecenter_api.py b/cinder/volume/drivers/dell/dell_storagecenter_api.py index 45e8d823abe..2d0f7d4bd1a 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_api.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_api.py @@ -360,7 +360,7 @@ class StorageCenterApiHelper(object): """Creates the StorageCenterApi object. :return: StorageCenterApi object. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ connection = None LOG.info('open_connection to %(ssn)s at %(ip)s', @@ -622,7 +622,7 @@ class StorageCenterApi(object): def open_connection(self): """Authenticate with Dell REST interface. - :raises: VolumeBackendAPIException. + :raises VolumeBackendAPIException.: """ # Set our fo state. 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. :returns: The SC SSN. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ # We might be looking for another ssn. If not then # look for our default. @@ -1739,7 +1739,7 @@ class StorageCenterApi(object): :param scvolume: The dell sc volume object. :returns: iSCSI property dictionary. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ LOG.debug('find_iscsi_properties: scvolume: %s', scvolume) # Our mutable process object. @@ -2224,7 +2224,7 @@ class StorageCenterApi(object): :param group_qos: Group QOS Profile to use. :param dr_profile: Data reduction profile to use. :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', {'dst': volumename, @@ -2451,7 +2451,7 @@ class StorageCenterApi(object): :param name: Name of the replay profile object. This is the consistency group id. :return: Dell SC replay profile or None. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ self.cg_except_on_no_support() pf = self._get_payload_filter() @@ -2497,7 +2497,7 @@ class StorageCenterApi(object): :param profile: SC replay profile. :return: Nothing. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ self.cg_except_on_no_support() r = self.client.delete('StorageCenter/ScReplayProfile/%s' % @@ -2804,7 +2804,7 @@ class StorageCenterApi(object): :param newname: Name to rename the volume to. :param existing: The existing volume dict.. :return: scvolume. - :raises: VolumeBackendAPIException, ManageExistingInvalidReference + :raises VolumeBackendAPIException, ManageExistingInvalidReference: """ vollist = self._get_volume_list(existing.get('source-name'), existing.get('source-id'), @@ -2843,7 +2843,7 @@ class StorageCenterApi(object): :param existing: Existing volume dict. :return: The SC configuredSize string. - :raises: ManageExistingInvalidReference + :raises ManageExistingInvalidReference: """ vollist = self._get_volume_list(existing.get('source-name'), existing.get('source-id'), @@ -2870,7 +2870,7 @@ class StorageCenterApi(object): :param scvolume: The Dell SC volume object. :return: Nothing. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ newname = 'Unmanaged_' + scvolume['name'] payload = {} diff --git a/cinder/volume/drivers/dell/dell_storagecenter_common.py b/cinder/volume/drivers/dell/dell_storagecenter_common.py index ead80206bf3..10fa7c318f3 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_common.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_common.py @@ -789,7 +789,7 @@ class DellCommonDriver(driver.ManageableVD, :param context: the context of the caller. :param group: the dictionary of the consistency group to be created. :returns: Nothing on success. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ gid = group['id'] with self._client.open_connection() as api: @@ -874,7 +874,7 @@ class DellCommonDriver(driver.ManageableVD, :param cgsnapshot: Information about the snapshot to take. :param snapshots: List of snapshots for this cgsnapshot. :returns: Updated model_update, snapshots. - :raises: VolumeBackendAPIException. + :raises VolumeBackendAPIException: """ cgid = cgsnapshot['consistencygroup_id'] snapshotid = cgsnapshot['id'] @@ -912,7 +912,7 @@ class DellCommonDriver(driver.ManageableVD, :param context: the context of the caller. :param cgsnapshot: Information about the snapshot to delete. :returns: Updated model_update, snapshots. - :raises: VolumeBackendAPIException. + :raises VolumeBackendAPIException.: """ cgid = cgsnapshot['consistencygroup_id'] snapshotid = cgsnapshot['id'] @@ -1030,7 +1030,7 @@ class DellCommonDriver(driver.ManageableVD, :param specname: The pretty name of the parameter. :param spectype: The actual spec string. :return: current, requested spec. - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ spec = (diff['extra_specs'].get(spectype)) if spec: diff --git a/cinder/volume/drivers/dell_emc/vmax/common.py b/cinder/volume/drivers/dell_emc/vmax/common.py index 7fa3eacfb77..fe27b5b19c9 100644 --- a/cinder/volume/drivers/dell_emc/vmax/common.py +++ b/cinder/volume/drivers/dell_emc/vmax/common.py @@ -232,7 +232,7 @@ class VMAXCommon(object): :param arrayInfoList: :return: finalArrayInfoList - :raises: Exception + :raises Exception: """ try: sloWorkloadSet = set() @@ -377,7 +377,7 @@ class VMAXCommon(object): :param volume: volume Object :param snapshot: snapshot object :returns: model_update, dict - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ LOG.debug("Entering create_volume_from_snapshot.") extraSpecs = self._initial_setup(snapshot, host=volume['host']) @@ -508,7 +508,7 @@ class VMAXCommon(object): :param volume: the volume Object :param connector: the connector Object - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ extraSpecs = self._initial_setup(volume) if self.utils.is_volume_failed_over(volume): @@ -576,7 +576,7 @@ class VMAXCommon(object): :param volume: volume Object :param connector: the connector Object :returns: dict -- deviceInfoDict - device information dict - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ portGroupName = None extraSpecs = self._initial_setup(volume) @@ -642,7 +642,7 @@ class VMAXCommon(object): :param isLiveMigration: boolean, can be None :returns: dict -- deviceInfoDict String -- port group name - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ volumeName = volume['name'] maskingViewDict = self._populate_masking_dict( @@ -769,7 +769,7 @@ class VMAXCommon(object): :params volume: the volume Object :params newSize: the new size to increase the volume to :returns: dict -- modifiedVolumeDict - the extended volume Object - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ originalVolumeSize = volume['size'] volumeName = volume['name'] @@ -798,7 +798,7 @@ class VMAXCommon(object): :param originalVolumeSize: :param extraSpecs: extra specifications :return: dict -- modifiedVolumeDict - the extended volume Object - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ if int(originalVolumeSize) > int(newSize): exceptionMessage = (_( @@ -1403,7 +1403,7 @@ class VMAXCommon(object): :param sourceFastPolicyName: the source FAST policy name :param volumeName: the volume Name :param extraSpecs: extra specifications - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ controllerConfigurationService = ( self.utils.find_controller_configuration_service( @@ -1675,7 +1675,7 @@ class VMAXCommon(object): """Get the ecom connection. :returns: pywbem.WBEMConnection -- conn, the ecom connection - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ ecomx509 = None if self.ecomUseSSL: @@ -1717,7 +1717,7 @@ class VMAXCommon(object): :param isv3: True/False :returns: foundPoolInstanceName - the CIM Instance Name of the Pool :returns: string -- systemNameStr - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ foundPoolInstanceName = None systemNameStr = None @@ -1957,7 +1957,7 @@ class VMAXCommon(object): :param storageSystem: the storage system name :param connector: the connector dict :returns: list -- targetWwns, the target WWN list - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ targetWwns = set() @@ -2089,7 +2089,7 @@ class VMAXCommon(object): """Given the array record set the ecom credentials. :param arrayInfo: record - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ ip = arrayInfo['EcomServerIp'] port = arrayInfo['EcomServerPort'] @@ -2121,7 +2121,7 @@ class VMAXCommon(object): :param volume: the volume Object :param volumeTypeId: Optional override of volume['volume_type_id'] :returns: dict -- extra spec dict - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ try: extraSpecs, configurationFile, qosSpecs = ( @@ -2175,7 +2175,7 @@ class VMAXCommon(object): :param extraSpecs: extra specifications :returns: poolInstanceName The pool instance name :returns: string -- the storage system name - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ try: @@ -2299,7 +2299,7 @@ class VMAXCommon(object): :param fastPolicyName: the fast policy name (String) :param extraSpecs: extra specifications :returns: dict -- maskingViewDict with masking view information - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ try: volumeInstance = self.utils.find_volume_instance( @@ -2491,7 +2491,7 @@ class VMAXCommon(object): :param extraSpecs: extra specs :param isSnapshot: boolean -- Defaults to False :returns: dict -- cloneDict the cloned volume dictionary - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ sourceName = sourceVolume['name'] cloneName = cloneVolume['name'] @@ -2585,7 +2585,7 @@ class VMAXCommon(object): :param cloneDict: clone dictionary :param cloneName: clone name :param extraSpecs: extra specifications - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ # Check if the clone/snapshot volume already part of the default sg. cloneInstance = self.utils.find_volume_instance( @@ -2774,7 +2774,7 @@ class VMAXCommon(object): :param volume: volume object to be deleted :param connector: volume object to be deleted :returns: int -- numVolumesMapped - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ volumename = volume['name'] @@ -2820,7 +2820,7 @@ class VMAXCommon(object): """Helper function to delete the specified snapshot. :param snapshot: snapshot object to be deleted - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ LOG.debug("Entering _delete_snapshot.") @@ -2839,7 +2839,7 @@ class VMAXCommon(object): :param context: the context :param group: the group object to be created :returns: dict -- modelUpdate = {'status': 'available'} - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ LOG.info("Create Consistency Group: %(group)s.", {'group': group['id']}) @@ -2873,7 +2873,7 @@ class VMAXCommon(object): :param volumes: the list of volumes in the consisgroup to be deleted :returns: dict -- modelUpdate :returns: list -- list of volume objects - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ LOG.info("Delete Consistency Group: %(group)s.", {'group': group['id']}) @@ -2973,7 +2973,7 @@ class VMAXCommon(object): :param snapshots: snapshots :returns: dict -- modelUpdate :returns: list -- list of snapshots - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ consistencyGroup = cgsnapshot.get('consistencygroup') @@ -3129,7 +3129,7 @@ class VMAXCommon(object): :param snapshots: snapshots :returns: dict -- modelUpdate :returns: list -- list of snapshots - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ consistencyGroup = cgsnapshot.get('consistencygroup') model_update = {} @@ -3211,7 +3211,7 @@ class VMAXCommon(object): :returns: int -- return code :returns: dict -- volumeDict :returns: string -- storageSystemName - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ if not memberCount: memberCount, errorDesc = self.utils.determine_member_count( @@ -3315,7 +3315,7 @@ class VMAXCommon(object): :returns: int -- return code :returns: dict -- volumeDict :returns: string -- storageSystemName - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ rc = -1 volumeDict = {} @@ -3457,7 +3457,7 @@ class VMAXCommon(object): :param extraSpecs: extra specifications :returns: int -- return code :returns: dict -- modifiedVolumeDict - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ # Is the volume extendable. isConcatenated = self.utils.check_if_volume_is_extendable( @@ -3754,7 +3754,7 @@ class VMAXCommon(object): :param extraSpecs: extra specifications :param poolRecord: pool record :returns: dict -- the extraSpecs - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ try: stripedMetaCount = extraSpecs[STRIPECOUNT] @@ -3890,7 +3890,7 @@ class VMAXCommon(object): :param fastPolicyName: the FAST policy name(if it exists) :param extraSpecs: extra specifications :returns: int -- return code - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ storageSystemName = volumeInstance['SystemName'] controllerConfigurationService = ( @@ -3971,7 +3971,7 @@ class VMAXCommon(object): :param extraSpecs: extra specifications :param volume: the cinder volume object :returns: int -- return code - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ storageSystemName = volumeInstance['SystemName'] controllerConfigurationService = ( @@ -4027,7 +4027,7 @@ class VMAXCommon(object): :param isSnapshot: check to see if it is a snapshot :param extraSpecs: extra specifications :returns: int -- return code - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ # Check if the source volume contains any meta devices. metaHeadInstanceName = self.utils.get_volume_meta_head( @@ -4413,7 +4413,7 @@ class VMAXCommon(object): :param extraSpecs: extra specifications :returns: dict -- modelUpdate :returns: list -- the updated list of member volumes - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ replicationService = self.utils.find_replication_service( self.conn, storageSystem) @@ -4495,7 +4495,7 @@ class VMAXCommon(object): :param volume: the volume Object :param extraSpecs: extraSpecs provided in the volume type :returns: string -- pool - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ pool = None # Volume is None in CG ops. @@ -4569,7 +4569,7 @@ class VMAXCommon(object): :param volume: the volume object including the volume_type_id :param external_ref: reference to the existing volume :returns: dict -- model_update - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ extraSpecs = self._initial_setup(volume) self.conn = self._get_ecom_connection() @@ -4711,7 +4711,7 @@ class VMAXCommon(object): Leave the volume intact on the backend array. :param volume: the volume object - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ volumeName = volume['name'] volumeId = volume['id'] diff --git a/cinder/volume/drivers/dell_emc/vmax/fast.py b/cinder/volume/drivers/dell_emc/vmax/fast.py index 5c8f50600cb..51c8a22640b 100644 --- a/cinder/volume/drivers/dell_emc/vmax/fast.py +++ b/cinder/volume/drivers/dell_emc/vmax/fast.py @@ -305,7 +305,7 @@ class VMAXFast(object): :param fastPolicyName: the fast policy name (String) :param extraSpecs: additional info :returns: int -- return code - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ # 5 is ("Add InElements to Policy"). modificationType = '5' diff --git a/cinder/volume/drivers/dell_emc/vmax/masking.py b/cinder/volume/drivers/dell_emc/vmax/masking.py index fc60e2687d0..b156f102718 100644 --- a/cinder/volume/drivers/dell_emc/vmax/masking.py +++ b/cinder/volume/drivers/dell_emc/vmax/masking.py @@ -75,7 +75,7 @@ class VMAXMasking(object): :param maskingViewDict: the masking view dict :param extraSpecs: additional info :returns: dict -- rollbackDict - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ rollbackDict = {} @@ -639,7 +639,7 @@ class VMAXMasking(object): :param volumeName: volume name :param maskingViewDict: the masking view dictionary :param storageGroupInstanceName: storage group instance name - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ assocVolumeInstanceNames = self.get_devices_from_storage_group( @@ -919,7 +919,7 @@ class VMAXMasking(object): :param conn: the connection to the ecom :param connector: the connector object :returns: list -- list of found initiator names - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ foundinitiatornames = [] name = 'initiator name' @@ -1074,7 +1074,7 @@ class VMAXMasking(object): :param extraSpecs: extra specifications :returns: int -- return code :returns: dict -- job - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ rc, job = conn.InvokeMethod( 'CreateMaskingView', configService, ElementName=maskingViewName, @@ -1181,7 +1181,7 @@ class VMAXMasking(object): :param defaultStorageGroupInstanceName: default storage group instance name (can be None for Non FAST) :returns: instance name storageGroupInstanceName - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ storageGroupInstanceName = self.utils.find_storage_masking_group( conn, maskingViewDict['controllerConfigService'], @@ -1292,7 +1292,7 @@ class VMAXMasking(object): :param conn: the connection to the ecom server :param rollbackDict: the rollback dictionary :returns: message - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ message = None # 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 extraSpecs: extra specifications :returns: foundInitiatorGroupInstanceName - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ rc, job = conn.InvokeMethod( 'CreateGroup', controllerConfigService, GroupName=igGroupName, @@ -1642,7 +1642,7 @@ class VMAXMasking(object): :param maskingViewName: maskingview name (String) :param maskingViewInstanceName: the masking view instance name :param extraSpecs: extra specifications - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ rc, job = conn.InvokeMethod('DeleteMaskingView', controllerConfigService, @@ -2274,7 +2274,7 @@ class VMAXMasking(object): :param volumeInstance: volumeInstance :param volumeName: the volume name :param extraSpecs: additional info - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ rep_enabled = self.utils.is_replication_enabled(extraSpecs) isCompressionDisabled = self.utils.is_compression_disabled(extraSpecs) diff --git a/cinder/volume/drivers/hitachi/hnas_nfs.py b/cinder/volume/drivers/hitachi/hnas_nfs.py index 683deb4c35c..8a6d2a8478e 100644 --- a/cinder/volume/drivers/hitachi/hnas_nfs.py +++ b/cinder/volume/drivers/hitachi/hnas_nfs.py @@ -128,7 +128,7 @@ class HNASNFSDriver(nfs.NfsDriver): :returns: Tuple containing the service parameters (label, export path and export file system) or error if no configuration is found. - :raises: ParameterNotFound + :raises ParameterNotFound: """ LOG.debug("_get_service: volume: %(vol)s", {'vol': volume}) label = utils.extract_host(volume.host, level='pool') @@ -159,7 +159,7 @@ class HNASNFSDriver(nfs.NfsDriver): :param volume: dictionary volume reference :param new_size: int size in GB to extend - :raises: InvalidResults + :raises InvalidResults: """ nfs_mount = volume.provider_location 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 :returns: a volume reference where share is in IP format or raises error - :raises: e.strerror + :raises e.strerror: """ # 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 :returns: NFS Share, NFS mount, volume path or raise error - :raises: ManageExistingInvalidReference + :raises ManageExistingInvalidReference: """ # Check that the reference is valid. 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 volume :returns: the provider location - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ # 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 nfs_share: NFS share passed to manage - :raises: ManageExistingVolumeTypeMismatch + :raises ManageExistingVolumeTypeMismatch: """ 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 existing_vol_ref: existing volume to take under management :returns: the size of the volume or raise error - :raises: VolumeBackendAPIException + :raises VolumeBackendAPIException: """ return self._manage_existing_get_size(existing_vol_ref) diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index ec5045d898a..8e555fd0794 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -1655,7 +1655,7 @@ class HPE3PARCommon(object): otherwise return the persona ID. :param persona_value: - :raises: exception.InvalidInput + :raises exception.InvalidInput: :returns: persona ID """ if persona_value not in self.valid_persona_values: diff --git a/cinder/volume/drivers/nexenta/iscsi.py b/cinder/volume/drivers/nexenta/iscsi.py index 11f268677dc..8013023b0e5 100644 --- a/cinder/volume/drivers/nexenta/iscsi.py +++ b/cinder/volume/drivers/nexenta/iscsi.py @@ -543,7 +543,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver): :param target_group: target group :param target_member: target member :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) if not members: @@ -554,7 +554,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver): """Check if LU exists on appliance. :param zvol_name: Zvol name - :raises: NexentaException if zvol not exists + :raises NexentaException: if zvol not exists :return: True if LU exists, else False """ try: @@ -568,7 +568,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver): """Check if LU exists on appliance and shared. :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 """ try: diff --git a/cinder/volume/drivers/vmware/datastore.py b/cinder/volume/drivers/vmware/datastore.py index d9824bbd390..33cb3cb5601 100644 --- a/cinder/volume/drivers/vmware/datastore.py +++ b/cinder/volume/drivers/vmware/datastore.py @@ -63,7 +63,7 @@ class DatastoreSelector(object): :param profile_name: profile name :return: vCenter profile ID - :raises: ProfileNotFoundException + :raises ProfileNotFoundException: """ profile_id = pbm.get_profile_id_by_name(self._session, profile_name) if profile_id is None: @@ -282,7 +282,7 @@ class DatastoreSelector(object): :param datastore: datastore to check the compliance :param profile_name: profile to check the compliance against :return: True if the datastore is compliant; False otherwise - :raises: ProfileNotFoundException + :raises ProfileNotFoundException: """ LOG.debug("Checking datastore: %(datastore)s compliance against " "profile: %(profile)s.", diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py b/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py index a4dee42721b..297f5c5c71a 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py +++ b/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py @@ -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 = {} formatted_target_list = [] diff --git a/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py b/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py index 6045cd16bf8..5e29834c041 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py +++ b/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py @@ -82,7 +82,7 @@ class BrcdHTTPFCZoneClient(object): :param header: Request Headers :returns: HTTP response data - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: if header is None: @@ -144,7 +144,7 @@ class BrcdHTTPFCZoneClient(object): return authentication header (Base64(username:password:random no)). :returns: Authentication Header - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: # Send GET request to secinfo.html to get random number @@ -177,7 +177,7 @@ class BrcdHTTPFCZoneClient(object): header (Base64(username:xxx:random no)). :returns: Authentication status - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ headers = {zone_constant.AUTH_HEADER: self.auth_header} try: @@ -268,7 +268,7 @@ class BrcdHTTPFCZoneClient(object): :param session_info: Session information from the switch :returns: manageable VF list - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: # Check the value of manageableLFList NVP, @@ -289,7 +289,7 @@ class BrcdHTTPFCZoneClient(object): :param vfid: VFID to which context should be changed. :param session_data: Session information from the switch - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: managable_vf_list = self.get_managable_vf_list(session_data) @@ -410,7 +410,7 @@ class BrcdHTTPFCZoneClient(object): This only checks major and minor version. :returns: True if firmware is supported else False. - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ isfwsupported = False @@ -460,7 +460,7 @@ class BrcdHTTPFCZoneClient(object): 'active_zone_config': 'OpenStack_Cfg' } - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ active_zone_set = {} zones_map = {} @@ -506,7 +506,7 @@ class BrcdHTTPFCZoneClient(object): :param activate: True will activate the zone config. :param active_zone_set: Active zone set dict retrieved from get_active_zone_set method - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ LOG.debug("Add zones - zones passed: %(zones)s.", {'zones': add_zones_info}) @@ -568,7 +568,7 @@ class BrcdHTTPFCZoneClient(object): :param operation: ZONE_ADD or ZONE_REMOVE :param active_zone_set: Active zone set dict retrieved from get_active_zone_set method - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ LOG.debug("Update zones - zones passed: %(zones)s.", {'zones': zone_info}) @@ -612,7 +612,7 @@ class BrcdHTTPFCZoneClient(object): :param ifas: ifas map :param activate: True will activate config. :returns: zonestring in the required format - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: zoneString = zone_constant.ZONE_STRING_PREFIX @@ -788,7 +788,7 @@ class BrcdHTTPFCZoneClient(object): :param delete_zones_info: Zones map to add :param active_cfg: Existing active cfg :returns: updated zones, zone config sets, and active zone config - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: delete_zones_info = delete_zones_info.split(";") @@ -934,7 +934,7 @@ class BrcdHTTPFCZoneClient(object): def _disconnect(self): """Disconnect from the switch using HTTP/HTTPS protocol. - :raises: BrocadeZoningHttpException + :raises BrocadeZoningHttpException: """ try: headers = {zone_constant.AUTH_HEADER: self.auth_header} diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py index 943bd8aadf3..66daecdf050 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py @@ -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 = {} formatted_target_list = [] diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py index 844cb0fbd1c..cdde3327244 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py @@ -159,7 +159,7 @@ class CiscoFCZoneClientCLI(object): :param active_zone_set: Active zone set dict retrieved from get_active_zone_set method :param zone_status: Status of the zone - :raises: CiscoZoningCliException + :raises CiscoZoningCliException: """ 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 get_active_zone_set method :param zone_status: Status of the zone - :raises: CiscoZoningCliException + :raises CiscoZoningCliException: """ LOG.debug("Update Zones - Operation: %(op)s - Zones " diff --git a/cinder/zonemanager/fc_san_lookup_service.py b/cinder/zonemanager/fc_san_lookup_service.py index 5ac46235a3f..d77a8f0c2b9 100644 --- a/cinder/zonemanager/fc_san_lookup_service.py +++ b/cinder/zonemanager/fc_san_lookup_service.py @@ -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 """ # Initialize vendor specific implementation of FCZoneDriver