aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/testcase.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2018-01-29 07:20:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-29 07:20:26 +0000
commita897b7bdc10e20db989d10ff7cdf8a14b5a5d517 (patch)
tree07dd9ad424ab7f16cd4e17ea8866c2d3e6e4a7c0 /testcases/testcase.py
parent52c154c463705b51c54d639026093ecd80c9a6b4 (diff)
parent7243bf4de72f4b795f08f6abe99e05da4c06491b (diff)
Merge "llc-management: Support for LLC management with RMD"
Diffstat (limited to 'testcases/testcase.py')
-rw-r--r--testcases/testcase.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 991c2890..5d4a6ea9 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -36,6 +36,7 @@ from tools import functions
from tools import namespace
from tools import veth
from tools.teststepstools import TestStepsTools
+from tools.llc_management import rmd
CHECK_PREFIX = 'validate_'
@@ -185,6 +186,10 @@ class TestCase(object):
if step[0].startswith('vnf'):
self._step_vnf_list[step[0]] = None
+ # if llc allocation is required, initialize it.
+ if S.getValue('LLC_ALLOCATION'):
+ self._rmd = rmd.CacheAllocator()
+
def run_initialize(self):
""" Prepare test execution environment
"""
@@ -257,6 +262,10 @@ class TestCase(object):
self._step_status = {'status' : True, 'details' : ''}
+ # Perform LLC-allocations
+ if S.getValue('LLC_ALLOCATION'):
+ self._rmd.setup_llc_allocation()
+
self._logger.debug("Setup:")
def run_finalize(self):
@@ -265,6 +274,10 @@ class TestCase(object):
# Stop all VNFs started by TestSteps in case that something went wrong
self.step_stop_vnfs()
+ # Cleanup any LLC-allocations
+ if S.getValue('LLC_ALLOCATION'):
+ self._rmd.cleanup_llc_allocation()
+
# Stop all processes executed by testcase
tasks.terminate_all_tasks(self._logger)