{
"id": "l0tog11a",
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
[SUCCESS]
{
"id" : "maa5a3g1",
"jsonrpc" : "2.0",
- "result" : "ACK"
+ "result" : {}
}
----
* *Valid States* - 'not relevant'
* *Description* - Pings the TRex server
* *Paramters* - None
-* *Result* ['string'] - "ACK" On Sucess
+* *Result* ['object'] - {}
Example:
{
"jsonrpc" : "2.0",
"id" : 1,
- "result" : "ACK"
+ "result" : {}
}
----
|=================
| Field | Type | Description
| driver | string | driver type
-| speed | string | speed of the port (1g, 10g, 40g, 100g)
-| status | string | 'down', 'idle' or 'transmitting'
+| index | int | port index
+| speed | int | speed of the port (1, 10, 40, 100)
|=================
"port_count": 4,
"ports": [
{
- "driver": "E1000",
+ "driver": "rte_ixgbe_pmd",
"index": 0,
- "speed": "1g",
- "status": "down"
+ "speed": 10,
},
{
- "driver": "E1000",
+ "driver": "rte_ixgbe_pmd",
"index": 1,
- "speed": "1g",
- "status": "down"
+ "speed": 10,
},
{
- "driver": "E1000",
+ "driver": "rte_ixgbe_pmd",
"index": 2,
- "speed": "1g",
- "status": "down"
+ "speed": 10,
},
{
- "driver": "E1000",
+ "driver": "rte_ixgbe_pmd",
"index": 3,
- "speed": "1g",
- "status": "down"
+ "speed": 10,
}
]
}
----
-=== Get Owner
-* *Name* - 'get_owner'
+=== Get Port Status
+* *Name* - 'get_port_status'
* *Valid States* - 'all'
-* *Description* - Queries the server for a specific port current owner
+* *Description* - Queries the server for status
* *Paramters* -
** *port_id* ['int'] - port id to query for owner
-* *Result* ['string'] - owner name if exists, otherwise 'none'
+* *Result* ['object'] - see below
[source,bash]
----
'Request':
{
- "id": "hxjkuwj9",
+ "id": "pbxny90u",
"jsonrpc": "2.0",
- "method": "get_owner",
+ "method": "get_port_status",
"params": {
- "port_id": 1
+ "port_id": 2
}
}
'Response':
{
- "id": "hxjkuwj9",
+ "id": "pbxny90u",
"jsonrpc": "2.0",
"result": {
- "owner": "itay"
+ "owner": "",
+ "state": "STREAMS"
}
}
----
+.return value: 'get_port_status'
+[options="header",cols="1,1,3"]
+|=================
+| Field | Type | Description
+| owner | string | name of current owner (or "" if none)
+| state | string | state of port (DOWN, IDLE, STREAMS, TX, PAUSE)
+|=================
+
+
+
=== Acquire
* *Name* - 'Acquire'
* *Valid States* - 'all'
** *port_id* ['int'] - port id to take ownership
** *user* ['string'] - User name aquiring the system
** *force* ['boolean'] - force action even if another user is holding the port
-* *Result* ['string'] - 'unique' connection handler for future requests for that port
+* *Result* ['string'] - handler for future sessions
[source,bash]
----
{
"id": "b1tr56yz",
"jsonrpc": "2.0",
- "result": "4cBWDxS2"
+ "result": "AQokC3ZA"
}
+
----
* *Paramters* -
** *handler* ['string'] - unique connection handler
** *port_id* ['int'] - port id to release
-* *Result* ['string'] - "ACK" on success
+* *Result* ['object'] - {}
[source,bash]
----
{
"id": "m785dxwd",
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
----
** *port_id* ['int'] - port id associated with this stream
** *stream_id* ['int'] - stream id associated with the stream object
** *stream* - object of type xref:stream_obj['stream']
-* *Result* ['string'] - "ACK" in case of success
+* *Result* ['object'] - {}
==== Object type 'stream' anchor:stream_obj[]
{
"id": 1,
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
** *port_id* ['int'] - port assosicated with the stream.
** *stream_id* ['int'] - stream to remove
-* *Result* ['string'] - "ACK" in case of success
+* *Result* ['object'] - {}
[source,bash]
----
{
"id": 1
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
----
=== Get Stream ID List
* *Name* - 'get_stream_list'
-* *Valid States* - 'owned', 'active'
+* *Valid States* - 'unowned', 'owned', 'active'
* *Description* - fetch all the assoicated streams for a port
* *Paramters*
** *handler* ['string'] - unique connection handler
=== Get Stream
* *Name* - 'get_stream'
-* *Valid States* - 'owned', 'active'
+* *Valid States* - 'unowned', 'owned', 'active'
* *Description* - get a specific stream object
* *Paramters*
** *handler* ['string'] - unique connection handler
** *handler* ['string'] - unique connection handler
** *port_id* ['int'] - port for the associated stream
-* *Result* ['string'] - "ACK" on success
+* *Result* ['object'] - {}
[source,bash]
{
"id": 1,
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
** *handler* ['string'] - unique connection handler
** *port_id* ['int'] - port id on which to start traffic
-* *Result* ['string'] - "ACK" on success
+* *Result* ['object'] - {}
[source,bash]
----
{
"id": "b3llt8hs",
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
** *handler* ['string'] - unique connection handler
** *port_id* ['int'] - port id on which to stop traffic
-* *Result* ['string'] - "ACK" on success
+* *Result* ['object'] - {}
[source,bash]
----
{
"id": "h2fyhni7",
"jsonrpc": "2.0",
- "result": "ACK"
+ "result": {}
}
=== Get Global Stats
* *Name* - 'get_global_stats'
-* *Valid States* - 'owned', 'active'
+* *Valid States* - 'unowned', 'owned', 'active'
* *Description* - Get machine global stats
* *Paramters* - None
=== Get Port Stats
* *Name* - 'get_port_stats'
-* *Valid States* - 'owned', 'active'
+* *Valid States* - 'unowned', 'owned', 'active'
* *Description* - Get port stats
* *Paramters*
** *port_id* [int] - The port id for query
* *Result* ['object'] - See Below
+
.Return value of 'get_port_stats'
[options="header",cols="1,1,3"]
|=================
=== Get Stream Stats
* *Name* - 'get_steram_stats'
-* *Valid States* - 'owned', 'active'
+* *Valid States* - 'unowned', 'owned', 'active'
* *Description* - Get port stats
* *Paramters*
** *port_id* [int] - The port id for query
{
"id" : "2bqgd2r4",
"jsonrpc" : "2.0",
- "result" : "ACK"
+ "result" : {}
}
----
{
"id" : "tq49f6uj",
"jsonrpc" : "2.0",
- "result" : "ACK"
+ "result" : {}
},
{
"id" : "2m7i5olx",
"jsonrpc" : "2.0",
- "result" : "ACK"
+ "result" : {}
}
]