]> git.puffer.fish Git - matthieu/frr.git/commitdiff
doc: Add documentation for MGMT daemon
authorPushpasis Sarkar <spushpasis@vmware.com>
Fri, 29 Oct 2021 17:22:42 +0000 (10:22 -0700)
committerChristian Hopps <chopps@labn.net>
Wed, 6 Apr 2022 01:41:23 +0000 (21:41 -0400)
This commit adds user documentation for the new MGMT daemon and
new FRR Management Framework.

Co-authored-by: Yash Ranjan <ranjany@vmware.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
24 files changed:
doc/developer/building-frr-for-centos6.rst
doc/developer/building-frr-for-centos7.rst
doc/developer/building-frr-for-centos8.rst
doc/developer/building-frr-for-debian8.rst
doc/developer/building-frr-for-debian9.rst
doc/developer/building-frr-for-fedora.rst
doc/developer/building-frr-for-freebsd10.rst
doc/developer/building-frr-for-freebsd11.rst
doc/developer/building-frr-for-freebsd9.rst
doc/developer/building-frr-for-netbsd6.rst
doc/developer/building-frr-for-netbsd7.rst
doc/developer/building-frr-for-openbsd6.rst
doc/developer/building-frr-for-opensuse.rst
doc/developer/building-frr-for-ubuntu1404.rst
doc/developer/building-frr-for-ubuntu1604.rst
doc/user/index.rst
doc/user/mgmtd.rst [new file with mode: 0644]
doc/user/subdir.am
docker/alpine/Dockerfile
docker/centos-7/Dockerfile
docker/centos-8/Dockerfile
docker/debian/Dockerfile
docker/ubuntu18-ci/Dockerfile
docker/ubuntu20-ci/Dockerfile

index 7a7af42119cdef460465ee5d4f63e6f9be7e83c5..233d089f79571cc781232b860df196874122c95d 100644 (file)
@@ -46,7 +46,7 @@ Add packages:
    sudo yum install git autoconf automake libtool make \
       readline-devel texinfo net-snmp-devel groff pkgconfig \
       json-c-devel pam-devel flex epel-release c-ares-devel libcap-devel \
-      elfutils-libelf-devel
+      elfutils-libelf-devel protobuf-c-devel
 
 Install newer version of bison (CentOS 6 package source is too old) from CentOS
 7:
index c40b5de594dfbaeef83afef5570ece0aef715032..e6da83019405c793d09c0273436f50428fdacbbd 100644 (file)
@@ -22,7 +22,7 @@ Add packages:
       readline-devel texinfo net-snmp-devel groff pkgconfig \
       json-c-devel pam-devel bison flex pytest c-ares-devel \
       python-devel python-sphinx libcap-devel \
-      elfutils-libelf-devel libunwind-devel
+      elfutils-libelf-devel libunwind-devel protobuf-c-devel
 
 .. include:: building-libunwind-note.rst
 
index 659752f6df98d379d9bccfcd0a36f21ddab1c18d..6d18e7be93a35b2ef9d7357245ec74afc790de42 100644 (file)
@@ -15,7 +15,8 @@ Add packages:
       automake libtool make readline-devel texinfo net-snmp-devel pkgconfig \
       groff pkgconfig json-c-devel pam-devel bison flex python2-pytest \
       c-ares-devel python2-devel libcap-devel \
-      elfutils-libelf-devel libunwind-devel
+      elfutils-libelf-devel libunwind-devel \
+      protobuf-c-devel
 
 .. include:: building-libunwind-note.rst
 
index 5e58854ed7ab1b6e4bffa26b080f5245461e434f..7071cb660de8d156df7b6256025a33c3eec22f28 100644 (file)
@@ -18,7 +18,7 @@ Add packages:
    sudo apt-get install git autoconf automake libtool make \
       libreadline-dev texinfo libjson-c-dev pkg-config bison flex python3-pip \
       libc-ares-dev python3-dev python3-sphinx build-essential \
