]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix and enable gating on H402
authorDirk Mueller <dirk@dmllr.de>
Sat, 14 Dec 2013 11:33:24 +0000 (12:33 +0100)
committerDirk Mueller <dirk@dmllr.de>
Sat, 14 Dec 2013 11:34:24 +0000 (12:34 +0100)
Summary docstrings should end with punctuation.
Also changed it to command-style in a few places.

Change-Id: Id94fe995aa05356106ad09899b0ada27d608ff21

57 files changed:
cinder/api/common.py
cinder/api/contrib/availability_zones.py
cinder/api/contrib/hosts.py
cinder/api/contrib/image_create.py
cinder/api/contrib/qos_specs_manage.py
cinder/api/contrib/quota_classes.py
cinder/api/contrib/quotas.py
cinder/api/contrib/services.py
cinder/api/contrib/types_extra_specs.py
cinder/api/contrib/volume_encryption_metadata.py
cinder/api/contrib/volume_image_metadata.py
cinder/api/contrib/volume_transfer.py
cinder/api/middleware/auth.py
cinder/api/openstack/__init__.py
cinder/api/openstack/wsgi.py
cinder/api/v2/views/volumes.py
cinder/api/views/availability_zones.py
cinder/api/views/types.py
cinder/api/xmlutil.py
cinder/backup/driver.py
cinder/backup/drivers/swift.py
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/image/image_utils.py
cinder/scheduler/host_manager.py
cinder/test.py
cinder/tests/api/extensions/foxinsocks.py
cinder/tests/api/middleware/test_faults.py
cinder/tests/api/test_extensions.py
cinder/tests/api/v1/test_limits.py
cinder/tests/api/v2/test_limits.py
cinder/tests/backup/fake_swift_client.py
cinder/tests/scheduler/test_host_manager.py
cinder/tests/test_backup.py
cinder/tests/test_backup_ceph.py
cinder/tests/test_gpfs.py
cinder/tests/test_migrations.py
cinder/tests/test_netapp.py
cinder/tests/test_nfs.py
cinder/tests/test_service.py
cinder/tests/test_volume.py
cinder/utils.py
cinder/volume/driver.py
cinder/volume/drivers/eqlx.py
cinder/volume/drivers/huawei/rest_common.py
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/nfs.py
cinder/volume/drivers/san/hp_lefthand.py
cinder/volume/drivers/san/solaris.py
cinder/volume/drivers/sheepdog.py
cinder/volume/drivers/storwize_svc.py
cinder/volume/drivers/vmware/read_write_util.py
cinder/volume/drivers/windows/windows_utils.py
cinder/volume/drivers/xenapi/sm.py
cinder/volume/flows/create_volume/__init__.py
cinder/volume/manager.py
tox.ini

index 2e13691ebbb4a080dbeb3c81fd1c1b0c7efd5f06..889a249a51d99f3921d713207101a6404f993328 100644 (file)
@@ -71,7 +71,7 @@ def get_pagination_params(request):
 
 
 def _get_limit_param(request):
-    """Extract integer limit from request or fail"""
+    """Extract integer limit from request or fail."""
     try:
         limit = int(request.GET['limit'])
     except ValueError:
@@ -84,7 +84,7 @@ def _get_limit_param(request):
 
 
 def _get_marker_param(request):
-    """Extract marker id from request or fail"""
+    """Extract marker id from request or fail."""
     return request.GET['marker']
 
 
@@ -275,7 +275,7 @@ class MetaItemDeserializer(wsgi.MetadataXMLDeserializer):
 class MetadataXMLDeserializer(wsgi.XMLDeserializer):
 
     def extract_metadata(self, metadata_node):
-        """Marshal the metadata attribute of a parsed request"""
+        """Marshal the metadata attribute of a parsed request."""
         if metadata_node is None:
             return {}
         metadata = {}
index fd2344c490d7ea4cce8b7d19488b11f25f16a3d1..2f028110469f4c496343ec1ac510531d45f77c62 100644 (file)
@@ -55,7 +55,7 @@ class Controller(wsgi.Controller):
 
 
 class Availability_zones(extensions.ExtensionDescriptor):
-    """Describe Availability Zones"""
+    """Describe Availability Zones."""
 
     name = 'AvailabilityZones'
     alias = 'os-availability-zone'
index 69e8070e79c5f6b1d19172fdc0cc142fefb22380..93c64b7c30b035d61dce0390880429293ecaeb09 100644 (file)
@@ -250,7 +250,7 @@ class HostController(wsgi.Controller):
 
 
 class Hosts(extensions.ExtensionDescriptor):
-    """Admin-only host administration"""
+    """Admin-only host administration."""
 
     name = "Hosts"
     alias = "os-hosts"
index d1872914ce9932d1cc4f6609a11ece40e87320ee..e34b5d550a77642a79d040e3b607eb7aa502dcea 100644 (file)
@@ -23,7 +23,7 @@ from cinder.api import extensions
 
 
 class Image_create(extensions.ExtensionDescriptor):
-    """Allow creating a volume from an image in the Create Volume v1 API"""
+    """Allow creating a volume from an image in the Create Volume v1 API."""
 
     name = "CreateVolumeExtension"
     alias = "os-image-create"
index 727d964b8d338959e43cff2e8aedd42669a8d984..ef8fc987e708c07f6e3a6d95a46bcb65fae5b62a 100644 (file)
@@ -416,7 +416,7 @@ class QoSSpecsController(wsgi.Controller):
 
 
 class Qos_specs_manage(extensions.ExtensionDescriptor):
-    """QoS specs support"""
+    """QoS specs support."""
 
     name = "Qos_specs_manage"
     alias = "qos-specs"
index c7e6d5f167fe5a7f582e58a455b47987daddd2af..ffa1bf7f95f845de7b3f32a1f0baeb08f7c6a24c 100644 (file)
@@ -45,7 +45,7 @@ class QuotaClassTemplate(xmlutil.TemplateBuilder):
 class QuotaClassSetsController(wsgi.Controller):
 
     def _format_quota_set(self, quota_class, quota_set):
-        """Convert the quota object to a result dict"""
+        """Convert the quota object to a result dict."""
 
         quota_set['id'] = str(quota_class)
 
@@ -95,7 +95,7 @@ class QuotaClassSetsController(wsgi.Controller):
 
 
 class Quota_classes(extensions.ExtensionDescriptor):
-    """Quota classes management support"""
+    """Quota classes management support."""
 
     name = "QuotaClasses"
     alias = "os-quota-class-sets"
index 388571de6c079687d0f1eec70505d0c503f40aa1..d9ae464d592907b921e7a83b857506642f240b28 100644 (file)
@@ -51,7 +51,7 @@ class QuotaTemplate(xmlutil.TemplateBuilder):
 class QuotaSetsController(wsgi.Controller):
 
     def _format_quota_set(self, project_id, quota_set):
