Merge "Fix pep8 errors"
This commit is contained in:
commit
352ab1fb81
cinderclient
@ -12,11 +12,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
__all__ = ['__version__']
|
||||
|
||||
import pbr.version
|
||||
|
||||
|
||||
__all__ = ['__version__']
|
||||
|
||||
|
||||
version_info = pbr.version.VersionInfo('python-cinderclient')
|
||||
# We have a circular import problem when we first run python setup.py sdist
|
||||
# It's harmless, so deflect it.
|
||||
|
@ -34,20 +34,18 @@ from keystoneauth1 import access
|
||||
from keystoneauth1 import adapter
|
||||
from keystoneauth1.identity import base
|
||||
from keystoneauth1 import discover
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import strutils
|
||||
osprofiler_web = importutils.try_import("osprofiler.web") # noqa
|
||||
import requests
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinderclient import api_versions
|
||||
from cinderclient import exceptions
|
||||
import cinderclient.extension
|
||||
from cinderclient._i18n import _
|
||||
from cinderclient._i18n import _LW
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import strutils
|
||||
|
||||
osprofiler_web = importutils.try_import("osprofiler.web")
|
||||
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
try:
|
||||
from eventlet import sleep
|
||||
|
@ -25,29 +25,28 @@ import getpass
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import requests
|
||||
import six
|
||||
|
||||
from cinderclient import api_versions
|
||||
from cinderclient import client
|
||||
from cinderclient import exceptions as exc
|
||||
from cinderclient import utils
|
||||
import cinderclient.auth_plugin
|
||||
from cinderclient._i18n import _
|
||||
|
||||
from keystoneauth1 import discover
|
||||
from keystoneauth1 import loading
|
||||
from keystoneauth1 import session
|
||||
from keystoneauth1.identity import v2 as v2_auth
|
||||
from keystoneauth1.identity import v3 as v3_auth
|
||||
from keystoneauth1.exceptions import DiscoveryFailure
|
||||
import six.moves.urllib.parse as urlparse
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import importutils
|
||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler") # noqa
|
||||
import requests
|
||||
import six
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
|
||||
|
||||
from cinderclient import api_versions
|
||||
from cinderclient import client
|
||||
from cinderclient import exceptions as exc
|
||||
from cinderclient import _i18n
|
||||
from cinderclient._i18n import _
|
||||
from cinderclient import utils
|
||||
import cinderclient.auth_plugin
|
||||
|
||||
|
||||
# Enable i18n lazy translation
|
||||
_i18n.enable_lazy()
|
||||
|
||||
@ -819,10 +818,9 @@ class OpenStackCinderShell(object):
|
||||
|
||||
username = self.options.os_username
|
||||
password = self.options.os_password
|
||||
tenant_id = (self.options.os_tenant_id
|
||||
or self.options.os_project_id)
|
||||
tenant_name = (self.options.os_tenant_name
|
||||
or self.options.os_project_name)
|
||||
tenant_id = self.options.os_tenant_id or self.options.os_project_id
|
||||
tenant_name = (self.options.os_tenant_name or
|
||||
self.options.os_project_name)
|
||||
|
||||
return v2_auth.Password(
|
||||
v2_auth_url,
|
||||
@ -839,8 +837,8 @@ class OpenStackCinderShell(object):
|
||||
user_domain_id = self.options.os_user_domain_id
|
||||
password = self.options.os_password
|
||||
project_id = self.options.os_project_id or self.options.os_tenant_id
|
||||
project_name = (self.options.os_project_name
|
||||
or self.options.os_tenant_name)
|
||||
project_name = (self.options.os_project_name or
|
||||
self.options.os_tenant_name)
|
||||
project_domain_name = self.options.os_project_domain_name
|
||||
project_domain_id = self.options.os_project_domain_id
|
||||
|
||||
|
@ -34,8 +34,8 @@ def credentials():
|
||||
|
||||
username = os.environ.get('OS_USERNAME')
|
||||
password = os.environ.get('OS_PASSWORD')
|
||||
tenant_name = (os.environ.get('OS_TENANT_NAME')
|
||||
or os.environ.get('OS_PROJECT_NAME'))
|
||||
tenant_name = (os.environ.get('OS_TENANT_NAME') or
|
||||
os.environ.get('OS_PROJECT_NAME'))
|
||||
auth_url = os.environ.get('OS_AUTH_URL')
|
||||
|
||||
config = six.moves.configparser.RawConfigParser()
|
||||
|
@ -25,14 +25,13 @@ from cinderclient.v1 import client
|
||||
|
||||
def _stub_volume(**kwargs):
|
||||
volume = {
|
||||
'id': '1234',
|
||||
'id': '00000000-0000-0000-0000-000000000000',
|
||||
'display_name': None,
|
||||
'display_description': None,
|
||||
"attachments": [],
|
||||
"bootable": "false",
|
||||
"availability_zone": "cinder",
|
||||
"created_at": "2012-08-27T00:00:00.000000",
|
||||
"id": '00000000-0000-0000-0000-000000000000',
|
||||
"metadata": {},
|
||||
"size": 1,
|
||||
"snapshot_id": None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user