diff options
author | Shuya Nakama <shuya.nakama@okinawaopenlabs.org> | 2017-08-25 14:26:30 +0000 |
---|---|---|
committer | Shuya Nakama <shuya.nakama@okinawaopenlabs.org> | 2017-08-29 07:19:48 +0000 |
commit | 0a56dfd7f42d6a6d849e5cf3f82b0863c8a62ffe (patch) | |
tree | 2361c11c016f4101487787c9ea7676c4d696902d /functest/opnfv_tests/vnf/router/vyos_vrouter.py | |
parent | cb239a2a5ec46086ce8c046e2db4cb7eb7b18181 (diff) |
Refactor the vyos_vrouter to adopt VNF abstraction
JIRA: FUNCTEST-788
1.Modifying code of vyos_vrouter to inherit vnf abstraction class.
2.Adding vyos_vrouter code from our repo to functest.
3.Adding unit test of vyos_vrouter.
4.Doing test of modified vyos_vrouter codes on our labs.
Change-Id: I77e4be8b2a140ea0176c607f2be736599f893ace
Signed-off-by: Shuya Nakama <shuya.nakama@okinawaopenlabs.org>
Diffstat (limited to 'functest/opnfv_tests/vnf/router/vyos_vrouter.py')
-rw-r--r-- | functest/opnfv_tests/vnf/router/vyos_vrouter.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/functest/opnfv_tests/vnf/router/vyos_vrouter.py b/functest/opnfv_tests/vnf/router/vyos_vrouter.py deleted file mode 100644 index 5654278d..00000000 --- a/functest/opnfv_tests/vnf/router/vyos_vrouter.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2017 Okinawa Open Laboratory -# -# All rights reserved. This program and the accompanying materials -# 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 -import functest.core.feature as base -import json -import os - -RESULT_DETAILS_FILE = "test_result.json" - - -class VrouterVnf(base.Feature): - def __init__(self, **kwargs): - kwargs["repo"] = 'dir_repo_vrouter' - if "case_name" not in kwargs: - kwargs["case_name"] = "vyos_vrouter" - super(VrouterVnf, self).__init__(**kwargs) - self.cmd = 'cd %s && ./run.sh' % self.repo - - def set_result_details(self): - filepath = os.path.join(self.repo, RESULT_DETAILS_FILE) - if os.path.exists(filepath): - f = open(filepath, 'r') - self.details = json.load(f) - f.close() - - def log_results(self): - if self.result == 'PASS': - self.set_result_details() - super(VrouterVnf, self).log_results() |