From 8bf788a06cc10678371ab54c1de74db932de04d8 Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Tue, 23 Jun 2020 14:40:18 +0200 Subject: [PATCH] [#1258] Ported basic status-get The status-get command support was ported without High Availability status. --- doc/sphinx/api-files.txt | 1 + doc/sphinx/api/status-get.json | 48 ++++++++++++++ doc/sphinx/arm/ctrl-channel.rst | 36 +++++++++++ doc/sphinx/arm/ddns.rst | 1 + doc/sphinx/arm/dhcp4-srv.rst | 1 + doc/sphinx/arm/dhcp6-srv.rst | 1 + doc/sphinx/arm/hooks-ha.rst | 64 +++++++++++++++++++ src/bin/agent/ca_controller.cc | 6 +- .../agent/tests/ca_controller_unittests.cc | 42 +++++++++++- src/bin/d2/d2_controller.cc | 6 +- src/bin/d2/tests/d2_command_unittest.cc | 43 ++++++++++++- src/bin/dhcp4/ctrl_dhcp4_srv.cc | 33 ++++++++++ src/bin/dhcp4/ctrl_dhcp4_srv.h | 12 ++++ .../dhcp4/tests/ctrl_dhcp4_srv_unittest.cc | 45 ++++++++++++- src/bin/dhcp6/ctrl_dhcp6_srv.cc | 34 +++++++++- src/bin/dhcp6/ctrl_dhcp6_srv.h | 12 ++++ .../dhcp6/tests/ctrl_dhcp6_srv_unittest.cc | 47 +++++++++++++- src/bin/shell/tests/shell_process_tests.sh.in | 4 +- src/lib/dhcpsrv/cfgmgr.cc | 6 +- src/lib/dhcpsrv/tests/cfgmgr_unittest.cc | 9 ++- src/lib/process/config_base.h | 18 +++++- src/lib/process/d_cfg_mgr.cc | 5 +- src/lib/process/d_controller.cc | 25 +++++++- src/lib/process/d_controller.h | 22 +++++-- src/lib/process/d_process.h | 7 +- src/lib/process/daemon.h | 6 +- 26 files changed, 513 insertions(+), 21 deletions(-) create mode 100644 doc/sphinx/api/status-get.json diff --git a/doc/sphinx/api-files.txt b/doc/sphinx/api-files.txt index bb552ae516..53b7aff447 100644 --- a/doc/sphinx/api-files.txt +++ b/doc/sphinx/api-files.txt @@ -134,6 +134,7 @@ api/statistic-sample-age-set-all.json api/statistic-sample-age-set.json api/statistic-sample-count-set-all.json api/statistic-sample-count-set.json +api/status-get.json api/stat-lease4-get.json api/stat-lease6-get.json api/subnet4-add.json diff --git a/doc/sphinx/api/status-get.json b/doc/sphinx/api/status-get.json new file mode 100644 index 0000000000..9fc6286ed7 --- /dev/null +++ b/doc/sphinx/api/status-get.json @@ -0,0 +1,48 @@ +{ + "avail": "1.6.3", + "brief": [ + "This command returns server's runtime information.", + "It takes no arguments." + ], + "cmd-syntax": [ + "{", + " \"command\": \"status-get\"", + "}" + ], + "description": "See ", + "name": "status-get", + "resp-comment": [ + "If the libdhcp_ha (High Availability) hooks library is loaded by the DHCP server receiving this command the response also includes the HA specific status information of the server receiving the command and its partner's status." + ], + "resp-syntax": [ + "{", + " \"result\": ,", + " \"arguments\": {", + " \"pid\": ,", + " \"uptime\": ,", + " \"reload\":