-        """Convert the quota object to a result dict"""
+        """Convert the quota object to a result dict."""
 
         quota_set['id'] = str(project_id)
 
@@ -135,7 +135,7 @@ class QuotaSetsController(wsgi.Controller):
 
 
 class Quotas(extensions.ExtensionDescriptor):
-    """Quotas management support"""
+    """Quota management support."""
 
     name = "Quotas"
     alias = "os-quota-sets"
index d242e5209980e7357f6bced073793b9f2a9a1a50..102668dae196c75355c0014cdc6f0b2c5cd65b56 100644 (file)
@@ -112,7 +112,7 @@ class ServiceController(wsgi.Controller):
 
     @wsgi.serializers(xml=ServicesUpdateTemplate)
     def update(self, req, id, body):
-        """Enable/Disable scheduling for a service"""
+        """Enable/Disable scheduling for a service."""
         context = req.environ['cinder.context']
         authorize(context)
 
@@ -154,7 +154,7 @@ class ServiceController(wsgi.Controller):
 
 
 class Services(extensions.ExtensionDescriptor):
-    """Services support"""
+    """Services support."""
 
     name = "Services"
     alias = "os-services"
index 9a53941f837d460a97a908a34a51ff590515ce87..de719f9918899971a47ab616d3f1cfaf1e195275 100644 (file)
@@ -148,7 +148,7 @@ class VolumeTypeExtraSpecsController(wsgi.Controller):
 
 
 class Types_extra_specs(extensions.ExtensionDescriptor):
-    """Types extra specs support"""
+    """Type extra specs support."""
 
     name = "TypesExtraSpecs"
     alias = "os-types-extra-specs"
index d4bded6aed351bd749f4d146989ad9eb82fd631a..e1a6a05354fa0cc6bfab2aa6aacecee5cff7c4c1 100644 (file)
@@ -38,7 +38,7 @@ class VolumeEncryptionMetadataTemplate(xmlutil.TemplateBuilder):
 
 
 class VolumeEncryptionMetadataController(wsgi.Controller):
-    """The volume encryption metadata API extension"""
+    """The volume encryption metadata API extension."""
 
     def _get_volume_encryption_metadata(self, context, volume_id):
         return db.volume_encryption_metadata_get(context, volume_id)
index 7204b29bf1094b8340bccfd2bdc1acfc13181f93..1a06005c7fe95d0d4ddc68886bb0bfe5afd615eb 100644 (file)
@@ -82,7 +82,7 @@ class VolumeImageMetadataController(wsgi.Controller):
 
 
 class Volume_image_metadata(extensions.ExtensionDescriptor):
-    """Show image metadata associated with the volume"""
+    """Show image metadata associated with the volume."""
 
     name = "VolumeImageMetadata"
     alias = "os-vol-image-meta"
index 88699277a353237a2b27cd25d86f84f446bba0b9..f45262fb4300dfab0e28dcd3b883be9716a040ba 100644 (file)
@@ -119,7 +119,7 @@ class VolumeTransferController(wsgi.Controller):
 
     @wsgi.serializers(xml=TransfersTemplate)
     def index(self, req):
-        """Returns a summary list of transfers"""
+        """Returns a summary list of transfers."""
         return self._get_transfers(req, is_detail=False)
 
     @wsgi.serializers(xml=TransfersTemplate)
@@ -226,7 +226,7 @@ class VolumeTransferController(wsgi.Controller):
 
 
 class Volume_transfer(extensions.ExtensionDescriptor):
-    """Volume transfer management support"""
+    """Volume transfer management support."""
 
     name = "VolumeTransfer"
     alias = "os-volume-transfer"
index 63f2c1d5d0897ee43f18d79e9115808c0a958b0d..8672d040849f57e2a72637d441783dcb5cc22041 100644 (file)
@@ -74,7 +74,7 @@ class InjectContext(base_wsgi.Middleware):
 
 
 class CinderKeystoneContext(base_wsgi.Middleware):
-    """Make a request context from keystone headers"""
+    """Make a request context from keystone headers."""
 
     @webob.dec.wsgify(RequestClass=base_wsgi.Request)
     def __call__(self, req):
index df48d95075c2236360ec869cc8d6a76c8526f088..9eb2bdee3fbb0d079f35df6aa878e661482d8b93 100644 (file)
@@ -59,7 +59,7 @@ class APIRouter(base_wsgi.Router):
 
     @classmethod
     def factory(cls, global_config, **local_config):
-        """Simple paste factory, :class:`cinder.wsgi.Router` doesn't have"""
+        """Simple paste factory, :class:`cinder.wsgi.Router` doesn't have."""
         return cls()
 
     def __init__(self, ext_mgr=None):
index 70d127e81361dea34a1aa42f4e1d246763d8e983..2e951adc032e6e0043cd0f73e1e201ab8598244d 100644 (file)
@@ -204,7 +204,7 @@ class ActionDispatcher(object):
 
 
 class TextDeserializer(ActionDispatcher):
-    """Default request body deserialization"""
+    """Default request body deserialization."""
 
     def deserialize(self, datastring, action='default'):
         return self.dispatch(datastring, action=action)
@@ -278,20 +278,20 @@ class XMLDeserializer(TextDeserializer):
         return None
 
     def find_first_child_named(self, parent, name):
-        """Search a nodes children for the first child with a given name"""
+        """Search a nodes children for the first child with a given name."""
         for node in parent.childNodes:
             if node.nodeName == name:
                 return node
         return None
 
     def find_children_named(self, parent, name):
-        """Return all of a nodes children who have the given name"""
+        """Return all of a nodes children who have the given name."""
         for node in parent.childNodes:
             if node.nodeName == name:
                 yield node
 
     def extract_text(self, node):
-        """Get the text field contained by the given node"""
+        """Get the text field contained by the given node."""
         if len(node.childNodes) == 1:
             child = node.childNodes[0]
             if child.nodeType == child.TEXT_NODE:
@@ -299,7 +299,7 @@ class XMLDeserializer(TextDeserializer):
         return ""
 
     def find_attribute_or_element(self, parent, name):
-        """Get an attribute value; fallback to an element if not found"""
+        """Get an attribute value; fallback to an element if not found."""
         if parent.hasAttribute(name):
             return parent.getAttribute(name)
 
@@ -316,7 +316,7 @@ class XMLDeserializer(TextDeserializer):
 class MetadataXMLDeserializer(XMLDeserializer):
 
     def extract_metadata(self, metadata_node):
-        """Marshal the metadata attribute of a parsed request"""
+        """Marshal the metadata attribute of a parsed request."""
         metadata = {}
         if metadata_node is not None:
             for meta_node in self.find_children_named(metadata_node, "meta"):
@@ -326,7 +326,7 @@ class MetadataXMLDeserializer(XMLDeserializer):
 
 
 class DictSerializer(ActionDispatcher):
