Incorrect version for hacking package on stable/kilo

python-cinderclient should follow global requirements because
we have hacking>=0.10.0,<0.11 in global requirements and
hacking>=0.8.0,<0.9 in python-cinderclient in stable/kilo.
It causes issues with packaging and conflicts in stable/kilo env.
It updates from global-requirements change:
I3e0e288974d6497481d6ea2d1b1a74b0cebe3ec7

Closes-Bug: #1475654
Change-Id: Ia7e5cae5e32f68c8552e16755ec139488d893c27
This commit is contained in:
Yuriy Nesenenko
2015-07-20 16:00:01 +03:00
parent b44d32d02b
commit 762ea63aeb
11 changed files with 52 additions and 48 deletions

View File

@@ -160,8 +160,9 @@ class OpenStackCinderShell(object):
parser.add_argument('--endpoint-type',
metavar='<endpoint-type>',
default=utils.env('CINDER_ENDPOINT_TYPE',
default=DEFAULT_CINDER_ENDPOINT_TYPE),
default=utils.env(
'CINDER_ENDPOINT_TYPE',
default=DEFAULT_CINDER_ENDPOINT_TYPE),
help='Endpoint type, which is publicURL or '
'internalURL. '
'Default=nova env[CINDER_ENDPOINT_TYPE] or '

View File

@@ -448,19 +448,22 @@ class FakeHTTPClient(base_client.HTTPClient):
'extra_specs': {}}]})
def get_types_1(self, **kw):
return (200, {}, {'volume_type': {'id': 1,
'name': 'test-type-1',
'extra_specs': {}}})
return (200, {}, {
'volume_type': {'id': 1,
'name': 'test-type-1',
'extra_specs': {}}})
def get_types_2(self, **kw):
return (200, {}, {'volume_type': {'id': 2,
'name': 'test-type-2',
'extra_specs': {}}})
return (200, {}, {
'volume_type': {'id': 2,
'name': 'test-type-2',
'extra_specs': {}}})
def post_types(self, body, **kw):
return (202, {}, {'volume_type': {'id': 3,
'name': 'test-type-3',
'extra_specs': {}}})
return (202, {}, {
'volume_type': {'id': 3,
'name': 'test-type-3',
'extra_specs': {}}})
def post_types_1_extra_specs(self, body, **kw):
assert list(body) == ['extra_specs']
@@ -721,8 +724,8 @@ class FakeHTTPClient(base_client.HTTPClient):
def put_os_services_disable_log_reason(self, body, **kw):
return (200, {}, {'host': body['host'], 'binary': body['binary'],
'status': 'disabled',
'disabled_reason': body['disabled_reason']})
'status': 'disabled',
'disabled_reason': body['disabled_reason']})
def get_os_availability_zone(self, **kw):
return (200, {}, {
@@ -737,7 +740,7 @@ class FakeHTTPClient(base_client.HTTPClient):
"zoneState": {"available": False},
"hosts": None,
},
]
]
})
def get_os_availability_zone_detail(self, **kw):
@@ -776,7 +779,7 @@ class FakeHTTPClient(base_client.HTTPClient):
"zoneState": {"available": False},
"hosts": None,
},
]
]
})
def post_snapshots_1234_metadata(self, **kw):

View File

@@ -79,7 +79,7 @@ class ShellTest(utils.TestCase):
def test_extract_metadata(self):
# mimic the result of argparse's parse_args() method
class Arguments:
class Arguments(object):
def __init__(self, metadata=[]):
self.metadata = metadata
@@ -102,8 +102,8 @@ class ShellTest(utils.TestCase):
v = cs.volumes.list()[0]
setattr(v, 'os-vol-tenant-attr:tenant_id', 'fake_tenant')
setattr(v, '_info', {'attachments': [{'server_id': 1234}],
'id': 1234, 'name': 'sample-volume',
'os-vol-tenant-attr:tenant_id': 'fake_tenant'})
'id': 1234, 'name': 'sample-volume',
'os-vol-tenant-attr:tenant_id': 'fake_tenant'})
shell_v1._translate_volume_keys([v])
self.assertEqual(v.tenant_id, 'fake_tenant')

View File

