summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands/trex_rpc_cmd_general.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/commands/trex_rpc_cmd_general.cpp')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_general.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
index 6b765aca..32952b1a 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
@@ -20,6 +20,7 @@ limitations under the License.
*/
#include "trex_rpc_cmds.h"
#include <trex_rpc_server_api.h>
+#include <trex_stateless_api.h>
#ifndef TREX_RPC_MOCK_SERVER
#include <../linux_dpdk/version.h>
@@ -41,8 +42,7 @@ TrexRpcCmdGetStatus::_run(const Json::Value &params, Json::Value &result) {
section["general"]["version"] = VERSION_BUILD_NUM;
section["general"]["build_date"] = get_build_date();
section["general"]["build_time"] = get_build_time();
- section["general"]["version_user"] = VERSION_USER;
- section["general"]["uptime"] = TrexRpcServer::get_server_uptime();
+ section["general"]["built_by"] = VERSION_USER;
#else
@@ -50,10 +50,16 @@ TrexRpcCmdGetStatus::_run(const Json::Value &params, Json::Value &result) {
section["general"]["build_date"] = __DATE__;
section["general"]["build_time"] = __TIME__;
section["general"]["version_user"] = "MOCK";
- section["general"]["uptime"] = TrexRpcServer::get_server_uptime();
#endif
+ section["general"]["uptime"] = TrexRpcServer::get_server_uptime();
+ section["general"]["owner"] = TrexRpcServer::get_owner();
+
+ // ports
+
+ section["ports"]["count"] = TrexStateless::get_instance().get_port_count();
+
return (TREX_RPC_CMD_OK);
}