-    """Default request body serialization"""
+    """Default request body serialization."""
 
     def serialize(self, data, action='default'):
         return self.dispatch(data, action=action)
@@ -336,7 +336,7 @@ class DictSerializer(ActionDispatcher):
 
 
 class JSONDictSerializer(DictSerializer):
-    """Default JSON request body serialization"""
+    """Default JSON request body serialization."""
 
     def default(self, data):
         return jsonutils.dumps(data)
index ca78b87e67e18b1a0ad9f0fc993e560a3b0c123b..f904395814e797046aa89d0309168d7d7275c608 100644 (file)
@@ -73,7 +73,7 @@ class ViewBuilder(common.ViewBuilder):
         }
 
     def _get_attachments(self, volume):
-        """Retrieves the attachments of the volume object"""
+        """Retrieve the attachments of the volume object."""
         attachments = []
 
         if volume['attach_status'] == 'attached':
@@ -94,7 +94,7 @@ class ViewBuilder(common.ViewBuilder):
         return attachments
 
     def _get_volume_metadata(self, volume):
-        """Retrieves the metadata of the volume object"""
+        """Retrieve the metadata of the volume object."""
         if volume.get('volume_metadata'):
             metadata = volume.get('volume_metadata')
             return dict((item['key'], item['value']) for item in metadata)
@@ -105,7 +105,7 @@ class ViewBuilder(common.ViewBuilder):
         return {}
 
     def _get_volume_type(self, volume):
-        """Retrieves the type the volume object is"""
+        """Retrieve the type the volume object."""
         if volume['volume_type_id'] and volume.get('volume_type'):
             return volume['volume_type']['name']
         else:
index 5031cc27f016a0e4b609b5164ff645323e5127ed..bcf658af6bec75dc79acc0929243947b020cfad0 100644 (file)
@@ -17,7 +17,7 @@ import cinder.api.common
 
 
 class ViewBuilder(cinder.api.common.ViewBuilder):
-    """Map cinder.volumes.api list_availability_zones response into dicts"""
+    """Map cinder.volumes.api list_availability_zones response into dicts."""
 
     def list(self, request, availability_zones):
         def fmt(az):
index 675ec01fe55756a6abe08b6a53bb681f6b816697..1552d72a63f4274af7204d64b3eda9a448c80f9f 100644 (file)
@@ -28,7 +28,7 @@ class ViewBuilder(common.ViewBuilder):
         return trimmed if brief else dict(volume_type=trimmed)
 
     def index(self, request, volume_types):
-        """Index over trimmed volume types"""
+        """Index over trimmed volume types."""
         volume_types_list = [self.show(request, volume_type, True)
                              for volume_type in volume_types]
         return dict(volume_types=volume_types_list)
index a64e91f9fdecf0f4bae1a8fcb45e263920298abc..728d4761d48b8a3552af21d63764c98ad0617777 100644 (file)
@@ -346,7 +346,7 @@ class TemplateElement(object):
                 pass
 
     def getAttrib(self, obj):
-        """Get attribute"""
+        """Get attribute."""
         tmpattrib = {}
         #Now set up all the attributes...
         for key, value in self.attrib.items():
index 59525d07ebb2375e5c2732adb87b083547bb1ea8..241ca8348301d798543872f26e7b57eea62358ef 100644 (file)
@@ -21,13 +21,13 @@ from cinder.db import base
 class BackupDriver(base.Base):
 
     def backup(self, backup, volume_file):
-        """Starts a backup of a specified volume"""
+        """Start a backup of a specified volume."""
         raise NotImplementedError()
 
     def restore(self, backup, volume_id, volume_file):
-        """Restores a saved backup"""
+        """Restore a saved backup."""
         raise NotImplementedError()
 
     def delete(self, backup):
-        """Deletes a saved backup"""
+        """Delete a saved backup."""
         raise NotImplementedError()
index 655bc65260a5b40942ee623bd83c62993ada4222..0073354b0dc3928d9840177b121949295193336e 100644 (file)
@@ -225,7 +225,7 @@ class SwiftBackupDriver(BackupDriver):
         return metadata
 
     def _prepare_backup(self, backup):
-        """Prepare the backup process and return the backup metadata"""
+        """Prepare the backup process and return the backup metadata."""
         backup_id = backup['id']
         volume_id = backup['volume_id']
         volume = self.db.volume_get(self.context, volume_id)
@@ -259,7 +259,7 @@ class SwiftBackupDriver(BackupDriver):
         return object_meta, container
 
     def _backup_chunk(self, backup, container, data, data_offset, object_meta):
-        """Backup data chunk based on the object metadata and offset"""
+        """Backup data chunk based on the object metadata and offset."""
         object_prefix = object_meta['prefix']
         object_list = object_meta['list']
         object_id = object_meta['id']
@@ -313,7 +313,7 @@ class SwiftBackupDriver(BackupDriver):
         eventlet.sleep(0)
 
     def _finalize_backup(self, backup, container, object_meta):
-        """Finalize the backup by updating its metadata on Swift"""
+        """Finalize the backup by updating its metadata on Swift."""
         object_list = object_meta['list']
         object_id = object_meta['id']
         try:
index 8af6c557a9f07af079e9e0cea749abfb24d8f89f..e4164253df79d639cdce7b28c7a4f12a070a6dc7 100644 (file)
@@ -80,7 +80,7 @@ IMPL = db_api.DBAPI(backend_mapping=_BACKEND_MAPPING)
 
 
 class NoMoreTargets(exception.CinderException):
-    """No more available targets"""
+    """No more available targets."""
     pass
 
 
index 54a11e0a7b632c977e0afa4bf2a12febd44dc12d..6260518948bf776f9fffde783b0af326bd2ca4ed 100644 (file)
@@ -1718,7 +1718,7 @@ def _volume_type_get(context, id, session=None, inactive=False):
 
 @require_context
 def volume_type_get(context, id, inactive=False):
-    """Returns a dict describing specific volume_type"""
+    """Return a dict describing specific volume_type."""
 
     return _volume_type_get(context, id, None, inactive)
 
@@ -1738,7 +1738,7 @@ def _volume_type_get_by_name(context, name, session=None):
 
 @require_context
 def volume_type_get_by_name(context, name):
-    """Returns a dict describing specific volume_type"""
+    """Return a dict describing specific volume_type."""
 
     return _volume_type_get_by_name(context, name)
 
index 2b870468d5057f3619bf426bc3307dea3cf16ef0..47761b51b69b83ee9a878c992b81418f02a3daf9 100644 (file)
@@ -62,7 +62,7 @@ def qemu_img_info(path):
 
 
 def convert_image(source, dest, out_format):
-    """Convert image to other format"""
+    """Convert image to other format."""
     cmd = ('qemu-img', 'convert', '-O', out_format, source, dest)
     utils.execute(*cmd, run_as_root=True)
 