-      libsnmp-dev libcap-dev libelf-dev
+      libsnmp-dev libcap-dev libelf-dev libprotobuf-c-dev protobuf-c-compiler
 
 Install newer pytest (>3.0) from pip
 
index b2fdef9990415d8312b8661fa14b65ec42129faa..1b2f1b933a4255fe63b07350cbef873474a97365 100644 (file)
@@ -11,7 +11,8 @@ Add packages:
    sudo apt-get install git autoconf automake libtool make \
      libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
      libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \
-     libsnmp-dev libcap-dev libelf-dev libunwind-dev
+     libsnmp-dev libcap-dev libelf-dev libunwind-dev \
+     libprotobuf-c-dev protobuf-c-compiler
 
 .. include:: building-libunwind-note.rst
 
index dc869ece1057d7101111a618d52d37574c653a4b..75f3d91a33864bbaef27fb893e8563e539cfa07a 100644 (file)
@@ -15,7 +15,7 @@ Installing Dependencies
      readline-devel texinfo net-snmp-devel groff pkgconfig json-c-devel \
      pam-devel python3-pytest bison flex c-ares-devel python3-devel \
      python3-sphinx perl-core patch libcap-devel \
-     elfutils-libelf-devel libunwind-devel
+     elfutils-libelf-devel libunwind-devel protobuf-c-devel
 
 .. include:: building-libunwind-note.rst
 
index 5e70b81d43d7fc79f9f9386aacd7d5a3793e0a25..707f1e703364888b2cac4cad76f88ae98f3bcd6d 100644 (file)
@@ -17,7 +17,8 @@ is first package install and asked)
 ::
 
     pkg install git autoconf automake libtool gmake json-c pkgconf \
-        bison flex py36-pytest c-ares python3.6 py36-sphinx libunwind
+        bison flex py36-pytest c-ares python3.6 py36-sphinx libunwind \
+        protobuf-c
 
 .. include:: building-libunwind-note.rst
 
index 808207b8314869ea41fc889fcf0976113bdc34af..af0b72b16def36f7471e21ba4970510548635cf2 100644 (file)
@@ -17,7 +17,8 @@ is first package install and asked)
 .. code-block:: shell
 
    pkg install git autoconf automake libtool gmake json-c pkgconf \
-      bison flex py36-pytest c-ares python3.6 py36-sphinx texinfo libunwind
+      bison flex py36-pytest c-ares python3.6 py36-sphinx texinfo libunwind \
+      protobuf-c
 
 .. include:: building-libunwind-note.rst
 
index 1e97749795257dea96d94f133ca6b907107b76e4..30332875a01672ca244e9d17880e13f5a59fd55a 100644 (file)
@@ -18,7 +18,7 @@ is first package install and asked)
 
     pkg install -y git autoconf automake libtool gmake \
         pkgconf texinfo json-c bison flex py36-pytest c-ares \
