aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
diff options
context:
space:
mode:
authorDanielMartinBuckley <daniel.m.buckley@intel.com>2018-12-19 17:41:42 +0000
committerDanielMartinBuckley <daniel.m.buckley@intel.com>2018-12-27 13:10:09 +0000
commit92d0631ed6dd48d7c323c4bf76350be6e920176f (patch)
tree3934812e3f785b7cd9aaa5bcd706c16936051a79 /yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
parent2b321003001e71fec83a5138afd9638d3f97fb7d (diff)
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 <daniel.m.buckley@intel.com>
Diffstat (limited to 'yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py')
-rw-r--r--yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py78
1 files changed, 78 insertions, 0 deletions
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))