aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-08-12 16:41:38 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-08-18 09:14:02 +0200
commit61138bfec980625bec6c219b9e27685c281e5965 (patch)
tree85116675caadaef0c9adbf3e7c09830204cfc040 /functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
parent128e7c9c093653d47182f5ad0e852087bd1e9a62 (diff)
Update to Alpine 3.14
It also fixes lots of new pylint warnings. Change-Id: I3376aee5649596c53bc2941ad4d8e0674a2967fe Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py')
-rw-r--r--functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py6
1 files changed, 2 insertions, 4 deletions
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 b159ddda4..db276cfdb 100644
--- a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
+++ b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
@@ -101,10 +101,8 @@ class VmController():
def command_create_and_execute(self, ssh, test_cmd_file_path,
cmd_input_param, prompt_file_path):
- prompt_file = open(prompt_file_path,
- 'r')
- prompt = yaml.safe_load(prompt_file)
- prompt_file.close()
+ with open(prompt_file_path, 'r') as prompt_file:
+ prompt = yaml.safe_load(prompt_file)
config_mode_prompt = prompt["config_mode"]
commands = self.command_gen_from_template(test_cmd_file_path,