index 5b3f17be478447957fd11e1b36d6eafc7fdec872..7cb8adfaddbeca9c39082cb5b043676e3b1150f7 100644 (file)
@@ -133,7 +133,7 @@ class HostState(object):
             self.updated = capability['timestamp']
 
     def consume_from_volume(self, volume):
-        """Incrementally update host state from an volume"""
+        """Incrementally update host state from an volume."""
         volume_gb = volume['size']
         if self.free_capacity_gb == 'infinite':
             # There's virtually infinite space on back-end
@@ -220,7 +220,7 @@ class HostManager(object):
 
     def get_filtered_hosts(self, hosts, filter_properties,
                            filter_class_names=None):
-        """Filter hosts and return only ones passing all filters"""
+        """Filter hosts and return only ones passing all filters."""
         filter_classes = self._choose_host_filters(filter_class_names)
         return self.filter_handler.get_filtered_objects(filter_classes,
                                                         hosts,
@@ -228,7 +228,7 @@ class HostManager(object):
 
     def get_weighed_hosts(self, hosts, weight_properties,
                           weigher_class_names=None):
-        """Weigh the hosts"""
+        """Weigh the hosts."""
         weigher_classes = self._choose_host_weighers(weigher_class_names)
         return self.weight_handler.get_weighed_objects(weigher_classes,
                                                        hosts,
index 6eff6b2b0c714d29a6fefb62f2c52e958ab83ce2..8eb25333791e0ec1cd24b0a0264699270e0d82df 100644 (file)
@@ -270,7 +270,7 @@ class TestCase(testtools.TestCase):
                                 })
 
     def assertGreater(self, first, second, msg=None):
-        """Python < v2.7 compatibility.  Assert 'first' > 'second'"""
+        """Python < v2.7 compatibility.  Assert 'first' > 'second'."""
         try:
             f = super(TestCase, self).assertGreater
         except AttributeError:
@@ -281,7 +281,7 @@ class TestCase(testtools.TestCase):
             f(first, second, msg=msg)
 
     def assertGreaterEqual(self, first, second, msg=None):
-        """Python < v2.7 compatibility.  Assert 'first' >= 'second'"""
+        """Python < v2.7 compatibility.  Assert 'first' >= 'second'."""
         try:
             f = super(TestCase, self).assertGreaterEqual
         except AttributeError:
index 0f1e7a26be4b66e6b5eb5f1b041d3bb45cae5fb1..53ae39e88faf36178a764130a55c904246830acb 100644 (file)
@@ -61,7 +61,7 @@ class FoxInSocksFlavorBandsControllerExtension(wsgi.Controller):
 
 
 class Foxinsocks(extensions.ExtensionDescriptor):
-    """The Fox In Socks Extension"""
+    """The Fox In Socks Extension."""
 
     name = "Fox In Socks"
     alias = "FOXNSOX"
index 18da123bce7965bf9cf6cad65b536bed95a5ca72..790c8f6f8ce7d24eb6600def4109b6b67bd44ff2 100644 (file)
@@ -169,12 +169,12 @@ class TestFaults(test.TestCase):
         self.assertIn("Entrada invalida: El valor es invalido", resp.body)
 
     def test_fault_has_status_int(self):
-        """Ensure the status_int is set correctly on faults"""
+        """Ensure the status_int is set correctly on faults."""
         fault = wsgi.Fault(webob.exc.HTTPBadRequest(explanation='what?'))
         self.assertEqual(fault.status_int, 400)
 
     def test_xml_serializer(self):
-        """Ensure that a v1.1 request responds with a v1 xmlns"""
+        """Ensure that a v1.1 request responds with a v1 xmlns."""
         request = webob.Request.blank('/v1',
                                       headers={"Accept": "application/xml"})
 
index 65bfe101bdb71b50ee1ab849677cccfd17e86fda..1cbdfd81baf4d71929c0c5f30aa415387b137ecc 100644 (file)
@@ -74,7 +74,7 @@ class ExtensionControllerTest(ExtensionTestCase):
             fox_ext, {'namespace': 'http://www.fox.in.socks/api/ext/pie/v1.0',
                       'name': 'Fox In Socks',
                       'updated': '2011-01-22T13:25:27-06:00',
-                      'description': 'The Fox In Socks Extension',
+                      'description': 'The Fox In Socks Extension.',
                       'alias': 'FOXNSOX',
                       'links': []}, )
 
@@ -97,7 +97,7 @@ class ExtensionControllerTest(ExtensionTestCase):
             {"namespace": "http://www.fox.in.socks/api/ext/pie/v1.0",
              "name": "Fox In Socks",
              "updated": "2011-01-22T13:25:27-06:00",
-             "description": "The Fox In Socks Extension",
+             "description": "The Fox In Socks Extension.",
              "alias": "FOXNSOX",
              "links": []})
 
@@ -130,7 +130,7 @@ class ExtensionControllerTest(ExtensionTestCase):
         self.assertEqual(fox_ext.get('updated'), '2011-01-22T13:25:27-06:00')
         self.assertEqual(
             fox_ext.findtext('{0}description'.format(NS)),
-            'The Fox In Socks Extension')
+            'The Fox In Socks Extension.')
 
         xmlutil.validate_schema(root, 'extensions')
 
@@ -152,6 +152,6 @@ class ExtensionControllerTest(ExtensionTestCase):
         self.assertEqual(root.get('updated'), '2011-01-22T13:25:27-06:00')
         self.assertEqual(
             root.findtext('{0}description'.format(NS)),
-            'The Fox In Socks Extension')
+            'The Fox In Socks Extension.')
 
         xmlutil.validate_schema(root, 'extension')
index 2f4414a760f0d029c99ec76e12f55024dd0e2bb9..755a0532320afde56e9b3886e4d8a8a58fe21d21 100644 (file)
@@ -276,7 +276,7 @@ class LimitMiddlewareTest(BaseLimitTestSuite):
         self.assertEqual(value, expected)
 
     def test_limited_request_xml(self):
-        """Test a rate-limited (413) response as XML"""
+        """Test a rate-limited (413) response as XML."""
         request = webob.Request.blank("/")
         response = request.get_response(self.app)
         self.assertEqual(200, response.status_int)
index 57c31bb33314dcb70263a732b9f9e81e9181c5c4..6c2316cd186da6b38c56aa5d3fbddf20f97ba4cf 100644 (file)
@@ -278,7 +278,7 @@ class LimitMiddlewareTest(BaseLimitTestSuite):
         self.assertEqual(value, expected)
 
     def test_limited_request_xml(self):
-        """Test a rate-limited (413) response as XML"""
+        """Test a rate-limited (413) response as XML."""
         request = webob.Request.blank("/")
         response = request.get_response(self.app)
         self.assertEqual(200, response.status_int)
index ccf9982876f60d8fd80dd279bc5f61f9d98c455e..dc35ea7f2c5678e12aed76f2b0ae2baa8865ac7b 100644 (file)
@@ -37,7 +37,7 @@ class FakeSwiftClient(object):
 
 
 class FakeSwiftConnection(object):
