summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-24 14:55:59 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-24 14:55:59 +0200
commit5a844c9d72411435842e5a0674c6fdc04e5d4e84 (patch)
treedc2738fe0638ac0ed856c70564bc7096bb33868e /src/rpc-server/commands
parent9e616d8eecaefbf538174328edfce8fd96336ce6 (diff)
parent3eb4f868ef5bc728a46c8012c914f6a9381f4cdb (diff)
Merge GARP example
Diffstat (limited to 'src/rpc-server/commands')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp13
-rw-r--r--src/rpc-server/commands/trex_rpc_cmds.h2
2 files changed, 4 insertions, 11 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index 93a680c9..d2cb4ce6 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -103,11 +103,11 @@ TrexRpcCmdAddStream::_run(const Json::Value &params, Json::Value &result) {
/* parse RX info */
const Json::Value &rx = parse_object(section, "rx_stats", result);
- stream->m_rx_check.m_enable = parse_bool(rx, "enabled", result);
+ stream->m_rx_check.m_enabled = parse_bool(rx, "enabled", result);
/* if it is enabled - we need more fields */
- if (stream->m_rx_check.m_enable) {
- stream->m_rx_check.m_stream_id = parse_int(rx, "stream_id", result);
+ if (stream->m_rx_check.m_enabled) {
+ stream->m_rx_check.m_user_id = parse_int(rx, "stream_id", result);
stream->m_rx_check.m_seq_enabled = parse_bool(rx, "seq_enabled", result);
stream->m_rx_check.m_latency = parse_bool(rx, "latency_enabled", result);
}
@@ -590,8 +590,6 @@ TrexRpcCmdGetAllStreams::_run(const Json::Value &params, Json::Value &result) {
uint8_t port_id = parse_port(params, result);
TrexStatelessPort *port = get_stateless_obj()->get_port_by_id(port_id);
- bool get_pkt = parse_bool(params, "get_pkt", result);
-
std::vector <TrexStream *> streams;
port->get_object_list(streams);
@@ -600,11 +598,6 @@ TrexRpcCmdGetAllStreams::_run(const Json::Value &params, Json::Value &result) {
Json::Value j = stream->get_stream_json();
- /* should we include the packet as well ? */
- if (!get_pkt) {
- j.removeMember("packet");
- }
-
std::stringstream ss;
ss << stream->m_stream_id;
diff --git a/src/rpc-server/commands/trex_rpc_cmds.h b/src/rpc-server/commands/trex_rpc_cmds.h
index d90d880e..9545e585 100644
--- a/src/rpc-server/commands/trex_rpc_cmds.h
+++ b/src/rpc-server/commands/trex_rpc_cmds.h
@@ -107,7 +107,7 @@ void parse_vm_instr_write_mask_flow_var(const Json::Value &inst, std::unique_ptr
TREX_RPC_CMD_DEFINE(TrexRpcCmdGetStreamList, "get_stream_list", 1, false);
-TREX_RPC_CMD_DEFINE(TrexRpcCmdGetAllStreams, "get_all_streams", 2, false);
+TREX_RPC_CMD_DEFINE(TrexRpcCmdGetAllStreams, "get_all_streams", 1, false);
TREX_RPC_CMD_DEFINE(TrexRpcCmdGetStream, "get_stream", 3, false);