Add qualified name to Context 55/52655/10
authorEmma Foley <emma.l.foley@intel.com>
Mon, 26 Feb 2018 11:43:51 +0000 (11:43 +0000)
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Thu, 1 Mar 2018 11:22:58 +0000 (11:22 +0000)
commitc9b24900ab4782c946f5a423e9c16365abced786
tree11b4fb75819034ab587579e0cf577a856f71c764
parent793569e2ce7ebf5b4d549db94423b851f13950fc
Add qualified name to Context

The context name depends on the defined name in the testcase input
file, the task ID and the flags of the context.

If the context is going to be undeployed at the end of the test, the
task ID is suffixed to the name to avoid interferences with previous
deployments. If the context needs to be deployed at the end of the
test, the name assigned is kept.

This patch makes base.Context use Flags when initialising contexts,
this sets the name property based on the no_setup and no_teardown
flags.

Since base.Context is an abstract class, it cannot be instantiated.
However, there are some non-abstract methods that need testing.
Since DummyContext does not override any of these methods, it can be used for
testing.

JIRA: YARDSTICK-886

Change-Id: I1447fb5ed447691eaeb0a97f928c0b3333799d07
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
14 files changed:
yardstick/benchmark/contexts/base.py
yardstick/benchmark/contexts/dummy.py
yardstick/benchmark/contexts/heat.py
yardstick/benchmark/contexts/kubernetes.py
yardstick/benchmark/contexts/node.py
yardstick/benchmark/contexts/standalone/ovs_dpdk.py
yardstick/benchmark/contexts/standalone/sriov.py
yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
yardstick/tests/unit/benchmark/contexts/standalone/test_sriov.py
yardstick/tests/unit/benchmark/contexts/test_dummy.py
yardstick/tests/unit/benchmark/contexts/test_heat.py
yardstick/tests/unit/benchmark/contexts/test_kubernetes.py
yardstick/tests/unit/benchmark/contexts/test_node.py
yardstick/tests/unit/orchestrator/test_heat.py