diff options
author | Hanoh Haim <hhaim@cisco.com> | 2016-03-30 13:57:58 +0300 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2016-03-30 13:57:58 +0300 |
commit | 2ec326cbe088f3ee5634336e326ae8c3561c7461 (patch) | |
tree | 061422609e92e7c9b91479f198c48cdb0efa425f /scripts | |
parent | 935b711d82845514c30249b8cdd2e9ed6aa11526 (diff) |
add ga to api
Diffstat (limited to 'scripts')
3 files changed, 58 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/doc/_templates/layout.html b/scripts/automation/trex_control_plane/doc/_templates/layout.html new file mode 100644 index 00000000..8c1c709c --- /dev/null +++ b/scripts/automation/trex_control_plane/doc/_templates/layout.html @@ -0,0 +1,17 @@ +{% extends "!layout.html" %} + +{% block footer %} +{{ super() }} +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-75220362-1', 'auto'); + ga('send', 'pageview'); + +</script> +{% endblock %} + + diff --git a/scripts/automation/trex_control_plane/doc_stl/_templates/layout.html b/scripts/automation/trex_control_plane/doc_stl/_templates/layout.html new file mode 100644 index 00000000..8c1c709c --- /dev/null +++ b/scripts/automation/trex_control_plane/doc_stl/_templates/layout.html @@ -0,0 +1,17 @@ +{% extends "!layout.html" %} + +{% block footer %} +{{ super() }} +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-75220362-1', 'auto'); + ga('send', 'pageview'); + +</script> +{% endblock %} + + diff --git a/scripts/stl/udp_1pkt_simple_burst.py b/scripts/stl/udp_1pkt_simple_burst.py new file mode 100644 index 00000000..bf485ab0 --- /dev/null +++ b/scripts/stl/udp_1pkt_simple_burst.py @@ -0,0 +1,24 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def create_stream (self): + return STLStream( + packet = + STLPktBuilder( + pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/ + UDP(dport=12,sport=1025)/(10*'x') + ), + mode = STLTXSingleBurst(total_pkts = 1)) + + def get_streams (self, direction = 0, **kwargs): + # create 1 stream + return [ self.create_stream() ] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + |