From d593a2239d687c262690a48dd731c86f5746c740 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Mon, 10 Jul 2023 00:27:37 -0400 Subject: [PATCH] doc: add call diagram of show oper state operation Signed-off-by: Christian Hopps --- doc/developer/mgmtd-dev.rst | 5 + doc/figures/cli-oper-state.drawio | 351 ++++++++++++++++++++++++++++++ doc/figures/cli-oper-state.svg | 3 + 3 files changed, 359 insertions(+) create mode 100644 doc/figures/cli-oper-state.drawio create mode 100644 doc/figures/cli-oper-state.svg diff --git a/doc/developer/mgmtd-dev.rst b/doc/developer/mgmtd-dev.rst index 663b8f0b0465..6a270f600953 100644 --- a/doc/developer/mgmtd-dev.rst +++ b/doc/developer/mgmtd-dev.rst @@ -221,3 +221,8 @@ The server (mgmtd) side of a CLI change .. figure:: ../figures/cli-change-mgmtd.svg :align: center + +Native messaging for show operational state. + +.. figure:: ../figures/cli-oper-state.svg + :align: center diff --git a/doc/figures/cli-oper-state.drawio b/doc/figures/cli-oper-state.drawio new file mode 100644 index 000000000000..2abf83d8e53e --- /dev/null +++ b/doc/figures/cli-oper-state.drawio @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/figures/cli-oper-state.svg b/doc/figures/cli-oper-state.svg new file mode 100644 index 000000000000..58380c381a00 --- /dev/null +++ b/doc/figures/cli-oper-state.svg @@ -0,0 +1,3 @@ + + +
Frontend CLI (mgmtd)
Frontend CLI (mgmtd)
MGMTD
MGMTD
xpath
xpath
txn
txn
clients (bitmask)
clients (bitmask)
fe_adapter_handle_get_tree
fe_adapter_handle_get_tree
be_adapter_handle_get_tree
mgmt_txn_notify_tree_data_reply
------------------------------------
merge tree data
when all clients respond or timeout
be_adapter_handle_get_tree...
mgmt_txn_send_get_tree_oper
mgmt_txn_send_get_tree_oper
mgmt_be_send_native
mgmt_be_send_native
socket connection
FE adapter -> FE client
MGMT_MSG_CODE_TREE_DATA
struct mgmt_msg_tree_data
socket connection...
txn_get_tree_data_done
fe_adapter_send_tree_data
txn_get_tree_data_done...
session->get_tree_notify
session->get_tree_notify
vty_mgmt_resume_response
vty_mgmt_resume_response
vty_mgmt_get_tree_result_notified
displays result
vty_mgmt_get_tree_result_notified...
clients (bitmask)
clients (bitmask)
mgmt_be_interested_clients
mgmt_be_interested_clients
vty_mgmt_send_get_tree_req
vty_mgmt_send_get_tree_req
socket connection
FE client -> FE adapter
MGMT_MSG_CODE_GET_TREE
struct mgmt_msg_get_tree
socket connection...
mgmt_fe_send_get_tree_req
mgmt_fe_send_get_tree_req
xpath
xpath
fe_adapter_handle_native_msg
fe_adapter_handle_native_msg
"show mgmt get-data-tree WORD$path [json|xml]"
"show mgmt get-data-tree WORD...
EVENT: VTYSH_READ
EVENT: VTYSH_READ
VTYSH
VTYSH
mgmt_create_txn
mgmt_create_txn
mgmt_txn_req_alloc
mgmt_txn_req_alloc
txn_req
MGMTD_TXN_PROC_GETTREE
txn_req...
for each of the clients
in bitmask
for ea...
be_client_send_native_msg
be_client_send_native_msg
be_adapter_handle_native_msg
be_adapter_handle_native_msg
socket connection
BE client -> BE adapter
MGMT_MSG_CODE_TREE_DATA
struct mgmt_msg_tree_data
socket connection...
be_client_send_native_msg
be_client_send_native_msg
Backend Client (ospfd, staticd, ...)
Backend Client (ospfd, staticd, ...)
build oper state tree
struct mgmt_msg_tree_data
build oper state tree...
be_client_handle_get_tree
be_client_handle_get_tree
nb_oper_data_iterate
nb_oper_data_iterate
be_client_handle_native_msg
be_client_handle_native_msg
be_client_send_native_msg
be_client_send_native_msg
for each of the
queried BE clients
for ea...
socket connection
BE adapter -> BE client
MGMT_MSG_CODE_GET_TREE
struct mgmt_msg_get_tree
socket connection...
fe_client_handle_native_msg
fe_client_handle_native_msg
socket async
socket async
timer/event async
timer/event async
function sync
function sync
Text is not SVG - cannot display
\ No newline at end of file