Skip to content

Commit f85896a

Browse files
author
Ghanshyam Mann
committed
[goal] Migrate python-cinderclient jobs to focal
As per victoria cycle testing runtime and community goal[1] we need to migrate upstream CI/CD to Ubuntu Focal(20.04). Fixing: - bug#1886298 Bump the lower constraints for required deps which added python3.8 support in their later version. - pep8 error - Set bionic nodeset for py36 and py37 job. [1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-fo$ Story: #2007865 Task: #40179 Change-Id: Ibab96807a7747738282732fe0069b9bc197da0ee
1 parent 92f700f commit f85896a

9 files changed

Lines changed: 23 additions & 19 deletions

File tree

.zuul.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- job:
1717
name: python-cinderclient-functional-py36
1818
parent: python-cinderclient-functional-base
19+
nodeset: openstack-single-node-bionic
1920
vars:
2021
python_version: 3.6
2122
tox_envlist: functional-py36

cinderclient/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
from oslo_utils import encodeutils
3434
from oslo_utils import importutils
3535
from oslo_utils import strutils
36-
try:
37-
osprofiler_web = importutils.try_import("osprofiler.web")
38-
except Exception:
39-
pass
4036
import requests
4137
from six.moves import urllib
4238
import six.moves.urllib.parse as urlparse
@@ -56,6 +52,12 @@
5652
except ImportError:
5753
import simplejson as json
5854

55+
try:
56+
osprofiler_web = importutils.try_import("osprofiler.web")
57+
except Exception:
58+
pass
59+
60+
5961
_VALID_VERSIONS = ['v2', 'v3']
6062
V3_SERVICE_TYPE = 'volumev3'
6163
V2_SERVICE_TYPE = 'volumev2'

cinderclient/shell.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
from keystoneauth1 import session
3232
from oslo_utils import encodeutils
3333
from oslo_utils import importutils
34-
try:
35-
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
36-
except Exception:
37-
pass
3834
import requests
3935
import six
4036
import six.moves.urllib.parse as urlparse
@@ -46,6 +42,11 @@
4642
from cinderclient import exceptions as exc
4743
from cinderclient import utils
4844

45+
try:
46+
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
47+
except Exception:
48+
pass
49+
4950

5051
DEFAULT_MAJOR_OS_VOLUME_API_VERSION = "3"
5152
DEFAULT_CINDER_ENDPOINT_TYPE = 'publicURL'

cinderclient/tests/unit/fake_actions_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def do_fake_action():
2727

2828

2929
@api_versions.wraps("3.2", "3.3") # noqa: F811
30-
def do_fake_action():
30+
def do_fake_action(): # noqa
3131
return "fake_action 3.2 to 3.3"
3232

3333

cinderclient/tests/unit/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def return_api_version(self):
7272
return '3.1'
7373

7474
@api_versions.wraps('3.2') # noqa: F811
75-
def return_api_version(self):
75+
def return_api_version(self): # noqa
7676
return '3.2'
7777

7878

cinderclient/v3/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def list(self, **kwargs):
5252
return self._list(url, resource_type)
5353

5454
@api_versions.wraps('3.5') # noqa: F811
55-
def list(self, search_opts=None, marker=None, limit=None, sort=None):
55+
def list(self, search_opts=None, marker=None, limit=None, sort=None): # noqa
5656
"""Lists all messages.
5757
5858
:param search_opts: Search options to filter out volumes.

cinderclient/v3/volume_backups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def create(self, volume_id, container=None,
6161
incremental, force, snapshot_id)
6262

6363
@api_versions.wraps("3.43") # noqa: F811
64-
def create(self, volume_id, container=None,
64+
def create(self, volume_id, container=None, # noqa
6565
name=None, description=None,
6666
incremental=False, force=False,
6767
snapshot_id=None,
@@ -85,7 +85,7 @@ def create(self, volume_id, container=None,
8585
incremental, force, snapshot_id, metadata)
8686

8787
@api_versions.wraps("3.51") # noqa: F811
88-
def create(self, volume_id, container=None, name=None, description=None,
88+
def create(self, volume_id, container=None, name=None, description=None, # noqa
8989
incremental=False, force=False, snapshot_id=None, metadata=None,
9090
availability_zone=None):
9191
return self._create_backup(volume_id, container, name, description,

cinderclient/v3/volumes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def delete_metadata(self, volume, keys):
160160
return common_base.ListWithMeta([], response_list)
161161

162162
@api_versions.wraps("3.15") # noqa: F811
163-
def delete_metadata(self, volume, keys):
163+
def delete_metadata(self, volume, keys): # noqa
164164
"""Delete specified keys from volumes metadata.
165165
166166
:param volume: The :class:`Volume`.
@@ -191,7 +191,7 @@ def upload_to_image(self, volume, force, image_name, container_format,
191191
'disk_format': disk_format})
192192

193193
@api_versions.wraps("3.1") # noqa: F811
194-
def upload_to_image(self, volume, force, image_name, container_format,
194+
def upload_to_image(self, volume, force, image_name, container_format, # noqa
195195
disk_format, visibility, protected):
196196
"""Upload volume to image service as image.
197197
:param volume: The :class:`Volume` to upload.
@@ -265,7 +265,7 @@ def get_pools(self, detail):
265265
return self._get('/scheduler-stats/get_pools%s' % query_string, None)
266266

267267
@api_versions.wraps("3.33") # noqa: F811
268-
def get_pools(self, detail, search_opts):
268+
def get_pools(self, detail, search_opts): # noqa
269269
"""Show pool information for backends."""
270270
# pylint: disable=function-redefined
271271
options = {'detail': detail}

lower-constraints.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
asn1crypto==0.23.0
2-
cffi==1.7.0
2+
cffi==1.14.0
33
cliff==2.8.0
44
cmd2==0.8.0
55
coverage==4.0
6-
cryptography==2.1
6+
cryptography==2.7
77
ddt==1.0.1
88
debtcollector==1.2.0
99
extras==1.0.0
@@ -39,7 +39,7 @@ python-dateutil==2.5.3
3939
python-mimeparse==1.6.0
4040
python-subunit==1.0.0
4141
pytz==2013.6
42-
PyYAML==3.12
42+
PyYAML==3.13
4343
reno==3.1.0
4444
requests-mock==1.2.0
4545
requests==2.14.2

0 commit comments

Comments
 (0)