diff options
| author | Zuul <zuul@review.opendev.org> | 2020-09-04 02:45:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-09-04 02:45:47 +0000 |
| commit | 76f2b91d9add6113aa57829d8101647f0a5936d7 (patch) | |
| tree | 376692e07d977292bef2e216798be0f9fa7ae46c /cinderclient | |
| parent | 9dc1d61d3276d32b455340559ed574de27e29040 (diff) | |
| parent | f85896af2b044abc2c966f874414b38aae5b0d06 (diff) | |
| download | python-cinderclient-76f2b91d9add6113aa57829d8101647f0a5936d7.tar.gz | |
Merge "[goal] Migrate python-cinderclient jobs to focal"
Diffstat (limited to 'cinderclient')
| -rw-r--r-- | cinderclient/client.py | 10 | ||||
| -rw-r--r-- | cinderclient/shell.py | 9 | ||||
| -rw-r--r-- | cinderclient/tests/unit/fake_actions_module.py | 2 | ||||
| -rw-r--r-- | cinderclient/tests/unit/test_utils.py | 2 | ||||
| -rw-r--r-- | cinderclient/v3/messages.py | 2 | ||||
| -rw-r--r-- | cinderclient/v3/volume_backups.py | 4 | ||||
| -rw-r--r-- | cinderclient/v3/volumes.py | 6 |
7 files changed, 19 insertions, 16 deletions
diff --git a/cinderclient/client.py b/cinderclient/client.py index b013c1e..fdf1f36 100644 --- a/cinderclient/client.py +++ b/cinderclient/client.py @@ -33,10 +33,6 @@ from keystoneauth1.identity import base from oslo_utils import encodeutils from oslo_utils import importutils from oslo_utils import strutils -try: - osprofiler_web = importutils.try_import("osprofiler.web") -except Exception: - pass import requests from six.moves import urllib import six.moves.urllib.parse as urlparse @@ -56,6 +52,12 @@ try: except ImportError: import simplejson as json +try: + osprofiler_web = importutils.try_import("osprofiler.web") +except Exception: + pass + + _VALID_VERSIONS = ['v2', 'v3'] V3_SERVICE_TYPE = 'volumev3' V2_SERVICE_TYPE = 'volumev2' diff --git a/cinderclient/shell.py b/cinderclient/shell.py index 7722556..cfd4e82 100644 --- a/cinderclient/shell.py +++ b/cinderclient/shell.py @@ -31,10 +31,6 @@ from keystoneauth1 import loading from keystoneauth1 import session from oslo_utils import encodeutils from oslo_utils import importutils -try: - osprofiler_profiler = importutils.try_import("osprofiler.profiler") -except Exception: - pass import requests import six import six.moves.urllib.parse as urlparse @@ -46,6 +42,11 @@ from cinderclient import client from cinderclient import exceptions as exc from cinderclient import utils +try: + osprofiler_profiler = importutils.try_import("osprofiler.profiler") +except Exception: + pass + DEFAULT_MAJOR_OS_VOLUME_API_VERSION = "3" DEFAULT_CINDER_ENDPOINT_TYPE = 'publicURL' diff --git a/cinderclient/tests/unit/fake_actions_module.py b/cinderclient/tests/unit/fake_actions_module.py index 5c02306..07e7d29 100644 --- a/cinderclient/tests/unit/fake_actions_module.py +++ b/cinderclient/tests/unit/fake_actions_module.py @@ -27,7 +27,7 @@ def do_fake_action(): @api_versions.wraps("3.2", "3.3") # noqa: F811 -def do_fake_action(): +def do_fake_action(): # noqa return "fake_action 3.2 to 3.3" diff --git a/cinderclient/tests/unit/test_utils.py b/cinderclient/tests/unit/test_utils.py index 8b3b7a6..1243b0a 100644 --- a/cinderclient/tests/unit/test_utils.py +++ b/cinderclient/tests/unit/test_utils.py @@ -72,7 +72,7 @@ class FakeManagerWithApi(base.Manager): return '3.1' @api_versions.wraps('3.2') # noqa: F811 - def return_api_version(self): + def return_api_version(self): # noqa return '3.2' diff --git a/cinderclient/v3/messages.py b/cinderclient/v3/messages.py index 3dc5388..2c620c2 100644 --- a/cinderclient/v3/messages.py +++ b/cinderclient/v3/messages.py @@ -52,7 +52,7 @@ class MessageManager(base.ManagerWithFind): return self._list(url, resource_type) @api_versions.wraps('3.5') # noqa: F811 - def list(self, search_opts=None, marker=None, limit=None, sort=None): + def list(self, search_opts=None, marker=None, limit=None, sort=None): # noqa """Lists all messages. :param search_opts: Search options to filter out volumes. diff --git a/cinderclient/v3/volume_backups.py b/cinderclient/v3/volume_backups.py index b07ecfb..7dd8560 100644 --- a/cinderclient/v3/volume_backups.py +++ b/cinderclient/v3/volume_backups.py @@ -61,7 +61,7 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager): incremental, force, snapshot_id) @api_versions.wraps("3.43") # noqa: F811 - def create(self, volume_id, container=None, + def create(self, volume_id, container=None, # noqa name=None, description=None, incremental=False, force=False, snapshot_id=None, @@ -85,7 +85,7 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager): incremental, force, snapshot_id, metadata) @api_versions.wraps("3.51") # noqa: F811 - def create(self, volume_id, container=None, name=None, description=None, + def create(self, volume_id, container=None, name=None, description=None, # noqa incremental=False, force=False, snapshot_id=None, metadata=None, availability_zone=None): return self._create_backup(volume_id, container, name, description, diff --git a/cinderclient/v3/volumes.py b/cinderclient/v3/volumes.py index fac5eff..974bcfc 100644 --- a/cinderclient/v3/volumes.py +++ b/cinderclient/v3/volumes.py @@ -160,7 +160,7 @@ class VolumeManager(volumes.VolumeManager): return common_base.ListWithMeta([], response_list) @api_versions.wraps("3.15") # noqa: F811 - def delete_metadata(self, volume, keys): + def delete_metadata(self, volume, keys): # noqa """Delete specified keys from volumes metadata. :param volume: The :class:`Volume`. @@ -191,7 +191,7 @@ class VolumeManager(volumes.VolumeManager): 'disk_format': disk_format}) @api_versions.wraps("3.1") # noqa: F811 - def upload_to_image(self, volume, force, image_name, container_format, + def upload_to_image(self, volume, force, image_name, container_format, # noqa disk_format, visibility, protected): """Upload volume to image service as image. :param volume: The :class:`Volume` to upload. @@ -265,7 +265,7 @@ class VolumeManager(volumes.VolumeManager): return self._get('/scheduler-stats/get_pools%s' % query_string, None) @api_versions.wraps("3.33") # noqa: F811 - def get_pools(self, detail, search_opts): + def get_pools(self, detail, search_opts): # noqa """Show pool information for backends.""" # pylint: disable=function-redefined options = {'detail': detail} |
