diff options
author | Christian Hopps <chopps@labn.net> | 2023-03-28 19:08:01 +0200 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-03-31 21:21:20 +0200 |
commit | 803829e41e129ba2ea1b519a665c8732777e2008 (patch) | |
tree | 8927b69da27a9894cb1e96e08cd969ade6ac79b6 | |
parent | tests: when verifying a route is missing use expected=False (diff) | |
download | frr-803829e41e129ba2ea1b519a665c8732777e2008.tar.xz frr-803829e41e129ba2ea1b519a665c8732777e2008.zip |
mgmtd: remove startup config feature for now
The startup config and how it interacts with explicit commits,
commit databases and implicit commits needs to be worked out
in design first. For now remove the offending code.
Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r-- | mgmtd/mgmt_ds.c | 24 | ||||
-rw-r--r-- | mgmtd/mgmt_ds.h | 2 |
2 files changed, 0 insertions, 26 deletions
diff --git a/mgmtd/mgmt_ds.c b/mgmtd/mgmt_ds.c index 1724afb18..10b3cecb9 100644 --- a/mgmtd/mgmt_ds.c +++ b/mgmtd/mgmt_ds.c @@ -87,7 +87,6 @@ static int mgmt_ds_replace_dst_with_src_ds(struct mgmt_ds_ctx *src, struct mgmt_ds_ctx *dst) { struct lyd_node *dst_dnode, *src_dnode; - struct ly_out *out; if (!src || !dst) return -1; @@ -117,13 +116,6 @@ static int mgmt_ds_replace_dst_with_src_ds(struct mgmt_ds_ctx *src, nb_config_diff_del_changes(&src->root.cfg_root->cfg_chgs); } - if (dst->ds_id == MGMTD_DS_RUNNING) { - if (ly_out_new_filepath(MGMTD_STARTUP_DS_FILE_PATH, &out) - == LY_SUCCESS) - mgmt_ds_dump_in_memory(dst, "", LYD_JSON, out); - ly_out_free(out, NULL, 0); - } - /* TODO: Update the versions if nb_config present */ return 0; @@ -134,7 +126,6 @@ static int mgmt_ds_merge_src_with_dst_ds(struct mgmt_ds_ctx *src, { int ret; struct lyd_node **dst_dnode, *src_dnode; - struct ly_out *out; if (!src || !dst) return -1; @@ -159,13 +150,6 @@ static int mgmt_ds_merge_src_with_dst_ds(struct mgmt_ds_ctx *src, nb_config_diff_del_changes(&src->root.cfg_root->cfg_chgs); } - if (dst->ds_id == MGMTD_DS_RUNNING) { - if (ly_out_new_filepath(MGMTD_STARTUP_DS_FILE_PATH, &out) - == LY_SUCCESS) - mgmt_ds_dump_in_memory(dst, "", LYD_JSON, out); - ly_out_free(out, NULL, 0); - } - return 0; } @@ -200,8 +184,6 @@ void mgmt_ds_reset_candidate(void) int mgmt_ds_init(struct mgmt_master *mm) { - struct lyd_node *root; - if (mgmt_ds_mm || mm->running_ds || mm->candidate_ds || mm->oper_ds) assert(!"MGMTD: Call ds_init only once!"); @@ -209,12 +191,6 @@ int mgmt_ds_init(struct mgmt_master *mm) if (!running_config) assert(!"MGMTD: Call ds_init after frr_init only!"); - if (mgmt_ds_load_cfg_from_file(MGMTD_STARTUP_DS_FILE_PATH, &root) - == 0) { - nb_config_free(running_config); - running_config = nb_config_new(root); - } - running.root.cfg_root = running_config; running.config_ds = true; running.ds_id = MGMTD_DS_RUNNING; diff --git a/mgmtd/mgmt_ds.h b/mgmtd/mgmt_ds.h index 89a2ea942..8d01f3d5b 100644 --- a/mgmtd/mgmt_ds.h +++ b/mgmtd/mgmt_ds.h @@ -24,8 +24,6 @@ #define MGMTD_DS_NAME_CANDIDATE "candidate" #define MGMTD_DS_NAME_OPERATIONAL "operational" -#define MGMTD_STARTUP_DS_FILE_PATH DAEMON_DB_DIR "/frr_startup.json" - #define FOREACH_MGMTD_DS_ID(id) \ for ((id) = MGMTD_DS_NONE; (id) < MGMTD_DS_MAX_ID; (id)++) |