3 # Copyright 2017 Okinawa Open Laboratory
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 import functest.core.feature_base as base
13 RESULT_DETAILS_FILE = "test_result.json"
16 class VrouterVnf(base.FeatureBase):
18 super(VrouterVnf, self).__init__(project='vRouter',
20 repo='dir_repo_vrouter')
21 self.cmd = 'cd %s && ./run.sh' % self.repo
23 def set_result_details(self):
24 filepath = os.path.join(self.repo, RESULT_DETAILS_FILE)
25 if os.path.exists(filepath):
26 f = open(filepath, 'r')
27 self.details = json.load(f)
30 def log_results(self):
31 if self.criteria == 'PASS':
32 self.set_result_details()
33 super(VrouterVnf, self).log_results()