aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/router
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-06-19 07:14:42 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-06-19 07:16:33 +0200
commita1a85f7cc121b1c1176f2b79b22f4e4bca43177a (patch)
treeb602db75f9577576b4b8fb84dc01e33b24c3dcdf /functest/opnfv_tests/vnf/router
parentf1353fff60344b01c588d9724b3b1de819cbe661 (diff)
Fix pylint errors
They are highlighted by the last pylint version. Change-Id: I473212a413013492716993fb536903b13bff66ed Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/router')
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py20
-rw-r--r--functest/opnfv_tests/vnf/router/utilvnf.py8
-rw-r--r--functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py6
-rw-r--r--functest/opnfv_tests/vnf/router/vrouter_base.py6
4 files changed, 17 insertions, 23 deletions
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index c5c72e05c..a88200339 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -19,14 +19,7 @@ import uuid
from cloudify_rest_client import CloudifyClient
from cloudify_rest_client.executions import Execution
from scp import SCPClient
-
-from functest.opnfv_tests.openstack.snaps import snaps_utils
-import functest.opnfv_tests.vnf.router.vrouter_base as vrouter_base
-from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
-from functest.utils import config
-from functest.utils import env
-from functest.utils import functest_utils
-
+import six
from snaps.config.flavor import FlavorConfig
from snaps.config.image import ImageConfig
from snaps.config.keypair import KeypairConfig
@@ -36,7 +29,6 @@ from snaps.config.security_group import (
Direction, Protocol, SecurityGroupConfig, SecurityGroupRuleConfig)
from snaps.config.user import UserConfig
from snaps.config.vm_inst import FloatingIpConfig, VmInstanceConfig
-
from snaps.openstack.create_flavor import OpenStackFlavor
from snaps.openstack.create_image import OpenStackImage
from snaps.openstack.create_instance import OpenStackVmInstance
@@ -45,13 +37,15 @@ from snaps.openstack.create_network import OpenStackNetwork
from snaps.openstack.create_security_group import OpenStackSecurityGroup
from snaps.openstack.create_router import OpenStackRouter
from snaps.openstack.create_user import OpenStackUser
-
import snaps.openstack.utils.glance_utils as glance_utils
from snaps.openstack.utils import keystone_utils
-
-import six
-
+from functest.opnfv_tests.openstack.snaps import snaps_utils
+import functest.opnfv_tests.vnf.router.vrouter_base as vrouter_base
+from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
+from functest.utils import config
+from functest.utils import env
+from functest.utils import functest_utils
__author__ = "Shuya Nakama <shuya.nakama@okinawaopenlabs.org>"
diff --git a/functest/opnfv_tests/vnf/router/utilvnf.py b/functest/opnfv_tests/vnf/router/utilvnf.py
index 2865175b3..31e1b9196 100644
--- a/functest/opnfv_tests/vnf/router/utilvnf.py
+++ b/functest/opnfv_tests/vnf/router/utilvnf.py
@@ -18,10 +18,10 @@ import pkg_resources
import requests
import yaml
-from functest.utils import config
from git import Repo
from snaps.openstack.utils import nova_utils
+from functest.utils import config
RESULT_SPRIT_INDEX = {
"transfer": 8,
@@ -202,12 +202,12 @@ class Utilvnf(object): # pylint: disable=too-many-instance-attributes
def request_vnf_reboot(self, vnf_info_list):
for vnf in vnf_info_list:
- self.logger.debug("reboot the " + vnf["vnf_name"])
+ self.logger.debug("reboot the %s", vnf["vnf_name"])
self.reboot_vm(vnf["vnf_name"])
def request_vm_delete(self, vnf_info_list):
for vnf in vnf_info_list:
- self.logger.debug("delete the " + vnf["vnf_name"])
+ self.logger.debug("delete the %s", vnf["vnf_name"])
self.delete_vm(vnf["vnf_name"])
def get_vnf_info_list(self, cfy_manager_ip, topology_deploy_name,
@@ -225,7 +225,7 @@ class Utilvnf(object): # pylint: disable=too-many-instance-attributes
vnf["target_vnf_flag"] = bool(vnf_name == target_vnf_name)
- self.logger.debug("vnf name : " + vnf_name)
+ self.logger.debug("vnf name : %s", vnf_name)
self.logger.debug(vnf_name + " floating ip address : " +
vnf["floating_ip"])
diff --git a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
index 56dc1e237..79acc776f 100644
--- a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
+++ b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
@@ -124,11 +124,11 @@ class VmController(object):
def command_list_execute(self, ssh, command_list, prompt):
res_data_list = []
for command in command_list:
- self.logger.debug("Command : " + command)
+ self.logger.debug("Command : %s", command)
(res, res_data) = self.command_execute(ssh,
command,
prompt)
- self.logger.debug("Response : " + res_data)
+ self.logger.debug("Response : %s", res_data)
res_data_list.append(res_data)
if not res:
return res, res_data_list
@@ -140,7 +140,7 @@ class VmController(object):
def command_execute(self, ssh, command, prompt):
res_data = ssh.send(command, prompt)
if res_data is None:
- self.logger.info("retry send command : " + command)
+ self.logger.info("retry send command : %s", command)
res_data = ssh.send(command,
prompt)
if not ssh.error_check(res_data):
diff --git a/functest/opnfv_tests/vnf/router/vrouter_base.py b/functest/opnfv_tests/vnf/router/vrouter_base.py
index 8818032da..6c4e5ce0d 100644
--- a/functest/opnfv_tests/vnf/router/vrouter_base.py
+++ b/functest/opnfv_tests/vnf/router/vrouter_base.py
@@ -65,9 +65,9 @@ class VrouterOnBoardingBase(vnf.VnfOnBoarding):
test_list = function_test["test_list"]
target_vnf_name = function_test["target_vnf_name"]
for test_info in test_list:
- self.logger.info(test_info["protocol"] + " " +
- test_info["test_kind"] +
- " test.")
+ self.logger.info(
+ "%s %s test.", test_info["protocol"],
+ test_info["test_kind"])
(result, result_data) = self.function_test_vrouter(
target_vnf_name, test_info)
test_result_data_list.append(result_data)