@@ -530,19 +530,22 @@ class FakeHTTPClient(base_client.HTTPClient):
'extra_specs': {}}]})
def get_types_1(self, **kw):
return (200, {}, {'volume_type': {'id': 1,
'name': 'test-type-1',
'extra_specs': {}}})
return (200, {}, {
'volume_type': {'id': 1,
'name': 'test-type-1',
'extra_specs': {}}})
def get_types_2(self, **kw):
return (200, {}, {'volume_type': {'id': 2,
'name': 'test-type-2',
'extra_specs': {}}})
return (200, {}, {
'volume_type': {'id': 2,
'name': 'test-type-2',
'extra_specs': {}}})
def post_types(self, body, **kw):
return (202, {}, {'volume_type': {'id': 3,
'name': 'test-type-3',
'extra_specs': {}}})
return (202, {}, {
'volume_type': {'id': 3,
'name': 'test-type-3',
'extra_specs': {}}})
def post_types_1_extra_specs(self, body, **kw):
assert list(body) == ['extra_specs']
@@ -825,8 +828,8 @@ class FakeHTTPClient(base_client.HTTPClient):
def put_os_services_disable_log_reason(self, body, **kw):
return (200, {}, {'host': body['host'], 'binary': body['binary'],
'status': 'disabled',
'disabled_reason': body['disabled_reason']})
'status': 'disabled',
'disabled_reason': body['disabled_reason']})
def get_os_availability_zone(self, **kw):
return (200, {}, {
@@ -841,7 +844,7 @@ class FakeHTTPClient(base_client.HTTPClient):
"zoneState": {"available": False},
"hosts": None,
},
]
]
})
def get_os_availability_zone_detail(self, **kw):
@@ -880,7 +883,7 @@ class FakeHTTPClient(base_client.HTTPClient):
"zoneState": {"available": False},
"hosts": None,
},
]
]
})
def post_snapshots_1234_metadata(self, **kw):

View File

@@ -68,8 +68,7 @@ class VolumeType(base.Resource):
resp = None
for k in keys:
resp = self.manager._delete(
"/types/%s/extra_specs/%s" % (
base.getid(self), k))
"/types/%s/extra_specs/%s" % (base.getid(self), k))
if resp is not None:
return resp

View File

@@ -361,9 +361,9 @@ class VolumeManager(base.ManagerWithFind):
return self._action('os-volume_upload_image',
volume,
{'force': force,
'image_name': image_name,
'container_format': container_format,
'disk_format': disk_format})
'image_name': image_name,
'container_format': container_format,
'disk_format': disk_format})
def force_delete(self, volume):
return self._action('os-force_delete', base.getid(volume))

View File

@@ -331,7 +331,7 @@ def do_create(cs, args):
if args.metadata is not None:
volume_metadata = _extract_metadata(args)
#NOTE(N.S.): take this piece from novaclient
# NOTE(N.S.): take this piece from novaclient
hints = {}
if args.scheduler_hints:
for hint in args.scheduler_hints:
@@ -344,7 +344,7 @@ def do_create(cs, args):
hints[key] += [value]
else:
hints[key] = value
#NOTE(N.S.): end of taken piece
# NOTE(N.S.): end of taken piece
volume = cs.volumes.create(args.size,
args.consisgroup_id,
@@ -649,9 +649,8 @@ def do_snapshot_rename(cs, args):
@utils.arg('--state', metavar='<state>',
default='available',
help=('The state to assign to the snapshot. Valid values are '
'"available," "error," "creating," "deleting," and '
'"error_deleting." '
'Default is "available."'))
'"available," "error," "creating," "deleting," and '
'"error_deleting." Default is "available."'))
@utils.service_type('volumev2')
def do_snapshot_reset_state(cs, args):
"""Explicitly updates the snapshot state."""

View File

@@ -60,8 +60,7 @@ class VolumeType(base.Resource):
# and return if there's an error
for k in keys:
resp = self.manager._delete(
"/types/%s/extra_specs/%s" % (
base.getid(self), k))
"/types/%s/extra_specs/%s" % (base.getid(self), k))
if resp is not None:
return resp

View File

@@ -411,9 +411,9 @@ class VolumeManager(base.ManagerWithFind):
return self._action('os-volume_upload_image',
volume,
{'force': force,
'image_name': image_name,
'container_format': container_format,
'disk_format': disk_format})
'image_name': image_name,
'container_format': container_format,
'disk_format': disk_format})
def force_delete(self, volume):
return self._action('os-force_delete', base.getid(volume))

View File

@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8
hacking<0.9,>=0.8.0
hacking>=0.10.0,<0.11
coverage>=3.6
discover
fixtures>=0.3.14

View File

@@ -31,5 +31,5 @@ downloadcache = ~/cache/pip
[flake8]
show-source = True
ignore = F811,F821,H302,H306,H404
ignore = F811,F821,H302,H306,H404,H405
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools