Merge "Fix few typos in glance"
This commit is contained in:
commit
03cac7cf87
|
@ -380,7 +380,7 @@ class ImageTarget(object):
|
|||
def __init__(self, target):
|
||||
"""Initialize the object
|
||||
|
||||
:param target: Object being targetted
|
||||
:param target: Object being targeted
|
||||
"""
|
||||
self.target = target
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class ArtifactsPluginLoader(object):
|
|||
self.plugin_map = {'by_typename': {},
|
||||
'by_endpoint': {}}
|
||||
|
||||
def _add_extention(ext):
|
||||
def _add_extension(ext):
|
||||
"""
|
||||
Plugins can be loaded as entry_point=single plugin and
|
||||
entry_point=PLUGIN_LIST, where PLUGIN_LIST is a python variable
|
||||
|
@ -91,7 +91,7 @@ class ArtifactsPluginLoader(object):
|
|||
# but stevedore has awful exception wrapping with no specific class
|
||||
# for this very case (no extensions for given namespace found)
|
||||
try:
|
||||
self.mgr.map(_add_extention)
|
||||
self.mgr.map(_add_extension)
|
||||
except RuntimeError as re:
|
||||
LOG.error(_LE("Unable to load artifacts: %s") % re.message)
|
||||
|
||||
|
|
|
@ -569,8 +569,8 @@ paste.filter_factory = glance.tests.utils:FakeAuthMiddleware.factory
|
|||
art_updated = self._check_artifact_patch('/withprops/v1/%s'
|
||||
% art['id'], data=data)
|
||||
self.assertEqual([2, 12, 85, 0, 6, 7], art_updated['prop_list'])
|
||||
# an attempt to add an element to unexistant position should result in
|
||||
# 400
|
||||
# an attempt to add an element to nonexistent position should
|
||||
# result in 400
|
||||
self.assertEqual(6, len(art_updated['prop_list']))
|
||||
bad_index_data = [{'op': 'add', 'path': '/prop_list/11',
|
||||
'value': 42}]
|
||||
|
@ -1071,7 +1071,7 @@ paste.filter_factory = glance.tests.utils:FakeAuthMiddleware.factory
|
|||
data = {'name': 'an artifact',
|
||||
'version': '42'}
|
||||
art = self._create_artifact('withprops', data=data)
|
||||
# try to update non existant property
|
||||
# try to update nonexistent property
|
||||
upd = self._check_artifact_put(
|
||||
'/withprops/v1.0/%s/nosuchprop' % art['id'],
|
||||
data={'data': 'wont be set'}, status=400)
|
||||
|
@ -1110,7 +1110,7 @@ paste.filter_factory = glance.tests.utils:FakeAuthMiddleware.factory
|
|||
data={'data': 15}, status=200)
|
||||
self.assertEqual({'foo': 'some value', 'bar_list': [5, 15]},
|
||||
upd['dict_prop'])
|
||||
# try to attempt dict_property by non existant path
|
||||
# try to attempt dict_property by nonexistent path
|
||||
upd = self._check_artifact_post(
|
||||
'/withprops/v1.0/%s/dict_prop/bar_list/nosuchkey' % art['id'],
|
||||
data={'data': 15}, status=400)
|
||||
|
|
Loading…
Reference in New Issue