-    """Logging calls instead of executing"""
+    """Logging calls instead of executing."""
     def __init__(self, *args, **kwargs):
         pass
 
index 01bc85904150f3a50f2e3c1655c9370a0892f870..c661fa5c1762b6a258d6423170748e8c4b4a0e60 100644 (file)
@@ -41,7 +41,7 @@ class FakeFilterClass2(filters.BaseHostFilter):
 
 
 class HostManagerTestCase(test.TestCase):
-    """Test case for HostManager class"""
+    """Test case for HostManager class."""
 
     def setUp(self):
         super(HostManagerTestCase, self).setUp()
@@ -204,7 +204,7 @@ class HostManagerTestCase(test.TestCase):
 
 
 class HostStateTestCase(test.TestCase):
-    """Test case for HostState class"""
+    """Test case for HostState class."""
 
     def test_update_from_volume_capability(self):
         fake_host = host_manager.HostState('host1')
index 696e29c9ba9395f0f6b7c6d62779a550745bb94e..c8b33779f69cd3859f329482266fb66c95c6052a 100644 (file)
@@ -151,7 +151,7 @@ class BackupTestCase(test.TestCase):
                           backup_id)
 
     def test_create_backup_with_error(self):
-        """Test error handling when an error occurs during backup creation"""
+        """Test error handling when error occurs during backup creation."""
         vol_id = self._create_volume_db_entry(size=1)
         backup_id = self._create_backup_db_entry(volume_id=vol_id)
 
@@ -171,7 +171,7 @@ class BackupTestCase(test.TestCase):
         self.assertEqual(backup['status'], 'error')
 
     def test_create_backup(self):
-        """Test normal backup creation"""
+        """Test normal backup creation."""
         vol_size = 1
         vol_id = self._create_volume_db_entry(size=vol_size)
         backup_id = self._create_backup_db_entry(volume_id=vol_id)
@@ -191,7 +191,7 @@ class BackupTestCase(test.TestCase):
 
     def test_restore_backup_with_bad_volume_status(self):
         """Test error handling when restoring a backup to a volume
-        with a bad status
+        with a bad status.
         """
         vol_id = self._create_volume_db_entry(status='available', size=1)
         backup_id = self._create_backup_db_entry(volume_id=vol_id)
@@ -205,7 +205,7 @@ class BackupTestCase(test.TestCase):
 
     def test_restore_backup_with_bad_backup_status(self):
         """Test error handling when restoring a backup with a backup
-        with a bad status
+        with a bad status.
         """
         vol_id = self._create_volume_db_entry(status='restoring-backup',
                                               size=1)
@@ -222,7 +222,7 @@ class BackupTestCase(test.TestCase):
         self.assertEqual(backup['status'], 'error')
 
     def test_restore_backup_with_driver_error(self):
