From 92d0631ed6dd48d7c323c4bf76350be6e920176f Mon Sep 17 00:00:00 2001 From: DanielMartinBuckley Date: Wed, 19 Dec 2018 17:41:42 +0000 Subject: NSB support for [core x-y] NSB PROX NFVI configuration JIRA: YARDSTICK-1571 Cores in PROX support multiple configurations NSB supports today the more basic one, i.e. [core x] When one wants to use multiple cores sharing the same configuration, instead of copying the whole [core] section, PROX support the following syntax [core x-y] where x is the 1st core and y the last one or (for instance) [core x,y,z] NSB Now supports [core a,b,c,d] [core a-d] [core a,c-d] Change-Id: I34cd107143c89e16d58e7a99e1887ffbf720a5d1 Signed-off-by: Daniel Martin Buckley --- .../vnf_generic/vnf/test_prox_helpers.py | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) (limited to 'yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py') diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py index 31f08da3e..9a30fb9e9 100644 --- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py +++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py @@ -1374,6 +1374,36 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): ['missing_addtional_file', 'dofile("nosuch")'], ], ], + [ + 'core 0', + [ + ['name', 'p0'] + ] + ], + [ + 'core 1-4', + [ + ['name', 'p1'] + ] + ], + [ + 'core 5,6', + [ + ['name', 'p2'] + ] + ], + [ + 'core xx', + [ + ['name', 'p3'] + ] + ], + [ + 'core $x', + [ + ['name', 'p4'] + ] + ] ] expected = [ @@ -1403,6 +1433,54 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): ['missing_addtional_file', 'dofile("nosuch")'], ], ], + [ + 'core 0', + [ + ['name', 'p0'] + ] + ], + [ + 'core 1', + [ + ['name', 'p1'] + ] + ], + [ + 'core 2', + [ + ['name', 'p1'] + ] + ], + [ + 'core 3', + [ + ['name', 'p1'] + ] + ], + [ + 'core 4', + [ + ['name', 'p1'] + ] + ], + [ + 'core 5', + [ + ['name', 'p2'] + ] + ], + [ + 'core 6', + [ + ['name', 'p2'] + ] + ], + [ + 'core $x', + [ + ['name', 'p4'] + ] + ] ] result = helper.generate_prox_config_file('/c/d/e') self.assertEqual(result, expected, str(result)) -- cgit 1.2.3-korg