Bump hacking
hackihg 3.0.x is too old. Change-Id: I9d0d19bc6ecf4cb934cce77ce25e89882202dbd6
This commit is contained in:
parent
5f2835fcf0
commit
7ddca13fcb
@ -172,8 +172,8 @@ def schema_args(schema_getter, omit=None):
|
|||||||
return _decorator
|
return _decorator
|
||||||
|
|
||||||
|
|
||||||
def pretty_choice_list(l):
|
def pretty_choice_list(choices):
|
||||||
return ', '.join("'%s'" % i for i in l)
|
return ', '.join("'%s'" % choice for choice in choices)
|
||||||
|
|
||||||
|
|
||||||
def has_version(client, version):
|
def has_version(client, version):
|
||||||
|
@ -57,5 +57,5 @@ class HttpHeadersTest(base.ClientTestBase):
|
|||||||
image = glanceclient.glance.images.update(image.id,
|
image = glanceclient.glance.images.update(image.id,
|
||||||
disk_format="qcow2")
|
disk_format="qcow2")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.assertFalse("415 Unsupported Media Type" in e.details)
|
self.assertNotIn("415 Unsupported Media Type", e.details)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
@ -242,7 +242,7 @@ class TestUtils(testtools.TestCase):
|
|||||||
# Regression test for bug 1461678.
|
# Regression test for bug 1461678.
|
||||||
def _iterate(i):
|
def _iterate(i):
|
||||||
for chunk in i:
|
for chunk in i:
|
||||||
raise(IOError)
|
raise IOError()
|
||||||
|
|
||||||
data = io.StringIO('somestring')
|
data = io.StringIO('somestring')
|
||||||
data.close = mock.Mock()
|
data.close = mock.Mock()
|
||||||
|
@ -1468,7 +1468,7 @@ class TestController(testtools.TestCase):
|
|||||||
headers = {'x-openstack-request-id': 'req-1234'}
|
headers = {'x-openstack-request-id': 'req-1234'}
|
||||||
fixture_idx = '/v2/images/%s' % (image_id)
|
fixture_idx = '/v2/images/%s' % (image_id)
|
||||||
orig_locations = data_fixtures[fixture_idx]['GET'][1]['locations']
|
orig_locations = data_fixtures[fixture_idx]['GET'][1]['locations']
|
||||||
loc_map = dict([(l['url'], l) for l in orig_locations])
|
loc_map = dict([(loc['url'], loc) for loc in orig_locations])
|
||||||
loc_map[new_loc['url']] = new_loc
|
loc_map[new_loc['url']] = new_loc
|
||||||
mod_patch = [{'path': '/locations', 'op': 'replace',
|
mod_patch = [{'path': '/locations', 'op': 'replace',
|
||||||
'value': list(loc_map.values())}]
|
'value': list(loc_map.values())}]
|
||||||
|
@ -61,7 +61,7 @@ _SCHEMA = schemas.Schema({
|
|||||||
|
|
||||||
def compare_json_patches(a, b):
|
def compare_json_patches(a, b):
|
||||||
"""Return 0 if a and b describe the same JSON patch."""
|
"""Return 0 if a and b describe the same JSON patch."""
|
||||||
return(jsonpatch.JsonPatch.from_string(a) ==
|
return (jsonpatch.JsonPatch.from_string(a) ==
|
||||||
jsonpatch.JsonPatch.from_string(b))
|
jsonpatch.JsonPatch.from_string(b))
|
||||||
|
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ class Controller(object):
|
|||||||
:returns: None
|
:returns: None
|
||||||
"""
|
"""
|
||||||
image = self._get_image_with_locations_or_fail(image_id)
|
image = self._get_image_with_locations_or_fail(image_id)
|
||||||
current_urls = [l['url'] for l in image.locations]
|
current_urls = [loc['url'] for loc in image.locations]
|
||||||
|
|
||||||
missing_locs = url_set.difference(set(current_urls))
|
missing_locs = url_set.difference(set(current_urls))
|
||||||
if missing_locs:
|
if missing_locs:
|
||||||
@ -541,7 +541,7 @@ class Controller(object):
|
|||||||
:returns: The updated image
|
:returns: The updated image
|
||||||
"""
|
"""
|
||||||
image = self._get_image_with_locations_or_fail(image_id)
|
image = self._get_image_with_locations_or_fail(image_id)
|
||||||
url_map = dict([(l['url'], l) for l in image.locations])
|
url_map = dict([(loc['url'], loc) for loc in image.locations])
|
||||||
if url not in url_map:
|
if url not in url_map:
|
||||||
raise exc.HTTPNotFound('Unknown URL: %s, the URL must be one of'
|
raise exc.HTTPNotFound('Unknown URL: %s, the URL must be one of'
|
||||||
' existing locations of current image' %
|
' existing locations of current image' %
|
||||||
|
@ -526,6 +526,7 @@ def do_member_get(gc, args):
|
|||||||
member = gc.image_members.get(args.image_id, args.member_id)
|
member = gc.image_members.get(args.image_id, args.member_id)
|
||||||
utils.print_dict(member)
|
utils.print_dict(member)
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('image_id', metavar='<IMAGE_ID>',
|
@utils.arg('image_id', metavar='<IMAGE_ID>',
|
||||||
help=_('Image from which to remove member.'))
|
help=_('Image from which to remove member.'))
|
||||||
@utils.arg('member_id', metavar='<MEMBER_ID>',
|
@utils.arg('member_id', metavar='<MEMBER_ID>',
|
||||||
@ -596,6 +597,7 @@ def do_import_info(gc, args):
|
|||||||
else:
|
else:
|
||||||
utils.print_dict(import_info)
|
utils.print_dict(import_info)
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('--detail', default=False, action='store_true',
|
@utils.arg('--detail', default=False, action='store_true',
|
||||||
help='Shows details of stores. Admin only.')
|
help='Shows details of stores. Admin only.')
|
||||||
def do_stores_info(gc, args):
|
def do_stores_info(gc, args):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
os-client-config>=1.28.0 # Apache-2.0
|
os-client-config>=1.28.0 # Apache-2.0
|
||||||
stestr>=2.0.0 # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user