-        """Test error handling when an error occurs during backup restore"""
+        """Test error handling when an error occurs during backup restore."""
         vol_id = self._create_volume_db_entry(status='restoring-backup',
                                               size=1)
         backup_id = self._create_backup_db_entry(status='restoring',
@@ -246,7 +246,7 @@ class BackupTestCase(test.TestCase):
 
     def test_restore_backup_with_bad_service(self):
         """Test error handling when attempting a restore of a backup
-        with a different service to that used to create the backup
+        with a different service to that used to create the backup.
         """
         vol_id = self._create_volume_db_entry(status='restoring-backup',
                                               size=1)
@@ -272,7 +272,7 @@ class BackupTestCase(test.TestCase):
         self.assertEqual(backup['status'], 'available')
 
     def test_restore_backup(self):
-        """Test normal backup restoration"""
+        """Test normal backup restoration."""
         vol_size = 1
         vol_id = self._create_volume_db_entry(status='restoring-backup',
                                               size=vol_size)
@@ -293,7 +293,7 @@ class BackupTestCase(test.TestCase):
 
     def test_delete_backup_with_bad_backup_status(self):
         """Test error handling when deleting a backup with a backup
-        with a bad status
+        with a bad status.
         """
         vol_id = self._create_volume_db_entry(size=1)
         backup_id = self._create_backup_db_entry(status='available',
@@ -320,7 +320,7 @@ class BackupTestCase(test.TestCase):
 
     def test_delete_backup_with_bad_service(self):
         """Test error handling when attempting a delete of a backup
-        with a different service to that used to create the backup
+        with a different service to that used to create the backup.
         """
         vol_id = self._create_volume_db_entry(size=1)
         backup_id = self._create_backup_db_entry(status='deleting',
@@ -345,7 +345,7 @@ class BackupTestCase(test.TestCase):
         self.backup_mgr.delete_backup(self.ctxt, backup_id)
 
     def test_delete_backup(self):
-        """Test normal backup deletion"""
+        """Test normal backup deletion."""
         vol_id = self._create_volume_db_entry(size=1)
         backup_id = self._create_backup_db_entry(status='deleting',
                                                  volume_id=vol_id)
@@ -373,7 +373,7 @@ class BackupTestCase(test.TestCase):
 
     def test_backup_get_all_by_project_with_deleted(self):
         """Test deleted backups don't show up in backup_get_all_by_project.
-           Unless context.read_deleted is 'yes'
+           Unless context.read_deleted is 'yes'.
         """
         backups = db.backup_get_all_by_project(self.ctxt, 'fake')
         self.assertEqual(len(backups), 0)
index d0d08323356b5f19b51a592a0ac7d357c6305a0d..f9df535135e7a9690c9c2f0052376b00fe5ac0bd 100644 (file)
@@ -12,7 +12,7 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-""" Tests for Ceph backup service """
+""" Tests for Ceph backup service."""
 
 import fcntl
 import hashlib
@@ -40,7 +40,7 @@ LOG = logging.getLogger(__name__)
 
 
 class BackupCephTestCase(test.TestCase):
-    """Test Case for backup to Ceph object store"""
+    """Test Case for backup to Ceph object store."""
 
     def _create_volume_db_entry(self, id, size):
         vol = {'id': id, 'size': size, 'status': 'available'}
index 3dd7eaf1ea33a40d26bc84901d81bf83792f8b9a..a04d69b87fde95288256e124fa8b0771e62cc4aa 100644 (file)
@@ -130,7 +130,7 @@ class GPFSDriverTestCase(test.TestCase):
         super(GPFSDriverTestCase, self).tearDown()
 
     def test_create_delete_volume_full_backing_file(self):
-        """create and delete vol with full creation method"""
+        """Create and delete vol with full creation method."""
         CONF.gpfs_sparse_volumes = False
         vol = test_utils.create_volume(self.context, host=CONF.host)
         volume_id = vol['id']
@@ -142,7 +142,7 @@ class GPFSDriverTestCase(test.TestCase):
         self.assertFalse(os.path.exists(path))
 
     def test_create_delete_volume_sparse_backing_file(self):
-        """create and delete vol with default sparse creation method"""
+        """Create and delete vol with default sparse creation method."""
         CONF.gpfs_sparse_volumes = True
         vol = test_utils.create_volume(self.context, host=CONF.host)
         volume_id = vol['id']
index 259306987743f41843284804ac4ba9c35ea8d815..b99de9538929a3a536dba491350ab1f1f4af0644 100644 (file)
@@ -538,7 +538,7 @@ class TestMigrations(test.TestCase):
             self.assertEqual(0, len(snapshots.c.volume_id.foreign_keys))
 
     def test_migration_008(self):
-        """Test that adding and removing the backups table works correctly"""
+        """Test that adding and removing the backups table works correctly."""
         for (key, engine) in self.engines.items():
             migration_api.version_control(engine,
                                           TestMigrations.REPOSITORY,
index 8244553fa4dde901d2423a64a28d27e30cd8139c..37040b90d0fbf21bd180a76e1e8ac75e20575eb8 100644 (file)
@@ -61,7 +61,7 @@ class FakeHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
 
 
 class FakeHttplibSocket(object):
-    """A fake socket implementation for httplib.HTTPResponse"""
+    """A fake socket implementation for httplib.HTTPResponse."""
     def __init__(self, value):
         self._rbuffer = StringIO.StringIO(value)
         self._wbuffer = StringIO.StringIO('')
@@ -93,7 +93,7 @@ RESPONSE_SUFFIX_DIRECT = """</netapp>"""
 
 
 class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler):
-    """HTTP handler that fakes enough stuff to allow the driver to run"""
+    """HTTP handler that fakes enough stuff to allow the driver to run."""
 
     def do_GET(s):
         """Respond to a GET request."""
@@ -433,7 +433,7 @@ class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler):
 
     @staticmethod
     def _get_child_content(self, name):
-        """Get the content of the child"""
+        """Get the content of the child."""
         for child in self.iterchildren():
             if child.tag == name or etree.QName(child.tag).localname == name:
                 return child.text
@@ -680,7 +680,7 @@ class NetAppDriverNegativeTestCase(test.TestCase):
 
 
 class FakeDirect7MODEServerHandler(FakeHTTPRequestHandler):
-    """HTTP handler that fakes enough stuff to allow the driver to run"""
+    """HTTP handler that fakes enough stuff to allow the driver to run."""
 
     def do_GET(s):
         """Respond to a GET request."""
index 54aba6d22dc4f62b5ff695628bd946a45989e917..e4c84d7de6e8d9c1fe6558e0903302d61e9df3b9 100644 (file)
@@ -606,7 +606,7 @@ class NfsDriverTestCase(test.TestCase):
         mox.VerifyAll()
 
     def test_get_volume_stats(self):
-        """get_volume_stats must fill the correct values"""
+        """get_volume_stats must fill the correct values."""
         mox = self._mox
         drv = self._driver
 
index c385f90d08e0cec25e6528c3773bf3b2e572433c..29ac18e22c9d3486a668b44cbd8b6ed442e7b467 100644 (file)
@@ -49,7 +49,7 @@ CONF.register_opts(test_service_opts)
 
 
 class FakeManager(manager.Manager):
-    """Fake manager for tests"""
+    """Fake manager for tests."""
     def __init__(self, host=None,
                  db_driver=None, service_name=None):
         super(FakeManager, self).__init__(host=host,
@@ -65,7 +65,7 @@ class ExtendedService(service.Service):
 
 
 class ServiceManagerTestCase(test.TestCase):
-    """Test cases for Services"""
+    """Test cases for Services."""
 
     def test_message_gets_to_manager(self):
         serv = service.Service('test',
@@ -109,7 +109,7 @@ class ServiceFlagsTestCase(test.TestCase):
 
 
 class ServiceTestCase(test.TestCase):
-    """Test cases for Services"""
+    """Test cases for Services."""
 
     def setUp(self):
         super(ServiceTestCase, self).setUp()
index 4d28c267555b4f2e107806efd63c168d79aea0a5..043d0acb9d386af5387f9285a8a301ea9af09d30 100644 (file)
@@ -1313,7 +1313,7 @@ class VolumeTestCase(BaseVolumeTestCase):
         self.volume.delete_volume(self.context, volume['id'])
 
     def test_cannot_force_delete_attached_volume(self):
-        """Test volume can't be force delete in attached state"""
+        """Test volume can't be force delete in attached state."""
         volume = tests_utils.create_volume(self.context, **self.volume_params)
         self.volume.create_volume(self.context, volume['id'])
         volume['status'] = 'in-use'
index d0353a15bd0229e0efae0a0e05d81eda75796ab4..f112ad549bce75d208f42c1f108be395d780bc1c 100644 (file)
@@ -669,7 +669,7 @@ def make_dev_path(dev, partition=None, base='/dev'):
 
 
 def total_seconds(td):
-    """Local total_seconds implementation for compatibility with python 2.6"""
+    """Local total_seconds implementation for compatibility with python 2.6."""
     if hasattr(td, 'total_seconds'):
         return td.total_seconds()
     else:
@@ -767,7 +767,7 @@ def tempdir(**kwargs):
 
 
 def walk_class_hierarchy(clazz, encountered=None):
-    """Walk class hierarchy, yielding most derived classes first"""
+    """Walk class hierarchy, yielding most derived classes first."""
     if not encountered:
         encountered = []
     for subclass in clazz.__subclasses__():
index 67c3585573921fed86e6fa2d661ee4f4180bc777..608ddb904590846669bf41db0480eb4c756751d1 100644 (file)
@@ -258,11 +258,11 @@ class VolumeDriver(object):
         return None
 
     def do_setup(self, context):
-        """Any initialization the volume driver does while starting"""
+        """Any initialization the volume driver does while starting."""
         pass
 
     def validate_connector(self, connector):
-        """Fail if connector doesn't contain all the data needed by driver"""
+        """Fail if connector doesn't contain all the data needed by driver."""
         pass
 
     def _copy_volume_data_cleanup(self, context, volume, properties,
@@ -667,7 +667,7 @@ class ISCSIDriver(VolumeDriver):
         pass
 
     def _get_iscsi_initiator(self):
-        """Get iscsi initiator name for this machine"""
+        """Get iscsi initiator name for this machine."""
         # NOTE openiscsi stores initiator name in a file that
         #      needs root permission to read.
         contents = utils.read_file_as_root('/etc/iscsi/initiatorname.iscsi')
index 75cca0f4693935a1cdda603a0cb0a7bd71c3d86a..fa9e4318e8e795e7489e5144dc7ad4eda7f9bd98 100644 (file)
@@ -450,7 +450,7 @@ class DellEQLSanISCSIDriver(SanISCSIDriver):
         pass
 
     def extend_volume(self, volume, new_size):
-        """Extend the size of the volume"""
+        """Extend the size of the volume."""
         try:
             self._eql_execute('volume', 'select', volume['name'],
                               'size', "%sG" % new_size)
index 4d1f57234f049cb412251c972266b21231a6cff6..2a8c7c36dbb7c820bd1498a64d1fb5295c79d257 100644 (file)
@@ -123,7 +123,7 @@ class HVSCommon():
                 lunparam['INITIALDISTRIBUTEPOLICY'] = "2"
 
     def _init_lun_parameters(self, name, parameters):
-        """Init basic LUN parameters """
+        """Init basic LUN parameters."""
         lunparam = {"TYPE": "11",
                     "NAME": name,
                     "PARENTTYPE": "216",
index 2c3dfba32cf6f054c820c5d0106f29d454ddaee9..c26f2606972fb71159bd8608a6e5f896f1a675a4 100644 (file)
@@ -554,7 +554,7 @@ class NetAppNFSDriver(nfs.NfsDriver):
         raise NotImplementedError()
 
     def _check_share_in_use(self, conn, dir):
-        """Checks if share is cinder mounted and returns it. """
+        """Checks if share is cinder mounted and returns it."""
         try:
             if conn:
                 host = conn.split(':')[0]
index afa91bba3733008ddc2886d919bf8644fa1b68c0..cbb121baf29b8377c263ababfe434873664a0b0f 100644 (file)
@@ -408,7 +408,7 @@ class NfsDriver(RemoteFsDriver):
             self._remotefsclient.set_execute(execute)
 
     def do_setup(self, context):
-        """Any initialization the volume driver does while starting"""
+        """Any initialization the volume driver does while starting."""
         super(NfsDriver, self).do_setup(context)
 
         config = self.configuration.nfs_shares_config
index 36c351cc7bf88a21e1bb73a21ac5a34add7fa36f..8a96d25d4808a657c3b233809a7d6cfb8b1c336e 100644 (file)
@@ -78,7 +78,7 @@ class HpSanISCSIDriver(SanISCSIDriver):
         self.cluster_vip = None
 
     def _cliq_run(self, verb, cliq_args, check_exit_code=True):
-        """Runs a CLIQ command over SSH, without doing any result parsing"""
+        """Runs a CLIQ command over SSH, without doing any result parsing."""
         cmd_list = [verb]
         for k, v in cliq_args.items():
             cmd_list.append("%s=%s" % (k, v))
@@ -86,7 +86,7 @@ class HpSanISCSIDriver(SanISCSIDriver):
         return self._run_ssh(cmd_list, check_exit_code)
 
     def _cliq_run_xml(self, verb, cliq_args, check_cliq_result=True):
-        """Runs a CLIQ command over SSH, parsing and checking the output"""
+        """Runs a CLIQ command over SSH, parsing and checking the output."""
         cliq_args['output'] = 'XML'
         (out, _err) = self._cliq_run(verb, cliq_args, check_cliq_result)
 
@@ -112,7 +112,7 @@ class HpSanISCSIDriver(SanISCSIDriver):
         return result_xml
 
     def _cliq_get_cluster_info(self, cluster_name):
-        """Queries for info about the cluster (including IP)"""
+        """Queries for info about the cluster (including IP)."""
         cliq_args = {}
         cliq_args['clusterName'] = cluster_name
         cliq_args['searchDepth'] = '1'
@@ -123,7 +123,7 @@ class HpSanISCSIDriver(SanISCSIDriver):
         return result_xml
 
     def _cliq_get_cluster_vip(self, cluster_name):
-        """Gets the IP on which a cluster shares iSCSI volumes"""
+        """Gets the IP on which a cluster shares iSCSI volumes."""
         cluster_xml = self._cliq_get_cluster_info(cluster_name)
 
         vips = []
@@ -140,7 +140,7 @@ class HpSanISCSIDriver(SanISCSIDriver):
         raise exception.VolumeBackendAPIException(data=msg)
 
     def _cliq_get_volume_info(self, volume_name):
-        """Gets the volume info, including IQN"""
+        """Gets the volume info, including IQN."""
         cliq_args = {}
         cliq_args['volumeName'] = volume_name
         result_xml = self._cliq_run_xml("getVolumeInfo", cliq_args)
@@ -193,7 +193,7 @@ class HpSanISCSIDriver(SanISCSIDriver):
         return volume_attributes
 
     def _cliq_get_snapshot_info(self, snapshot_name):
-        """Gets the snapshot info, including IQN"""
+        """Gets the snapshot info, including IQN."""
         cliq_args = {}
         cliq_args['snapshotName'] = snapshot_name
         result_xml = self._cliq_run_xml("getSnapshotInfo", cliq_args)
index 8dce31d11bf45f0cba1471a07a814f75488d885b..9a513265eb54e4bce35036a4fc6e7e71e1477b9c 100644 (file)
@@ -267,7 +267,7 @@ class SolarisISCSIDriver(SanISCSIDriver):
             self._execute('/usr/sbin/sbdadm', 'delete-lu', luid)
 
     def _collect_lines(self, data):
-        """Split lines from data into an array, trimming them """
+        """Split lines from data into an array, trimming them."""
         matches = []
         for line in data.splitlines():
             match = line.strip()
@@ -275,7 +275,7 @@ class SolarisISCSIDriver(SanISCSIDriver):
         return matches
 
     def _get_prefixed_values(self, data, prefix):
-        """Collect lines which start with prefix; with trimming"""
+        """Collect lines which start with prefix; with trimming."""
         matches = []
         for line in data.splitlines():
             line = line.strip()
index 1168a6086cacdb905cd5de5309732e6ebcf95697..7e7678f571095ba3bce18e11f50054c8bf54c645 100644 (file)
@@ -39,7 +39,7 @@ CONF.import_opt("image_conversion_dir", "cinder.image.image_utils")
 
 
 class SheepdogDriver(driver.VolumeDriver):
-    """Executes commands relating to Sheepdog Volumes"""
+    """Executes commands relating to Sheepdog Volumes."""
 
     VERSION = "1.0.0"
 
@@ -49,7 +49,7 @@ class SheepdogDriver(driver.VolumeDriver):
         self._stats = {}
 
     def check_for_setup_error(self):
-        """Returns an error if prerequisites aren't met"""
+        """Return error if prerequisites aren't met."""
         try:
             #NOTE(francois-charlier) Since 0.24 'collie cluster info -r'
             #  gives short output, but for compatibility reason we won't
@@ -68,20 +68,20 @@ class SheepdogDriver(driver.VolumeDriver):
         raise NotImplementedError()
 
     def create_volume(self, volume):
-        """Creates a sheepdog volume"""
+        """Create a sheepdog volume."""
         self._try_execute('qemu-img', 'create',
                           "sheepdog:%s" % volume['name'],
                           '%sG' % volume['size'])
 
     def create_volume_from_snapshot(self, volume, snapshot):
-        """Creates a sheepdog volume from a snapshot."""
+        """Create a sheepdog volume from a snapshot."""
         self._try_execute('qemu-img', 'create', '-b',
                           "sheepdog:%s:%s" % (snapshot['volume_name'],
                                               snapshot['name']),
                           "sheepdog:%s" % volume['name'])
 
     def delete_volume(self, volume):
-        """Deletes a logical volume"""
+        """Delete a logical volume."""
         self._delete(volume)
 
     def _ensure_dir_exists(self, tmp_dir):
@@ -117,12 +117,12 @@ class SheepdogDriver(driver.VolumeDriver):
             self._resize(volume)
 
     def create_snapshot(self, snapshot):
-        """Creates a sheepdog snapshot"""
+        """Create a sheepdog snapshot."""
         self._try_execute('qemu-img', 'snapshot', '-c', snapshot['name'],
                           "sheepdog:%s" % snapshot['volume_name'])
 
     def delete_snapshot(self, snapshot):
-        """Deletes a sheepdog snapshot"""
+        """Delete a sheepdog snapshot."""
         self._try_execute('collie', 'vdi', 'delete', snapshot['volume_name'],
                           '-s', snapshot['name'])
 
@@ -130,15 +130,15 @@ class SheepdogDriver(driver.VolumeDriver):
         return "sheepdog:%s" % volume['name']
 
     def ensure_export(self, context, volume):
-        """Safely and synchronously recreates an export for a logical volume"""
+        """Safely and synchronously recreate an export for a logical volume."""
         pass
 
     def create_export(self, context, volume):
-        """Exports the volume"""
+        """Export a volume."""
         pass
 
     def remove_export(self, context, volume):
-        """Removes an export for a logical volume"""
+        """Remove an export for a logical volume."""
         pass
 
     def initialize_connection(self, volume, connector):
index cca77b9d573bafcbc3cadb48f0a9206c34dea784..9900c47ec83757216ecadbc2dcf9e1b33d400018 100644 (file)
@@ -1809,7 +1809,7 @@ class StorwizeSVCDriver(san.SanDriver):
 
 
 class CLIResponse(object):
-    '''Parse SVC CLI output and generate iterable'''
+    '''Parse SVC CLI output and generate iterable.'''
 
     def __init__(self, raw, delim='!', with_header=True):
         super(CLIResponse, self).__init__()
index b174ce04c4470c46c3bfb0588b2f9612e37883b7..2428d533b7c55d67a38d318464d9f73ec45869c0 100644 (file)
@@ -304,7 +304,7 @@ class VMwareHTTPReadVmdk(VMwareHTTPFile):
         VMwareHTTPFile.__init__(self, conn)
 
     def read(self, chunk_size):
-        """Read a chunk from file"""
+        """Read a chunk from file."""
         self._progress += READ_CHUNKSIZE
         LOG.debug(_("Read %s bytes from vmdk.") % self._progress)
         return self.file_handle.read(READ_CHUNKSIZE)
index 938ac08f20f5e9ddafc1344231d4a6b9e4796c2c..caa64816ce7a2cbdef0ca16fb07bf9e80125c25b 100644 (file)
@@ -131,7 +131,7 @@ class WindowsUtils(object):
             raise exception.VolumeBackendAPIException(data=err_msg)
 
     def create_volume(self, vhd_path, vol_name, vol_size):
-        """Creates a volume"""
+        """Creates a volume."""
         try:
             cl = self._conn_wmi.__getattr__("WT_Disk")
             cl.NewWTDisk(DevicePath=vhd_path,
@@ -247,7 +247,7 @@ class WindowsUtils(object):
             raise exception.VolumeBackendAPIException(data=err_msg)
 
     def add_disk_to_target(self, vol_name, target_name):
-        """Adds the disk to the target"""
+        """Adds the disk to the target."""
         try:
             q = self._conn_wmi.WT_Disk(Description=vol_name)
             wt_disk = q[0]
index f19d48054c9f7f7b1fc06ea7c50aa8217ea13ca0..463cb1d1d1ddb882f68335e938c000017330296f 100644 (file)
@@ -125,7 +125,7 @@ class XenAPINFSDriver(driver.VolumeDriver):
         pass
 
     def check_for_setup_error(self):
-        """To override superclass' method"""
+        """To override superclass' method."""
 
     def create_volume_from_snapshot(self, volume, snapshot):
         return self._copy_volume(
index 7f3a6efa28a8655aff0e73831d2a40dd45cf703a..fec3f18148b7735fbef798fa72cfb0c3a36748ef 100644 (file)
@@ -997,7 +997,7 @@ class ExtractSchedulerSpecTask(base.CinderTask):
 
 
 class ExtractVolumeRefTask(base.CinderTask):
-    """Extracts volume reference for given volume id. """
+    """Extracts volume reference for given volume id."""
 
     default_provides = 'volume_ref'
 
@@ -1273,7 +1273,7 @@ class CreateVolumeFromSpecTask(base.CinderTask):
 
     def _copy_image_to_volume(self, context, volume_ref,
                               image_id, image_location, image_service):
-        """Downloads Glance image to the specified volume. """
+        """Downloads Glance image to the specified volume."""
         copy_image_to_volume = self.driver.copy_image_to_volume
         volume_id = volume_ref['id']
         LOG.debug(_("Attempting download of %(image_id)s (%(image_location)s)"
index 88b6db220c861145918ab7b3c84a8f407c6dbbb6..626e6aa1c1cc27deba086daeb2617f984d560e05 100644 (file)
@@ -537,7 +537,7 @@ class VolumeManager(manager.SchedulerDependentManager):
     @utils.require_driver_initialized
     def attach_volume(self, context, volume_id, instance_uuid, host_name,
                       mountpoint, mode):
-        """Updates db to show volume is attached"""
+        """Updates db to show volume is attached."""
         @utils.synchronized(volume_id, external=True)
         def do_attach():
             # check the volume status before attaching
@@ -612,7 +612,7 @@ class VolumeManager(manager.SchedulerDependentManager):
 
     @utils.require_driver_initialized
     def detach_volume(self, context, volume_id):
-        """Updates db to show volume is detached"""
+        """Updates db to show volume is detached."""
         # TODO(vish): refactor this into a more general "unreserve"
         # TODO(sleepsonthefloor): Is this 'elevated' appropriate?
 
diff --git a/tox.ini b/tox.ini
index 9ce875eed583940fa998950722bf9c2d58ec05f7..d69583058787a222f983d0a989f9e0437654686b 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -43,6 +43,6 @@ commands =
 commands = {posargs}
 
 [flake8]
-ignore = E711,E712,F401,F403,F841,H302,H303,H304,H402,H803
+ignore = E711,E712,F401,F403,F841,H302,H303,H304,H803
 builtins = _
 exclude = .git,.venv,.tox,dist,doc,common,*egg,build