summaryrefslogtreecommitdiff
path: root/mgmtd/mgmt_txn.h
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-06-27 13:58:54 -0400
committerChristian Hopps <chopps@labn.net>2023-06-27 18:00:56 -0400
commitdbb1bc6f355ae53ce1f2402a1ac196e9f9e18a42 (patch)
tree95440d9560362977bbd485ffdab1b30f7f8f5cc0 /mgmtd/mgmt_txn.h
parent6267c2aaad2a503ae24885d3ffc9a7867fccb6c0 (diff)
mgmtd: consolidate getcfg and getdata msgs into "get"
eliminates tons of copy and paste code. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt_txn.h')
-rw-r--r--mgmtd/mgmt_txn.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/mgmtd/mgmt_txn.h b/mgmtd/mgmt_txn.h
index 69d75fed07..068f07a5ca 100644
--- a/mgmtd/mgmt_txn.h
+++ b/mgmtd/mgmt_txn.h
@@ -177,25 +177,16 @@ extern int mgmt_txn_send_commit_config_req(uint64_t txn_id, uint64_t req_id,
bool implicit);
/*
- * Send get-config request to be processed later in transaction.
+ * Send get-{cfg,data} request to be processed later in transaction.
*
- * Similar to set-config request.
+ * Is get-config if cfg_root is provided and the config is gathered locally,
+ * otherwise it's get-data and data is fetched from backedn clients.
*/
-extern int mgmt_txn_send_get_config_req(uint64_t txn_id, uint64_t req_id,
- Mgmtd__DatastoreId ds_id,
- struct nb_config *cfg_root,
- Mgmtd__YangGetDataReq **data_req,
- size_t num_reqs);
-
-/*
- * Send get-data request to be processed later in transaction.
- *
- * Similar to get-config request, but here data is fetched from backedn client.
- */
-extern int mgmt_txn_send_get_data_req(uint64_t txn_id, uint64_t req_id,
- Mgmtd__DatastoreId ds_id,
- Mgmtd__YangGetDataReq **data_req,
- size_t num_reqs);
+extern int mgmt_txn_send_get_req(uint64_t txn_id, uint64_t req_id,
+ Mgmtd__DatastoreId ds_id,
+ struct nb_config *cfg_root,
+ Mgmtd__YangGetDataReq **data_req,
+ size_t num_reqs);
/*
* Notifiy backend adapter on connection.