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