aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/tcp.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-08-16 15:48:02 +0200
committerVratko Polak <vrpolak@cisco.com>2019-08-19 14:04:59 +0000
commitae7dc0011f376861ba9259b7cb5166777520799c (patch)
tree80fa14eb2408dce0fec44bf8a88fdff3260fe3ee /resources/libraries/python/tcp.py
parent144ebec26ff0a32000283eddfac393e497e01164 (diff)
Autogen: Create NICs for TCP suites.
+ Put Regenerator internal functions ourside class. + Duplicate into _default_ and _tcp_ functions. + Rework Testcase to be a single class with two factories. + Improve suite and testcase naming. Change-Id: I1f835b576c476c1a40c8c52469b1876695f9ae73 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/tcp.py')
-rw-r--r--resources/libraries/python/tcp.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/resources/libraries/python/tcp.py b/resources/libraries/python/tcp.py
index 1b08912b7e..f3a24cbd06 100644
--- a/resources/libraries/python/tcp.py
+++ b/resources/libraries/python/tcp.py
@@ -73,17 +73,16 @@ class TCPUtils(object):
:type fifo_size: str
:type private_segment_size: str
"""
- if http_static_plugin == True:
- cmd='http static server www-root {www_root} '\
- 'prealloc-fifos {prealloc_fifos} fifo-size {fifo_size}'\
- ' private-segment-size {pvt_seg_size}'\
- .format(www_root=cls.www_root_dir,
- prealloc_fifos=prealloc_fifos, fifo_size=fifo_size,
- pvt_seg_size=private_segment_size)
+ if http_static_plugin:
+ cmd = 'http static server www-root {www_root} '\
+ 'prealloc-fifos {prealloc_fifos} fifo-size {fifo_size}'\
+ ' private-segment-size {pvt_seg_size}'\
+ .format(www_root=cls.www_root_dir,
+ prealloc_fifos=prealloc_fifos, fifo_size=fifo_size,
+ pvt_seg_size=private_segment_size)
else:
- cmd='test http server static prealloc-fifos {prealloc_fifos} '\
- 'fifo-size {fifo_size} private-segment-size {pvt_seg_size}'\
- .format(prealloc_fifos=prealloc_fifos, fifo_size=fifo_size,
- pvt_seg_size=private_segment_size)
+ cmd = 'test http server static prealloc-fifos {prealloc_fifos} '\
+ 'fifo-size {fifo_size} private-segment-size {pvt_seg_size}'\
+ .format(prealloc_fifos=prealloc_fifos, fifo_size=fifo_size,
+ pvt_seg_size=private_segment_size)
PapiSocketExecutor.run_cli_cmd(node, cmd)
-