aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorh-hayashi <hideyasu.hayashi@okinawaopenlabs.org>2017-02-14 22:27:29 +0900
committerh-hayashi <hideyasu.hayashi@okinawaopenlabs.org>2017-02-24 19:00:40 +0900
commit7bd62366a97d4ec8b6f18c13057cb2904431df93 (patch)
tree2549fd9620aa61036b5b56c0a9f3cc33fa611daf /functest/opnfv_tests
parent8b0f0b5b5ce3395dddd938fc43f048eb90d8da8e (diff)
Adding vRouter test codes using TestCasesBase
JIRA: FUNCTEST-530 1.setting "nosdn-nofeature" scinario in testcase.yaml. 1.adding process of setting result details for push DB 2.Delete of define "vrouter_data" in config_functest.yaml. 3.modify of vrouter git tag's name "stable". 4.modrify of testcase name "vyos_vrouter" In order to more specific. Change-Id: I0602c01dbf9a5e71bf85943c2b5e40ef51269ffd Signed-off-by: Hideyasu Hayashi <hideyasu.hayashi@okinawaopenlabs.org>
Diffstat (limited to 'functest/opnfv_tests')
-rwxr-xr-xfunctest/opnfv_tests/vnf/router/__init__.py0
-rwxr-xr-xfunctest/opnfv_tests/vnf/router/vyos_vrouter.py33
2 files changed, 33 insertions, 0 deletions
diff --git a/functest/opnfv_tests/vnf/router/__init__.py b/functest/opnfv_tests/vnf/router/__init__.py
new file mode 100755
index 00000000..e69de29b
--- /dev/null
+++ b/functest/opnfv_tests/vnf/router/__init__.py
diff --git a/functest/opnfv_tests/vnf/router/vyos_vrouter.py b/functest/opnfv_tests/vnf/router/vyos_vrouter.py
new file mode 100755
index 00000000..94a3ecfd
--- /dev/null
+++ b/functest/opnfv_tests/vnf/router/vyos_vrouter.py
@@ -0,0 +1,33 @@
+#!/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_base as base
+import json
+import os
+
+RESULT_DETAILS_FILE = "test_result.json"
+
+
+class VrouterVnf(base.FeatureBase):
+ def __init__(self):
+ super(VrouterVnf, self).__init__(project='vRouter',
+ case='vyos_vrouter',
+ repo='dir_repo_vrouter')
+ 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.criteria == 'PASS':
+ self.set_result_details()
+ super(VrouterVnf, self).log_results()