-        python3 py36-sphinx libexecinfo
+        python3 py36-sphinx libexecinfo protobuf-c
 
 Make sure there is no /usr/bin/flex preinstalled (and use the newly
 installed in /usr/local/bin): (FreeBSD frequently provides a older flex
index a78f8b3c2f206f450a4c9753484912b56e036fd3..8958862fea7e36deebdc52b9101f01993ef50ec7 100644 (file)
@@ -23,7 +23,8 @@ Add packages:
 ::
 
     sudo pkg_add git autoconf automake libtool gmake openssl \
-       pkg-config json-c py36-test python36 py36-sphinx
+       pkg-config json-c py36-test python36 py36-sphinx \
+       protobuf-c
 
 Install SSL Root Certificates (for git https access):
 
index a52ece19a18b78d6b2f74ab41fc9a62bc91dce0e..e751ba338c11f27633513208803437eb005eb03b 100644 (file)
@@ -14,7 +14,8 @@ Install required packages
 ::
 
     sudo pkgin install git autoconf automake libtool gmake openssl \
-       pkg-config json-c python36 py36-test py36-sphinx
+       pkg-config json-c python36 py36-test py36-sphinx \
+       protobuf-c
 
 Install SSL Root Certificates (for git https access):
 
index 88446685e06784479b3adc4f1472b47d789fe261..00bc2e5f091d42ad4f49928e2421aa7dfa99b88d 100644 (file)
@@ -16,7 +16,7 @@ Add packages:
 
     pkg_add clang libcares python3
     pkg_add git autoconf-2.69p2 automake-1.15.1 libtool bison
-    pkg_add gmake json-c py-test py-sphinx libexecinfo
+    pkg_add gmake json-c py-test py-sphinx libexecinfo protobuf-c
 
 Select Python2.7 as default (required for pytest)
 
index d9800a1638de1842c4d5acf3f650ba35c280928b..2ae77ae869607e23a1c432cb8da055631cb12b4e 100644 (file)
@@ -14,7 +14,7 @@ Installing Dependencies
      readline-devel texinfo net-snmp-devel groff pkgconfig libjson-c-devel\
      pam-devel python3-pytest bison flex c-ares-devel python3-devel\
      python3-Sphinx perl patch libcap-devel libyang-devel \
-     libelf-devel libunwind-devel
+     libelf-devel libunwind-devel protobuf-c
 
 .. include:: building-libunwind-note.rst
 
index 2711e92b6ff1ae15c778d61ba23d8c73d2237486..cc6c3c03f3838848ba5138ad0f2b4e27a4577ffd 100644 (file)
@@ -18,6 +18,13 @@ Installing Dependencies
 
 .. include:: building-libyang.rst
 
+Protobuf
+^^^^^^^^
+
+.. code-block:: console
+
+   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
+
 Building & Installing FRR
 -------------------------
 
index d79545c859b00262238b73e6940c88101fc138eb..e5c2389f399c67487d430957a82561f6357a389b 100644 (file)
@@ -15,10 +15,17 @@ Installing Dependencies
       pkg-config libpam0g-dev libjson-c-dev bison flex python3-pytest \
       libc-ares-dev python3-dev python-ipaddress python3-sphinx \
       install-info build-essential libsnmp-dev perl libcap-dev \
-      libelf-dev
+      libelf-dev libprotobuf-c-dev protobuf-c-compiler
 
 .. include:: building-libyang.rst
 
+Protobuf
+^^^^^^^^
+
+.. code-block:: console
+
+   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
+
 Building & Installing FRR
 -------------------------
 
index 5a018a55835f19a21bcd0782031e384741f17005..f417c61e32ee3ca22c622fd0f17a2294c65a949e 100644 (file)
@@ -64,6 +64,7 @@ Protocols
    vrrp
    bmp
    watchfrr
+   mgmtd
 
 ########
 Appendix
diff --git a/doc/user/mgmtd.rst b/doc/user/mgmtd.rst
new file mode 100644 (file)
index 0000000..6a56a02
--- /dev/null
@@ -0,0 +1,376 @@
+.. _mgmtd:
+
+*************************
+MGMTd (Management Daemon)
+*************************
+
+The FRR Management Daemon (from now on referred to as MGMTd) is a new
+centralized entity representing the FRR Management Plane which can take
+management requests from any kind of UI/Frontend entity (e.g. CLI, Netconf,
+Restconf, Grpc etc.) over a new unified and common Frontend interface and
+can help maintain configurational data or retrieve operational data from
+any number of FRR managed entities/components that have been integrated
+with the new FRR Centralised Management Framework.
+
+For organizing the management data to be owned by the FRR Management plane,
+management data is stored in YANG in compliance with a pre-defined set
+of YANG based schema. Data shall also be stored/retrieved in YANG format only.
+
+The MGMTd also acts as a separate computational entity for offloading much
+of the management related computational overload involved in maintaining of
+management data and processing of management requests, from individual
+component daemons (which can otherwise be a signficant burden on the individual
+components, affecting performance of its other functionalities).
+
+Lastly, the MGMTd works in-tandem with one (or more) MGMT Frontend
+Clients and a bunch of MGMT Backend Clients to realize the entirety
+of the FRR Management plane. Some of the advanatages of this new framework
+are:
+
+ 1. Consolidation and management of all Management data by a single entity.
+ 2. Better control over configuration validation, commit and rollback.
+ 3. Faster collection of configuration data (without needing to involve
+    individual component daemons).
+ 4. Offload computational burden of YANG data parsing and validations
+    of new configuration data being provisoned away from individual
+    component daemons
+ 5. Improve performance of individual component daemons while loading
+    huge configuration or retrieving huge operational dataset.
+
+The new FRR Management Daemon consists of the following sub-components:
+ - MGMT Frontend Interface
+ - MGMT Backend Interface
+ - MGMT Transaction Engine
+
+.. _mgmt_frntnd:
+
+MGMT Frontend Interface
+=======================
+
+The MGMT Frontend Interface is a bunch of message-based APIs that lets
+any UI/Frontend client to interact with the MGMT daemon to requests a
+set of management operations on a specific datastore/database.
+Following is a list of databases/datastores supported by the MGMT
+Frontend Interface and MGMTd:
+
+ - Candidate Database:
+
+  - Consists of configuration data items only.
+  - Data can be edited anytime using SET_CONFIG API.
+  - Data can be retrieved anytime using GET_CONFIG/GET_DATA API.
+
+ - Running Database:
+
+  - Consists of configuration data items only.
+  - Data cannot be edited using SET_CONFIG API.
+  - Data can only be modified using COMMIT_CONFIG API after which un-committed
+    data from Candidate database will be first validated and applied to
+    individualBackend component(s). Only on successful validation and apply on
+    all individual components will the new data be copied over to the Running
+    database.
+  - Data can be retrieved anytime using GET_CONFIG/GET_DATA API.
+
+ - Startup Database:
+
+  - Consists of configuration data items only.
+  - This is a copy of Running database that is stored in persistent
+    storage and is used to load configurations on Running database during
+    MGMT daemon startup.
+  - Data cannot be edited/retrieved directly via Frontend interface.
+
+ - Operational Database:
+
+  - Consists of non-configurational data items.
+  - Data is not stored on MGMT daemon. Rather it will be need to be fetched
+    in real-time from the corresponding Backend component (if present).
+  - Data can be retrieved anytime using GET_DATA API.
+
+Frontend Clients connected to MGMTd via Frontend Interface can themselves have
+multiple connections from one (or more) of its own remote clients. The MGMT
+Frontend Interface supports reresenting each of the remote clients for a given
+Frontend client(e.g. Netconf clients on a single Netconf server) as individual
+Frontend Client Sessions. So a single connection from a single Frontend Client
+can create more than one Frontend Client sessions.
+
+Following are some of the management operations supported:
+ - INIT_SESSION/CLOSE_SESSION: Create/Destroy a session. Rest of all the
+   operations are supported only in the context of a specific session.
+ - LOCK_DB/UNLOCK_DB: Lock/Unlock Management datastores/databases.
+ - GET_CONFIG/GET_DATA: Retrieve configurational/operational data from a
+   specific datastore/database.
+ - SET_CONFIG/DELETE_CONFIG: Add/Modify/Delete specific data in a specific
+   datastore/database.
+ - COMMIT_CONFIG: Validate and/or apply the uncommited set of configurations
+   from one configuration database to another.
+ - Currently committing configurations from Candidate to Running database
+   is only allowed, and not vice versa.
+
+The exact set of message-based APIs are represented as Google Protobuf
+messages and can be found in the following file distributed with FRR codebase.
+
+.. code-block:: frr
+
+   lib/mgmt.proto
+
+The MGMT daemon implements a MGMT Frontend Server that opens a UNIX
+socket-based IPC channel on the following path to listen for incoming
+connections from all possible Frontend clients:
+
+.. code-block:: frr
+
+   /var/run/frr/mgmtd_frntnd.sock
+
+Each connection received from a Frontend client is managed and tracked
+as a MGMT Frontend adapter by the MGMT Frontend Adapter sub-component
+implemented by MGMTd.
+
+To facilitate faster development/integration of Frontend clients with
+MGMT Frontend Interface, a C-based library has been developed. The API
+specification of this library can be found at:
+
+.. code-block:: frr
+
+   lib/mgmt_frntnd_client.h
+
+Following is a list of message types supported on the MGMT Frontend Interface:
+ - SESSION_REQ<Client-Connection-Id, Destroy>
+ - SESSION_REPLY<Client-Connection-Id, Destroy, Session-Id>
+ - LOCK_DB_REQ <Session-Id, Database-Id>
+ - LOCK_DB_REPLY <Session-Id, Database-Id>
+ - UNLOCK_DB_REQ <Session-Id, Database-Id>
+ - UNLOCK_DB_REPLY <Session-Id, Database-Id>
+ - GET_CONFIG_REQ <Session-Id, Database-Id, Base-Yang-Xpath>
+ - GET_CONFIG_REPLY <Session-Id, Database-Id, Base-Yang-Xpath, Yang-Data-Set>
+ - SET_CONFIG_REQ <Session-Id, Database-Id, Base-Yang-Xpath, Delete, ...>
+ - SET_CONFIG_REPLY <Session-Id, Database-id, Base-Yang-Xpath, ..., Status>
+ - COMMIT_CONFIG_REQ <Session-Id, Source-Db-Id, Dest-Db-Id>
+ - COMMIT_CONFIG_REPLY <Session-Id, Source-Db-id, Dest-Db-Id, Status>
+ - GET_DATA_REQ <Session-Id, Database-Id, Base-Yang-Xpath>
+ - GET_DATA_REPLY <Session-Id, Database-id, Base-Yang-Xpath, Yang-Data-Set>
+ - REGISTER_NOTIFY_REQ <Session-Id, Database-Id, Base-Yang-Xpath>
+ - DATA_NOTIFY_REQ <Database-Id, Base-Yang-Xpath, Yang-Data-Set>
+
+Please refer to the MGMT Frontend Client Developers Reference and Guide
+(coming soon) for more details.
+
+MGMTD Backend Interface
+=======================
+The MGMT Backend Interface is a bunch of message-based APIs that can be
+used by individual component daemons like BGPd, Staticd, Zebra to connect
+with MGMTd and utilize the new FRR Management Framework to let any Frontend
+clients to retrieve any operational data or manipulate any configuration data
+owned by the individual daemon component.
+
+Like the MGMT Frontend Interface, the MGMT Backend Interface is is also
+comprised of the following:
+
+ - MGMT Backend Server (running on MGMT daemon)
+ - MGMT Backend Adapter (running on MGMT daemon)
+ - MGMT Backend client (running on Backend component daemons)
+
+The MGMT Backend Client and MGMT Backend Adapter sub-component communicates
+using a specific set of message-based APIs.
+
+The exact set of message-based APIs are represented as Google Protobuf
+messages and can be found in the following file distributed with FRR codebase.
+
+.. code-block:: frr
+
+   lib/mgmt.proto
+
+The MGMT daemon implements a MGMT Backend Server that opens a UNIX
+socket-based IPC channel on the following path to listen for incoming
+connections from all possible Backend clients:
+
+.. code-block:: frr
+
+   /var/run/frr/mgmtd_bcknd.sock
+
+Each connection received from a Backend client is managed and tracked
+as a MGMT Backend adapter by the MGMT Backend Adapter sub-component
+implemented by MGMTd.
+
+To facilitate faster development/integration of Backend clients with
+MGMTd, a C-based library has been developed. The API specification
+of this library can be found at:
+
+.. code-block:: frr
+
+   lib/mgmt_bcknd_client.h
+
+Following is a list of message types supported on the MGMT Backend Interface:
+
+ - SUBSCRIBE_REQ <Req-Id, Base-Yang-Xpath, Filter-Type>
+ - SUBSCRIBE_REPLY <Req-Id, Status>
+ - TRXN_REQ <Trxn-Id, Create>
+ - TRXN_REPLY <Trxn-Id, Status>
+ - CREATE_CFGDATA_REQ <Trxn-Id, Req-Id, Batch-Id, ConfigDataContents>
+ - CREATE_CFGDATA_ERROR <Trxn-Id, Req-Id, Batch-Id, Status>
+ - VALIDATE_CFGDATA_REQ <Trxn-Id, Batch-Id>
+ - VALIDATE_CFGDATA_REPLY <Trxn-Id, Batch-Id, Status, ErrorInfo>
+ - APPLY_CFGDATA_REQ <Trxn-Id, Batch-Id>
+ - APPLY_CFGDATA_REPLY <Trxn-Id, Batch-Id, Status, ErrorInfo>
+ - GET_OPERDATA_REQ <Trxn-Id, Base-Yang-Xpath, Filter-Type>
+ - GET_OPERDATA_REPLY <Trxn-Id, OperDataContents>
+
+Please refer to the MGMT Backend Client Developers Reference and Guide
+(coming soon) for more details.
+
+MGMTD Transaction Engine
+========================
+
+The MGMT Transaction sub-component is the main brain of the MGMT daemon that
+takes management requests from one (or more) Frontend Client translates
+them into transactions and drives them to completion in co-oridination with
+one (or more) Backend client daemons involved in the request.
+
+A transaction can be seen as a set of management procedures executed over
+the Backend Interface with one (or more) individual Backend component
+daemons, as a result of some management request initiated from a specific
+Frontend client session. These group of operations on the Backend Interface
+with one (or more) individual components involved should be executed without
+taking any further management requests from other Frontend client sessions.
+To maintain this kind of atomic behavior a lock needs to be acquired
+(sometimes implicitly if not explicitly) by the corresponding Frontend client
+session, on the various datastores/databases involved in the management request
+being executed. The same datastores/databases need to be unlocked when all
+the procedures have been executed and the transaction is being closed.
+
+Following are some of the transaction types supported by MGMT:
+
+ - Configuration Transactions
+
+  - Used to execute management operations like SET_CONFIG and COMMIT_CONFIG
+    that involve writing/over-writing the contents of Candidate and Running
+    databases.
+  - One (and only) can be created and be in-progress at any given time.
+  - Once initiated by a specific Frontend Client session and is still
+    in-progress, all subsequent SET_CONFIG and COMMIT_CONFIG operations
+    from other Frontend Client sessions will be rejected and responded
+    with failure.
+  - Requires acquiring write-lock on Candidate (and later Running) databases.
+
+ - Show Transactions
+
+  - Used to execute management operations like GET_CONFIG and GET_DATA
+    that involve only reading the contents of Candidate and Running
+    databases (and sometimes real-time retrieval of operational data
+    from individual component daemons).
+  - Multiple instance of this transaction type can be created and be
+    in-progress at any given time.
+  - However, when a configuration transaction is currently in-progress
+    show transaction can be initiated by any Frontend Client session.
+  - Requires acquiring read-lock on Candidate and/or Running databases.
+  - NOTE: Currently GET_DATA on Operational database is NOT supported. To
+    be added in a future time soon.
+
+MGMTD Configuration Rollback and Commit History
+===============================================
+
+The MGMT daemon maintains upto 10 last configuration commit buffers
+and can rollback the contents of the Running Database to any of the
+commit-ids maintained in the commit buffers.
+
+Once the number of commit buffers exceeds 10, the oldest commit
+buffer is deleted to make space for the latest commit. Also on
+rollback to a specific commit-id, buffer of all the later commits
+are deleted from commit record.
+
+Configuration rollback is only allowed via VTYSH shell as of today
+and is not possible through the MGMT Frontend interface.
+
+MGMT Configuration commands
+===========================
+
+.. clicmd:: mgmt set-config xpath WORD value WORD
+
+    This command uses a SET_CONFIG request over the MGMT Frontend Interface
+    for the specified xpath with specific value. This command is used for
+    testing purpose only. But can be used to set configuration data from CLI
+    using SET_CONFIG operations.
+
+.. clicmd:: mgmt delete-config xpath WORD
+
+    This command uses a SET_CONFIG request (with delete option) over the
+    MGMT Frontend Interface o delete the YANG data node at the given
+    xpath unless it is a key-leaf node(in which case it is not deleted).
+
+.. clicmd:: mgmt load-config file WORD <merge|replace>
+
+    This command loads configuration in JSON format from the filepath specified,
+    and merges or replaces the Candidate DB as per the option specified.
+
+.. clicmd:: mgmt save-config db-name WORD file WORD
+
+    This command dumps the DB specified in the db-name into the file in JSON
+    format. This command in not supported for the Operational DB.
+
+.. clicmd:: mgmt commit-abort
+
+    This command will abort any configuration present on the Candidate but not
+    been applied to the Running DB.
+
+.. clicmd:: mgmt commit-apply
+
+    This command commits any uncommited changes in the Candidate DB to the
+    Running DB. It also dumps a copy of the tree in JSON format into
+    frr_startup.json.
+
+.. clicmd:: mgmt commit-check
+
+    This command validates the configuration but does not apply them to the
+    Running DB.
+
+.. clicmd:: mgmt rollback commit-id WORD
+
+    This command rolls back the Running Database contents to the state
+    corresponding to the commit-id specified.
+
+.. clicmd:: mgmt rollback last WORD
+
+    This command rolls back the last specified number of recent commits.
+
+
+MGMT Show commands
+==================
+
+.. clicmd:: show mgmt backend-adapter all
+
+    This command shows the backend adapter information and the clients/daemons
+    connected to the adapters.
+
+.. clicmd:: show mgmt backend-yang-xpath-registry
+
+    This command shows which Backend adapters are registered for which YANG
+    data subtree(s).
+
+.. clicmd:: show mgmt frontend-adapter all [detail]
+
+    This command shows the frontend adapter information and the clients
+    connected to the adapters.
+
+.. clicmd:: show mgmt transaction all
+
+    Shows the list of transaction and bunch of information about the transaction.
+
+.. clicmd:: show mgmt get-config [db-name WORD] xpath WORD
+
+    This command uses the GET_CONFIG operation over the MGMT Frontend interface and
+    returns the xpaths and values of the nodes of the subtree pointed by the <xpath>.
+    Supported values for <db-name> are 'candidate' and 'running' only.
+
+.. clicmd:: show mgmt get-data [db-name WORD] xpath WORD
+
+    This command uses the GET_DATA operation over the MGMT Frontend interface and
+    returns the xpaths and values of the nodes of the subtree pointed by the <xpath>.
+    Currenlty supported values for <db-name> are 'candidate' and 'running' only
+    ('operational' shall be supported in future soon).
+
+.. clicmd:: show mgmt database-contents db-name WORD [xpath WORD] [file WORD] format WORD
+
+    This command dumps the subtree pointed by the xpath in JSON or XML format. If filepath is
+    not present then the tree will be printed on the shell.
+
+.. clicmd:: show mgmt commit-history
+
+    This command dumps details of upto last 10 commits handled by MGMTd.
index 14ace2c8567168822a2c3b7b2fdcc59a5efb8065..a08abc3ad784b4715c32e4540f9d7fcbf1f259a0 100644 (file)
@@ -51,6 +51,7 @@ user_RSTFILES = \
        doc/user/flowspec.rst \
        doc/user/watchfrr.rst \
        doc/user/wecmp_linkbw.rst \
+       doc/user/mgmtd.rst \
        # end
 
 EXTRA_DIST += \
index 79ae31567933623c1bebab573869044f52c9281c..d4dda98ca0108ded91931d3c65b357f2a83bab40 100644 (file)
@@ -33,6 +33,7 @@ RUN source /src/alpine/APKBUILD.in \
                $makedepends \
                gzip \
                py-pip \
+               protobuf-c-dev \
        && pip install pytest
 
 RUN mkdir -p /pkgs/apk
index 73097df8fa1fbd9b71fdfc8ca1120e3f71897619..df4e31f74fe89f6d0dbc89796c5f30c7e0d8976b 100644 (file)
@@ -4,7 +4,7 @@ RUN yum install -y epel-release
 RUN yum install -y rpm-build autoconf automake libtool make \
         readline-devel texinfo net-snmp-devel groff pkgconfig \
         json-c-devel pam-devel bison flex pytest c-ares-devel \
-        python3-devel python3-sphinx libcap-devel \
+        python3-devel python3-sphinx libcap-devel protobuf-c-devel \
         https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/CentOS-7-x86_64-Packages/libyang2-2.0.0.10.g2eb910e4-1.el7.x86_64.rpm \
         https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/CentOS-7-x86_64-Packages/libyang2-devel-2.0.0.10.g2eb910e4-1.el7.x86_64.rpm \
         https://ci1.netdef.org/artifact/RPKI-RTRLIB/shared/build-110/CentOS-7-x86_64-Packages/librtr-0.7.0-1.el7.centos.x86_64.rpm \
index df095edcde86525476d09f1a80f1eb1d85158c22..784e445822724967c6da550dc92683a678a77547 100644 (file)
@@ -9,6 +9,7 @@ RUN dnf install --enablerepo=powertools -y rpm-build git autoconf pcre-devel \
         automake libtool make readline-devel texinfo net-snmp-devel pkgconfig \
         groff pkgconfig json-c-devel pam-devel bison flex python3-pytest \
         c-ares-devel python3-devel python3-sphinx libcap-devel platform-python-devel \
+        protobuf-c-devel \
         https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/CentOS-8-x86_64-Packages/libyang2-2.0.0.10.g2eb910e4-1.el8.x86_64.rpm \
         https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/CentOS-8-x86_64-Packages/libyang2-devel-2.0.0.10.g2eb910e4-1.el8.x86_64.rpm \
         https://ci1.netdef.org/artifact/RPKI-RTRLIB/shared/build-110/CentOS-7-x86_64-Packages/librtr-0.7.0-1.el7.centos.x86_64.rpm \
index 7476e5fe3e7b5239f29b03055d473d78b0cf00be..d136538c7d0814177dbd57b534b3316b5ebb76a5 100644 (file)
@@ -7,7 +7,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
 RUN apt-get update && \
     apt-get install -y libpcre3-dev apt-transport-https ca-certificates curl wget logrotate \
     libc-ares2 libjson-c3 vim procps libreadline7 gnupg2 lsb-release apt-utils \
-    tini && rm -rf /var/lib/apt/lists/*
+    libprotobuf-c-dev protobuf-c-compiler tini && rm -rf /var/lib/apt/lists/*
 
 RUN curl -s https://deb.frrouting.org/frr/keys.asc | apt-key add -
 RUN echo deb https://deb.frrouting.org/frr $(lsb_release -s -c) frr-stable | tee -a /etc/apt/sources.list.d/frr.list
index 07a5a2f7e0a53ef91d7ccac785304abdfd55d111..dab86067398861e5fce5324a0e21e27aa8c792e9 100644 (file)
@@ -9,7 +9,7 @@ RUN apt update && \
       pkg-config libpam0g-dev libjson-c-dev bison flex python3-pip \
       libc-ares-dev python3-dev python3-sphinx \
       install-info build-essential libsnmp-dev perl libcap-dev \
-      libelf-dev \
+      libelf-dev libprotobuf-c-dev protobuf-c-compiler \
       sudo gdb iputils-ping time \
       python-pip net-tools iproute2 && \
       python3 -m pip install wheel && \
index b9fe385c3a9eb8b0fc90658a46d14d56f101c7a5..7e49910a72947e97dfb56aadd8cc2a92c0df5dca 100644 (file)
@@ -9,7 +9,7 @@ RUN apt update && \
       pkg-config libpam0g-dev libjson-c-dev bison flex python3-pip \
       libc-ares-dev python3-dev python3-sphinx \
       install-info build-essential libsnmp-dev perl \
-      libcap-dev python2 libelf-dev \
+      libcap-dev python2 libelf-dev libprotobuf-c-dev protobuf-c-compiler \
       sudo gdb curl iputils-ping time \
       lua5.3 liblua5.3-dev \
       net-tools iproute2 && \