From 0c5a4348a31e0e8d76dd1fcf378cb2c0a2867f59 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Thu, 15 Oct 2015 09:57:35 +0300 Subject: updated yaml utils and stream object --- .../trex_control_plane/common/rpc_defaults.yaml | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 scripts/automation/trex_control_plane/common/rpc_defaults.yaml (limited to 'scripts/automation/trex_control_plane/common/rpc_defaults.yaml') diff --git a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml new file mode 100644 index 00000000..fbaca40e --- /dev/null +++ b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml @@ -0,0 +1,107 @@ +############################################################## +#### TRex RPC stream list default values #### +############################################################## + +# this document is based on TRex RPC server spec and its fields: +# http://trex-tgn.cisco.com/trex/doc/trex_rpc_server_spec.html + +### HOW TO READ THIS FILE +# 1. Each key represents an object type +# 2. Each value can be either a value field or another object +# 2.1. If a value field, read as: +# + type: type of field +# + has_default: if the value has any default +# + default: the default value (Only appears if has_default field is 'YES') +# 2.2. If an object type, jump to correspoding object key. +# 3. If an object has more than one instance type, another layer with the type shall be added. +# For example, 'mode' object has 3 types: 'continuous', 'single_burst', 'multi_burst' +# So, 3 mode objects will be defined, named: +# - mode['continuous'] +# - mode['single_burst'] +# - mode['multi_burst'] +# In this case, there's no default for the 'type' field on the object +# 4. Some values has 'multiplier' property attached. +# In such case, the loaded value will be multiplied by the multiplier +# For example, if the mode's 'pps' field value is 10, and its multiplier is 5, +# the loaded pps value will be 10*5=50 + + +stream: + enabled: + type: boolean + has_default: YES + default: True + self_start: + type: boolean + has_default: YES + default: True + isg: + type: double + has_default: YES + default: 0.0 + next_stream_id: + type: [int, string] # string to allow naming binding + has_default: YES + default: -1 # no next streams + packet: + type: object + mode: + type: object + vm: + type: array + has_default: YES + default: [] # no ranging instructions + rx_stats: + type: object + +packet: + binary: + type: [array,string] + has_default: NO + meta: + type: string + has_default: YES + default: "" + +mode: + continuous: + pps: + type: double + has_default: NO + multiplier: 1.0 + single_burst: + pps: + type: int + has_default: NO + total_pkts: + type: int + has_default: NO + multiplier: 1.0 + multi_burst: + pps: + type: int + has_default: NO + pkts_per_burst: + type: int + has_default: NO + ibg: + type: double + has_default: YES + default: 100.0 + count: + type: int + has_default: YES + default: 0 # loop forever + multiplier: 1.0 + +rx_stats: + enabled: + type: boolean + has_default: YES + default: False + seq_enabled: + type: boolean + has_default: NO + latency_enabled: + type: boolean + has_default: NO \ No newline at end of file -- cgit From 2c38ad7f49fbddfdc75c150cbb2abdd54e3ede52 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Fri, 16 Oct 2015 15:37:46 +0300 Subject: Updated YAMLutils and rpc_defaults with relevant progress --- .../trex_control_plane/common/rpc_defaults.yaml | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) mode change 100644 => 100755 scripts/automation/trex_control_plane/common/rpc_defaults.yaml (limited to 'scripts/automation/trex_control_plane/common/rpc_defaults.yaml') diff --git a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml old mode 100644 new mode 100755 index fbaca40e..576710a3 --- a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml +++ b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml @@ -12,7 +12,7 @@ # + type: type of field # + has_default: if the value has any default # + default: the default value (Only appears if has_default field is 'YES') -# 2.2. If an object type, jump to correspoding object key. +# 2.2. If an object type, jump to corresponding object key. # 3. If an object has more than one instance type, another layer with the type shall be added. # For example, 'mode' object has 3 types: 'continuous', 'single_burst', 'multi_burst' # So, 3 mode objects will be defined, named: @@ -20,10 +20,12 @@ # - mode['single_burst'] # - mode['multi_burst'] # In this case, there's no default for the 'type' field on the object -# 4. Some values has 'multiplier' property attached. +# 4. Some values has 'multiply' property attached. # In such case, the loaded value will be multiplied by the multiplier # For example, if the mode's 'pps' field value is 10, and its multiplier is 5, # the loaded pps value will be 10*5=50 +# 5. Any object type must be listed by the user, even if all its field are defaults. +# The most basic option would be to declare the object with "[]", which stands for empty object in YAML syntax. stream: @@ -36,7 +38,7 @@ stream: has_default: YES default: True isg: - type: double + type: [int, double, string] has_default: YES default: 0.0 next_stream_id: @@ -66,33 +68,33 @@ packet: mode: continuous: pps: - type: double + type: [int, double] has_default: NO - multiplier: 1.0 + multiply: YES single_burst: pps: - type: int + type: [int, double] has_default: NO + multiply: YES total_pkts: type: int has_default: NO - multiplier: 1.0 multi_burst: pps: - type: int + type: [int, double] has_default: NO + multiply: YES pkts_per_burst: type: int has_default: NO ibg: - type: double + type: [int, double, string] has_default: YES default: 100.0 count: type: int has_default: YES default: 0 # loop forever - multiplier: 1.0 rx_stats: enabled: @@ -101,7 +103,9 @@ rx_stats: default: False seq_enabled: type: boolean - has_default: NO + has_default: YES + default: False latency_enabled: type: boolean - has_default: NO \ No newline at end of file + has_default: YES + default: False \ No newline at end of file -- cgit From 4a8d34c7548e85e97426bc1d85c670003b1f5870 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Sun, 18 Oct 2015 10:24:53 +0300 Subject: more yaml utils, better streams handling --- scripts/automation/trex_control_plane/common/rpc_defaults.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/common/rpc_defaults.yaml') diff --git a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml index 576710a3..5816f980 100755 --- a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml +++ b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml @@ -41,7 +41,7 @@ stream: type: [int, double, string] has_default: YES default: 0.0 - next_stream_id: + next_stream: type: [int, string] # string to allow naming binding has_default: YES default: -1 # no next streams -- cgit From d09df99769f67819c64a7a025dbdcd39811c7b44 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Tue, 20 Oct 2015 03:17:08 +0300 Subject: Major progress in console, yaml utils, and trex_streams basically done, minor changes remianing BIG ISSUE LEFT: rewire console to work with trexstateless client module --- scripts/automation/trex_control_plane/common/rpc_defaults.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/automation/trex_control_plane/common/rpc_defaults.yaml') diff --git a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml index 5816f980..32631609 100755 --- a/scripts/automation/trex_control_plane/common/rpc_defaults.yaml +++ b/scripts/automation/trex_control_plane/common/rpc_defaults.yaml @@ -41,8 +41,8 @@ stream: type: [int, double, string] has_default: YES default: 0.0 - next_stream: - type: [int, string] # string to allow naming binding + next_stream_id: + type: string # string to allow naming binding has_default: YES default: -1 # no next streams packet: @@ -101,6 +101,10 @@ rx_stats: type: boolean has_default: YES default: False + stream_id: + type: string + has_default: YES + default: False # use related stream_id seq_enabled: type: boolean has_default: YES -- cgit