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)MGMTDMGMTDxpathxpathtxntxnclients (bitmask)clients (bitmask)fe_adapter_handle_get_treefe_adapter_handle_get_treebe_adapter_handle_get_treemgmt_txn_notify_tree_data_reply------------------------------------merge tree datawhen all clients respond or timeoutbe_adapter_handle_get_tree...mgmt_txn_send_get_tree_opermgmt_txn_send_get_tree_opermgmt_be_send_nativemgmt_be_send_nativesocket connectionFE adapter -> FE clientMGMT_MSG_CODE_TREE_DATAstruct mgmt_msg_tree_datasocket connection...txn_get_tree_data_donefe_adapter_send_tree_datatxn_get_tree_data_done...session->get_tree_notifysession->get_tree_notifyvty_mgmt_resume_responsevty_mgmt_resume_responsevty_mgmt_get_tree_result_notifieddisplays resultvty_mgmt_get_tree_result_notified...clients (bitmask)clients (bitmask)mgmt_be_interested_clientsmgmt_be_interested_clientsvty_mgmt_send_get_tree_reqvty_mgmt_send_get_tree_reqsocket connectionFE client -> FE adapterMGMT_MSG_CODE_GET_TREEstruct mgmt_msg_get_treesocket connection...mgmt_fe_send_get_tree_reqmgmt_fe_send_get_tree_reqxpathxpathfe_adapter_handle_native_msgfe_adapter_handle_native_msg"show mgmt get-data-tree WORD$path [json|xml]""show mgmt get-data-tree WORD...EVENT: VTYSH_READEVENT: VTYSH_READVTYSHVTYSHmgmt_create_txnmgmt_create_txnmgmt_txn_req_allocmgmt_txn_req_alloctxn_reqMGMTD_TXN_PROC_GETTREEtxn_req...for each of the clientsin bitmaskfor ea...be_client_send_native_msgbe_client_send_native_msgbe_adapter_handle_native_msgbe_adapter_handle_native_msgsocket connectionBE client -> BE adapterMGMT_MSG_CODE_TREE_DATAstruct mgmt_msg_tree_datasocket connection...be_client_send_native_msgbe_client_send_native_msgBackend Client (ospfd, staticd, ...)Backend Client (ospfd, staticd, ...)build oper state treestruct mgmt_msg_tree_databuild oper state tree...be_client_handle_get_treebe_client_handle_get_treenb_oper_data_iteratenb_oper_data_iteratebe_client_handle_native_msgbe_client_handle_native_msgbe_client_send_native_msgbe_client_send_native_msgfor each of thequeried BE clientsfor ea...socket connectionBE adapter -> BE clientMGMT_MSG_CODE_GET_TREEstruct mgmt_msg_get_treesocket connection...fe_client_handle_native_msgfe_client_handle_native_msgsocket asyncsocket asynctimer/event asynctimer/event async function syncfunction syncText is not SVG - cannot display \ No newline at end of file