diff --git a/glance/common/location_strategy/store_type.py b/glance/common/location_strategy/store_type.py index a6189611ab..5ae87fb25b 100644 --- a/glance/common/location_strategy/store_type.py +++ b/glance/common/location_strategy/store_type.py @@ -75,19 +75,19 @@ def get_ordered_locations(locations, uri_key='url', **kwargs): """ def _foreach_store_type_preference(): store_types = CONF.store_type_location_strategy.store_type_preference - for prefered_store in store_types: - prefered_store = str(prefered_store).strip() - if not prefered_store: + for preferred_store in store_types: + preferred_store = str(preferred_store).strip() + if not preferred_store: continue - yield prefered_store + yield preferred_store if not locations: return locations preferences = {} others = [] - for prefered_store in _foreach_store_type_preference(): - preferences[prefered_store] = [] + for preferred_store in _foreach_store_type_preference(): + preferences[preferred_store] = [] for location in locations: uri = location.get(uri_key) @@ -109,8 +109,8 @@ def get_ordered_locations(locations, uri_key='url', **kwargs): ret = [] # NOTE(zhiyan): While configuration again since py26 does not support # ordereddict container. - for prefered_store in _foreach_store_type_preference(): - ret.extend(preferences[prefered_store]) + for preferred_store in _foreach_store_type_preference(): + ret.extend(preferences[preferred_store]) ret.extend(others) diff --git a/glance/common/property_utils.py b/glance/common/property_utils.py index bc7e57fbd6..e1a4fe5026 100644 --- a/glance/common/property_utils.py +++ b/glance/common/property_utils.py @@ -45,7 +45,7 @@ CONF = cfg.CONF CONF.register_opts(property_opts) # NOTE (spredzy): Due to the particularly lengthy name of the exception -# and the number of occurence it is raise in this file, a variable is +# and the number of occurrence it is raise in this file, a variable is # created InvalidPropProtectConf = exception.InvalidPropertyProtectionConfiguration diff --git a/glance/store/filesystem.py b/glance/store/filesystem.py index 419df13466..6e0ecf3d86 100644 --- a/glance/store/filesystem.py +++ b/glance/store/filesystem.py @@ -369,7 +369,7 @@ class Store(glance.store.base.Store): :image_size size of image being uploaded. :returns best_datadir as directory path of the best priority datadir. :raises exception.StorageFull if there is no datadir in - self.priority_data_map that can accomodate the image. + self.priority_data_map that can accommodate the image. """ if not self.multiple_datadirs: return self.datadir @@ -383,7 +383,7 @@ class Store(glance.store.base.Store): max_free_space = free_space best_datadir = datadir - # If datadir is found which can accomodate image and has maximum + # If datadir is found which can accommodate image and has maximum # free space for the given priority then break the loop, # else continue to lookup further. if best_datadir: diff --git a/glance/tests/functional/db/base.py b/glance/tests/functional/db/base.py index c0e976042b..92ce6313b1 100644 --- a/glance/tests/functional/db/base.py +++ b/glance/tests/functional/db/base.py @@ -933,7 +933,7 @@ class DriverTests(object): actual = self.db_api.image_tag_get_all(self.context, UUID1) self.assertEqual([], actual) - def test_image_tag_get_all_non_existant_image(self): + def test_image_tag_get_all_non_existent_image(self): bad_image_id = str(uuid.uuid4()) actual = self.db_api.image_tag_get_all(self.context, bad_image_id) self.assertEqual([], actual)