diff --git a/doc/source/admin/apache-httpd.rst b/doc/source/admin/apache-httpd.rst index f6158b5411..4b03076e11 100644 --- a/doc/source/admin/apache-httpd.rst +++ b/doc/source/admin/apache-httpd.rst @@ -8,7 +8,7 @@ This exercise failed without ever having proper interest or resources to fix the underlying issues. None of the models deploying Glance as bare wsgi app under some httpd are -currently adviced. +currently advised. Since the Pike release Glance has packaged a wsgi script entrypoint that enables you to run it with a real web server like Apache HTTPD or nginx. To diff --git a/doc/source/configuration/configuring.rst b/doc/source/configuration/configuring.rst index 79fcb9535d..5245fe9232 100644 --- a/doc/source/configuration/configuring.rst +++ b/doc/source/configuration/configuring.rst @@ -855,7 +855,7 @@ documentation for more information. ``cinder_store_auth_address`` are set. These options are useful to put image volumes into the internal service project in order to hide the volume from users, and to make the image - sharable among projects. + shareable among projects. ``cinder_store_password=PASSWORD`` Optional. Default: ``None`` diff --git a/doc/source/glossary.rst b/doc/source/glossary.rst index 1fe73aca54..7c09d617af 100644 --- a/doc/source/glossary.rst +++ b/doc/source/glossary.rst @@ -3766,7 +3766,7 @@ T token - An alpha-numeric string of text used to access OpenStack APIs + An alphanumeric string of text used to access OpenStack APIs and resources. token services diff --git a/glance/api/middleware/context.py b/glance/api/middleware/context.py index 1266381914..3e06ebfcec 100644 --- a/glance/api/middleware/context.py +++ b/glance/api/middleware/context.py @@ -29,7 +29,7 @@ context_opts = [ help=_(""" Allow limited access to unauthenticated users. -Assign a boolean to determine API access for unathenticated +Assign a boolean to determine API access for unauthenticated users. When set to False, the API cannot be accessed by unauthenticated users. When set to True, unauthenticated users can access the API with read-only privileges. This however only applies diff --git a/glance/api/policy.py b/glance/api/policy.py index 6f6bacc9a1..7a36ce78c7 100644 --- a/glance/api/policy.py +++ b/glance/api/policy.py @@ -51,7 +51,7 @@ class Enforcer(policy.Enforcer): deprecation warnings. """ super(Enforcer, self).__init__(CONF, use_conf=True, overwrite=False) - # NOTE(gmann): Explictly disable the warnings for policies + # NOTE(gmann): Explicitly disable the warnings for policies # changing their default check_str. For new RBAC, all the policy # defaults have been changed and warning for each policy started # filling the logs limit for various tool. diff --git a/glance/api/v2/image_members.py b/glance/api/v2/image_members.py index 25022e2fa9..e9757e1a36 100644 --- a/glance/api/v2/image_members.py +++ b/glance/api/v2/image_members.py @@ -334,7 +334,7 @@ class ImageMembersController(object): member_repo=member_repo) # NOTE(abhishekk): This will verify whether user has permission - # to delete iamge member or not. + # to delete image member or not. api_policy.MemberAPIPolicy( req.context, image, diff --git a/glance/async_/flows/api_image_import.py b/glance/async_/flows/api_image_import.py index fa362c8529..f31ee7112a 100644 --- a/glance/async_/flows/api_image_import.py +++ b/glance/async_/flows/api_image_import.py @@ -553,7 +553,7 @@ class _ImportToStore(task.Task): """ # NOTE(flaper87): Let's dance... and fall # - # Unfortunatelly, because of the way our domain layers work and + # Unfortunately, because of the way our domain layers work and # the checks done in the FS store, we can't simply rename the file # and set the location. To do that, we'd have to duplicate the logic # of every and each of the domain factories (quota, location, etc) @@ -607,7 +607,7 @@ class _ImportToStore(task.Task): set_active=self.set_active, callback=self._status_callback) # NOTE(yebinama): set_image_data catches Exception and raises from - # them. Can't be more specific on exceptions catched. + # them. Can't be more specific on exceptions caught. except Exception: if self.all_stores_must_succeed: raise diff --git a/glance/async_/flows/base_import.py b/glance/async_/flows/base_import.py index 11071d14c0..3f83b8bed4 100644 --- a/glance/async_/flows/base_import.py +++ b/glance/async_/flows/base_import.py @@ -289,7 +289,7 @@ class _ImportToStore(task.Task): # NOTE(flaper87): Let's dance... and fall # - # Unfortunatelly, because of the way our domain layers work and + # Unfortunately, because of the way our domain layers work and # the checks done in the FS store, we can't simply rename the file # and set the location. To do that, we'd have to duplicate the logic # of every and each of the domain factories (quota, location, etc) diff --git a/glance/cmd/cache_cleaner.py b/glance/cmd/cache_cleaner.py index 3e304495b2..7ea7778449 100644 --- a/glance/cmd/cache_cleaner.py +++ b/glance/cmd/cache_cleaner.py @@ -22,7 +22,7 @@ This is meant to be run as a periodic task from cron. If something goes wrong while we're caching an image (for example the fetch times out, or an exception is raised), we create an 'invalid' entry. These -entires are left around for debugging purposes. However, after some period of +entries are left around for debugging purposes. However, after some period of time, we want to clean these up. Also, if an incomplete image hangs around past the image_cache_stall_time diff --git a/glance/common/config.py b/glance/common/config.py index 401751712c..5f7a02f4ca 100644 --- a/glance/common/config.py +++ b/glance/common/config.py @@ -37,7 +37,7 @@ paste_deploy_opts = [ Deployment flavor to use in the server application pipeline. Provide a string value representing the appropriate deployment -flavor used in the server application pipleline. This is typically +flavor used in the server application pipeline. This is typically the partial name of a pipeline in the paste configuration file with the service name removed. @@ -58,7 +58,7 @@ Related Options: Name of the paste configuration file. Provide a string value representing the name of the paste -configuration file to use for configuring piplelines for +configuration file to use for configuring pipelines for server application deployments. NOTES: @@ -350,7 +350,7 @@ Related options: * location_strategy """)), - # NOTE(flaper87): The policy.yaml file should be updated and the locaiton + # NOTE(flaper87): The policy.yaml file should be updated and the location # related rules set to admin only once this option is finally removed. # NOTE(rosmaita): Unfortunately, this option is used to gate some code # paths; if the location related policies are set admin-only, then no diff --git a/glance/common/format_inspector.py b/glance/common/format_inspector.py index ace52efa53..fbd20273be 100755 --- a/glance/common/format_inspector.py +++ b/glance/common/format_inspector.py @@ -241,7 +241,7 @@ class QcowInspector(FileInspector): # The VHD (or VPC as QEMU calls it) format consists of a big-endian -# 512-byte "footer" at the beginning fo the file with various +# 512-byte "footer" at the beginning of the file with various # information, most of which does not matter to us: # # Dec Hex Name diff --git a/glance/common/scripts/utils.py b/glance/common/scripts/utils.py index 25e7fcffb6..d42e9df4e9 100644 --- a/glance/common/scripts/utils.py +++ b/glance/common/scripts/utils.py @@ -133,7 +133,7 @@ def get_image_data_iter(uri): # we are returning it as is. # The file descriptor will be eventually cleaned up by the garbage # collector once its ref-count is dropped to 0. That is, when there - # wont be any references pointing to this file. + # won't be any references pointing to this file. # # We're not using StringIO or other tools to avoid reading everything # into memory. Some images may be quite heavy. diff --git a/glance/common/swift_store_utils.py b/glance/common/swift_store_utils.py index a1eaf61bfc..6918d261f5 100644 --- a/glance/common/swift_store_utils.py +++ b/glance/common/swift_store_utils.py @@ -65,7 +65,7 @@ File containing the swift account(s) configurations. Include a string value representing the path to a configuration file that has references for each of the configured Swift account(s)/backing stores. By default, no file path is specified -and customized Swift referencing is diabled. Configuring this option +and customized Swift referencing is disabled. Configuring this option is highly recommended while using Swift storage backend for image storage as it helps avoid storage of credentials in the database. diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index 5fe3a39efc..8a6267f790 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -1154,7 +1154,7 @@ class Request(webob.Request): if not self.accept_language: return None langs = i18n.get_available_languages('glance') - # NOTE(rosmaita): give the webob lookup() function a sentinal value + # NOTE(rosmaita): give the webob lookup() function a sentinel value # for default so we can preserve the behavior of this function as # indicated by the current unit tests. See Launchpad bug #1765748. best_match = self.accept_language.lookup(langs, default='fake_LANG') diff --git a/glance/db/sqlalchemy/alembic_migrations/__init__.py b/glance/db/sqlalchemy/alembic_migrations/__init__.py index 66d4639b69..4a3453f004 100644 --- a/glance/db/sqlalchemy/alembic_migrations/__init__.py +++ b/glance/db/sqlalchemy/alembic_migrations/__init__.py @@ -35,7 +35,7 @@ def get_alembic_config(engine=None): # because that uses ConfigParser.set, which (by design) uses # *python* interpolation to write the string out ... where "%" is # the special python interpolation character! Avoid this - # mis-match by quoting all %'s for the set below. + # mismatch by quoting all %'s for the set below. quoted_engine_url = str(engine.url).replace('%', '%%') config.set_main_option('sqlalchemy.url', quoted_engine_url) return config diff --git a/glance/domain/__init__.py b/glance/domain/__init__.py index 5e72b8056e..3054088d72 100644 --- a/glance/domain/__init__.py +++ b/glance/domain/__init__.py @@ -259,7 +259,7 @@ class Image(object): if self.status == 'active': self.status = 'deactivated' elif self.status == 'deactivated': - # Noop if already deactive + # Noop if already deactivate pass else: LOG.debug("Not allowed to deactivate image in status '%s'", diff --git a/glance/image_cache/drivers/xattr.py b/glance/image_cache/drivers/xattr.py index a2e8af907d..6c24e49270 100644 --- a/glance/image_cache/drivers/xattr.py +++ b/glance/image_cache/drivers/xattr.py @@ -20,7 +20,7 @@ that has atimes set. Assumptions =========== -1. Cache data directory exists on a filesytem that updates atime on +1. Cache data directory exists on a filesystem that updates atime on reads ('noatime' should NOT be set) 2. Cache data directory exists on a filesystem that supports xattrs. diff --git a/glance/policies/base.py b/glance/policies/base.py index 4013341ec9..6cd9562173 100644 --- a/glance/policies/base.py +++ b/glance/policies/base.py @@ -55,7 +55,7 @@ PROJECT_READER_OR_PUBLIC_NAMESPACE = ( # These check strings do not support tenancy with the `admin` role. This means # anyone with the `admin` role on any project can execute a policy, which is # typical in OpenStack services. Eventually, these check strings will be -# superceded by check strings that implement scope checking and system-scope +# superseded by check strings that implement scope checking and system-scope # for applicable APIs (e.g., making an image public). But, we have a lot of # cleanup to do in different parts of glance to sweep all the authorization # code into a single layer before we can safely consume system-scope and diff --git a/glance/tests/functional/__init__.py b/glance/tests/functional/__init__.py index 3159316c93..c65455862e 100644 --- a/glance/tests/functional/__init__.py +++ b/glance/tests/functional/__init__.py @@ -797,7 +797,7 @@ class FunctionalTest(test_utils.BaseTestCase): self.api_protocol = 'http' self.api_port, api_sock = test_utils.get_unused_port_and_socket() # NOTE: Scrubber is enabled by default for the functional tests. - # Please disbale it by explicitly setting 'self.include_scrubber' to + # Please disable it by explicitly setting 'self.include_scrubber' to # False in the test SetUps that do not require Scrubber to run. self.include_scrubber = True @@ -1152,7 +1152,7 @@ class MultipleBackendFunctionalTest(test_utils.BaseTestCase): self.api_protocol = 'http' self.api_port, api_sock = test_utils.get_unused_port_and_socket() # NOTE: Scrubber is enabled by default for the functional tests. - # Please disbale it by explicitly setting 'self.include_scrubber' to + # Please disable it by explicitly setting 'self.include_scrubber' to # False in the test SetUps that do not require Scrubber to run. self.include_scrubber = True diff --git a/glance/tests/functional/db/migrations/test_ocata_migrate01.py b/glance/tests/functional/db/migrations/test_ocata_migrate01.py index a0bf586dfb..b141e5e64e 100644 --- a/glance/tests/functional/db/migrations/test_ocata_migrate01.py +++ b/glance/tests/functional/db/migrations/test_ocata_migrate01.py @@ -195,5 +195,5 @@ class TestOcataMigrate01_EmptyDBMySQL( test_fixtures.OpportunisticDBTestMixin, test_utils.BaseTestCase, ): - """This test runs the Ocata data migrations on an empty databse.""" + """This test runs the Ocata data migrations on an empty database.""" FIXTURE = test_fixtures.MySQLOpportunisticFixture diff --git a/glance/tests/functional/db/test_sqlalchemy.py b/glance/tests/functional/db/test_sqlalchemy.py index 381dba63f7..af84a7f505 100644 --- a/glance/tests/functional/db/test_sqlalchemy.py +++ b/glance/tests/functional/db/test_sqlalchemy.py @@ -274,7 +274,7 @@ class TestImageAtomicOps(base.TestDriver, """Create and delete properties on two images, then set on one. This tests that the resurrect-from-deleted mode of the method only - matchs deleted properties from our image. + matches deleted properties from our image. """ images = self.db_api.image_get_all(self.adm_context) diff --git a/glance/tests/functional/v2/test_images.py b/glance/tests/functional/v2/test_images.py index 6ad8cfdb64..65b905e3cd 100644 --- a/glance/tests/functional/v2/test_images.py +++ b/glance/tests/functional/v2/test_images.py @@ -1079,7 +1079,7 @@ class TestImages(functional.FunctionalTest): self.assertEqual(1, len(images)) self.assertEqual(image_id, images[0]['id']) - # Create another image wiht hidden true + # Create another image with hidden true path = self._url('/v2/images') headers = self._headers({'content-type': 'application/json'}) data = jsonutils.dumps({'name': 'image-2', 'type': 'kernel', diff --git a/glance/tests/test_hacking.py b/glance/tests/test_hacking.py index 0568014fea..53b3926bb7 100644 --- a/glance/tests/test_hacking.py +++ b/glance/tests/test_hacking.py @@ -27,7 +27,7 @@ class HackingTestCase(utils.BaseTestCase): def test_assert_equal_type(self): self.assertEqual(1, len(list(checks.assert_equal_type( - "self.assertEqual(type(als['QuicAssist']), list)")))) + "self.assertEqual(type(also['QuicAssist']), list)")))) self.assertEqual( 0, len(list(checks.assert_equal_type("self.assertTrue()")))) diff --git a/glance/tests/unit/api/test_cmd.py b/glance/tests/unit/api/test_cmd.py index 09ab4eff21..ecb0d16c8a 100644 --- a/glance/tests/unit/api/test_cmd.py +++ b/glance/tests/unit/api/test_cmd.py @@ -161,7 +161,7 @@ class TestGlanceApiCmd(test_utils.BaseTestCase): def test_fail_with_unknown_exception(self): with mock.patch('sys.stderr.write') as mock_stderr: with mock.patch('sys.exit') as mock_exit: - exc_msg = 'A Crazy Unkown Error.' + exc_msg = 'A Crazy Unknown Error.' exc = CrayCray(exc_msg) glance.cmd.api.fail(exc) mock_stderr.assert_called_once_with('ERROR: %s\n' % exc_msg) diff --git a/glance/tests/unit/test_image_cache.py b/glance/tests/unit/test_image_cache.py index c54afd41b0..dcc8f38518 100644 --- a/glance/tests/unit/test_image_cache.py +++ b/glance/tests/unit/test_image_cache.py @@ -313,8 +313,8 @@ class ImageCacheTestCase(object): """ Test to see if open_for_write works in a failure case for each driver This case is where an exception is raised while the file is being - written. The image is partially filled in cache and filling wont resume - so verify the image is moved to invalid/ directory + written. The image is partially filled in cache and filling won't + resume so verify the image is moved to invalid/ directory """ # test a case where an exception is raised while the file is open image_id = '1' @@ -390,7 +390,7 @@ class ImageCacheTestCase(object): """ Test to see if the caching iterator interacts properly with the driver in a case where the iterator is only partially consumed. In this case - the image is only partially filled in cache and filling wont resume. + the image is only partially filled in cache and filling won't resume. When the iterator goes out of scope the driver should have closed the image and moved it from incomplete/ to invalid/ """ diff --git a/glance/tests/unit/v2/test_images_resource.py b/glance/tests/unit/v2/test_images_resource.py index 77ce0135a8..81bcd0ea28 100644 --- a/glance/tests/unit/v2/test_images_resource.py +++ b/glance/tests/unit/v2/test_images_resource.py @@ -3670,7 +3670,7 @@ class TestImagesController(base.IsolatedUnitTest): created_at=DATETIME, updated_at=DATETIME, size=1024, virtual_size=3072, extra_properties={}) self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is still there + # Make sure the encryption key is still there key = self.controller._key_manager.get(request.context, fake_encryption_key) self.assertEqual(fake_encryption_key, key._id) @@ -3689,7 +3689,7 @@ class TestImagesController(base.IsolatedUnitTest): created_at=DATETIME, updated_at=DATETIME, size=1024, virtual_size=3072, extra_properties=props) self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is still there + # Make sure the encryption key is still there key = self.controller._key_manager.get(request.context, fake_encryption_key) self.assertEqual(fake_encryption_key, key._id) @@ -3709,7 +3709,7 @@ class TestImagesController(base.IsolatedUnitTest): created_at=DATETIME, updated_at=DATETIME, size=1024, virtual_size=3072, extra_properties=props) self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is still there + # Make sure the encryption key is still there key = self.controller._key_manager.get(request.context, fake_encryption_key) self.assertEqual(fake_encryption_key, key._id) @@ -3731,7 +3731,7 @@ class TestImagesController(base.IsolatedUnitTest): with mock.patch.object(self.controller._key_manager, 'delete', side_effect=castellan_exception.Forbidden): self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is still there + # Make sure the encryption key is still there key = self.controller._key_manager.get(request.context, fake_encryption_key) self.assertEqual(fake_encryption_key, key._id) @@ -3753,7 +3753,7 @@ class TestImagesController(base.IsolatedUnitTest): with mock.patch.object(self.controller._key_manager, 'delete', side_effect=castellan_exception.ManagedObjectNotFoundError): # noqa self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is still there + # Make sure the encryption key is still there key = self.controller._key_manager.get(request.context, fake_encryption_key) self.assertEqual(fake_encryption_key, key._id) @@ -3775,7 +3775,7 @@ class TestImagesController(base.IsolatedUnitTest): with mock.patch.object(self.controller._key_manager, 'delete', side_effect=castellan_exception.KeyManagerError): # noqa self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is still there + # Make sure the encryption key is still there key = self.controller._key_manager.get(request.context, fake_encryption_key) self.assertEqual(fake_encryption_key, key._id) @@ -3795,7 +3795,7 @@ class TestImagesController(base.IsolatedUnitTest): created_at=DATETIME, updated_at=DATETIME, size=1024, virtual_size=3072, extra_properties=props) self.controller._delete_encryption_key(request.context, image) - # Make sure the encrytion key is gone + # Make sure the encryption key is gone self.assertRaises(KeyError, self.controller._key_manager.get, request.context, fake_encryption_key) @@ -5147,7 +5147,7 @@ class TestImagesSerializer(test_utils.BaseTestCase): def test_index_forbidden_get_image_location(self): """Make sure the serializer works fine. - No mater if current user is authorized to get image location if the + No matter if current user is authorized to get image location if the show_multiple_locations is False. """ diff --git a/glance/tests/utils.py b/glance/tests/utils.py index 4289fa63de..181946b456 100644 --- a/glance/tests/utils.py +++ b/glance/tests/utils.py @@ -142,7 +142,7 @@ class BaseTestCase(testtools.TestCase): self._config_fixture.config(**kw) def mock_object(self, obj, attr_name, *args, **kwargs): - """"Use python mock to mock an object attirbute + """"Use python mock to mock an object attribute Mocks the specified objects attribute with the given value. Automatically performs 'addCleanup' for the mock.