summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-03-13 15:25:07 +0200
committerHanoh Haim <hhaim@cisco.com>2016-03-13 15:25:07 +0200
commit9fb5db2decdbb327715d427d7ae1fbda507447a3 (patch)
tree2dde141e294ec65e2349d19a2d59b4799e3f86e2
parentdf5896a8f484d67759e74faa01576994b7f77532 (diff)
add cp_stl build
-rw-r--r--draft_trex_stateless.asciidoc6
-rwxr-xr-xwscript50
2 files changed, 38 insertions, 18 deletions
diff --git a/draft_trex_stateless.asciidoc b/draft_trex_stateless.asciidoc
index 7ff203a7..4c0b5784 100644
--- a/draft_trex_stateless.asciidoc
+++ b/draft_trex_stateless.asciidoc
@@ -299,6 +299,12 @@ Starting traffic on port(s) [0, 1, 2, 3]: [SUCCESS]
<5> Stop on all the ports
+[NOTE]
+=====================================================================
+In case you have a connection *error* look into /etc/trex_cfg.yaml
+you should *remove* keywords like `enable_zmq_pub : true` and `zmq_pub_port : 4501` from the file.
+=====================================================================
+
To look into the streams using `streams -a`
.Streams
diff --git a/wscript b/wscript
index c7823d1c..d94be256 100755
--- a/wscript
+++ b/wscript
@@ -120,7 +120,6 @@ def do_visio(bld):
for x in bld.path.ant_glob('visio\\*.vsd'):
tg = bld(rule='${VIS} -i ${SRC} -o ${TGT} ', source=x, target=x.change_ext('.png'))
-#def build_cp_docs (trex_src_dir, dest_dir = "_build", builder = "html"):
def build_cp_docs (task):
out_dir = task.outputs[0].abspath()
export_path = os.path.join(os.getcwd(), 'build', 'cp_docs')
@@ -137,6 +136,36 @@ def build_cp_docs (task):
return subprocess.call(build_doc_cmd, cwd = trex_core_docs_path)
return (1)
+def build_stl_cp_docs (task):
+ out_dir = task.outputs[0].abspath()
+ export_path = os.path.join(os.getcwd(), 'build', 'cp_stl_docs')
+ trex_core_git_path = os.path.join(os.getcwd(), os.pardir, "trex-core")
+ if not os.path.isdir(trex_core_git_path):
+ trex_core_git_path = os.getenv('TREX_CORE_GIT', None)
+ if trex_core_git_path: # there exists a default directory or the desired ENV variable.
+ trex_core_docs_path = os.path.abspath(os.path.join(trex_core_git_path, 'scripts', 'automation', 'trex_control_plane', 'doc_stl'))
+ build_doc_cmd = shlex.split("/usr/local/bin/sphinx-build -W -b {bld} {src} {dst}".format(
+ bld= "html",
+ src= ".",
+ dst= out_dir)
+ )
+ return subprocess.call(build_doc_cmd, cwd = trex_core_docs_path)
+ return (1)
+
+
+
+def build_cp(bld,dir,root,callback):
+ export_path = os.path.join(os.getcwd(), 'build', dir)
+ trex_core_git_path = os.path.join(os.getcwd(), os.pardir, "trex-core")
+ if not os.path.isdir(trex_core_git_path):
+ trex_core_git_path = os.getenv('TREX_CORE_GIT', None)
+ if trex_core_git_path: # there exists a default directory or the desired ENV variable.
+ trex_core_docs_path = os.path.join(trex_core_git_path, 'scripts', 'automation', 'trex_control_plane', root, 'index.rst')
+ bld(rule=build_cp_docs,target = dir)
+ else:
+ raise NameError("Environment variable 'TREX_CORE_GIT' is not defined.")
+
+
def build(bld):
bld(rule=my_copy, target='symbols.lang')
@@ -218,23 +247,8 @@ def build(bld):
bld(rule='${ASCIIDOC} -a stylesheet=${SRC[1].abspath()} -a icons=true -a toc2 -a max-width=55em -o ${TGT} ${SRC[0].abspath()}',
source='trex_console.asciidoc waf.css', target='trex_console.html', scan=ascii_doc_scan)
-# bld(rule=build_cp_docs,
-# source='1.txt', target='cp_docs', scan=ascii_doc_scan)
-
- # generate control plane documentation
- export_path = os.path.join(os.getcwd(), 'build', 'cp_docs')
- trex_core_git_path = os.path.join(os.getcwd(), os.pardir, "trex-core")
- if not os.path.isdir(trex_core_git_path):
- trex_core_git_path = os.getenv('TREX_CORE_GIT', None)
- if trex_core_git_path: # there exists a default directory or the desired ENV variable.
- trex_core_docs_path = os.path.join(trex_core_git_path, 'scripts', 'automation', 'trex_control_plane', 'doc', 'index.rst')
- bld(rule=build_cp_docs,
-# source = '1.txt',#trex_core_docs_path,
- target = 'cp_docs')
- # build_cp_docs(trex_core_git_path, dest_dir= export_path)
- else:
- raise NameError("Environment variable 'TREX_CORE_GIT' is not defined.")
-
+ build_cp(bld,'cp_docs','doc',build_cp_docs)
+ build_cp(bld,'cp_stl_docs','doc_stl',build_stl_cp_docs)
class Env(object):
@staticmethod