aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_os.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-01-23 11:19:41 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-01-24 15:15:34 +0100
commitbbfe9b09d2b1ac7bfe286311fef83d36c6125c96 (patch)
treec11ad97f5672454a3b7e2ba13916034919933e5d /functest/cli/commands/cli_os.py
parentc653ed78d7721b9933e08015e45dd39379aa4316 (diff)
Fix pylint warnings/errors in cli
cli_testcase and cli_tier have been refactored to avoid duplicating code. Then functest/cli and funtest/unit/cli can be added to the list of modules rated 10/10. Change-Id: Iec90e806397248a10f39080ec554e3f0a6eda7c1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/cli/commands/cli_os.py')
-rw-r--r--functest/cli/commands/cli_os.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/functest/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py
index 9057da84b..a543e8457 100644
--- a/functest/cli/commands/cli_os.py
+++ b/functest/cli/commands/cli_os.py
@@ -5,13 +5,13 @@
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-#
+# pylint: disable=missing-docstring
import os
import click
-from six.moves.urllib.parse import urlparse
+from six.moves import urllib
from functest.ci import check_deployment
from functest.utils.constants import CONST
@@ -25,8 +25,8 @@ class OpenStack(object):
self.endpoint_port = None
self.openstack_creds = CONST.__getattribute__('openstack_creds')
if self.os_auth_url:
- self.endpoint_ip = urlparse(self.os_auth_url).hostname
- self.endpoint_port = urlparse(self.os_auth_url).port
+ self.endpoint_ip = urllib.parse.urlparse(self.os_auth_url).hostname
+ self.endpoint_port = urllib.parse.urlparse(self.os_auth_url).port
def ping_endpoint(self):
if self.os_auth_url is None:
@@ -55,12 +55,9 @@ class OpenStack(object):
class CliOpenStack(OpenStack):
- def __init__(self):
- super(CliOpenStack, self).__init__()
-
@staticmethod
def show_credentials():
dic_credentials = OpenStack.show_credentials()
for key, value in dic_credentials.items():
- if key.startswith('OS_'):
- click.echo("{}={}".format(key, value))
+ if key.startswith('OS_'):
+ click.echo("{}={}".format(key, value))