]>
git.proxmox.com Git - mirror_frr.git/blob - mgmtd/mgmt_history.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2021 Vmware, Inc.
4 * Pushpasis Sarkar <spushpasis@vmware.com>
5 * Copyright (c) 2023, LabN Consulting, L.L.C.
8 #ifndef _FRR_MGMTD_HISTORY_H_
9 #define _FRR_MGMTD_HISTORY_H_
13 PREDECL_DLIST(mgmt_cmt_infos
);
18 * Rollback specific commit from commit history.
24 * Specific commit id from commit history.
27 * 0 on success, -1 on failure.
29 extern int mgmt_history_rollback_by_id(struct vty
*vty
, const char *cmtid_str
);
32 * Rollback n commits from commit history.
38 * Number of commits to be rolled back.
41 * 0 on success, -1 on failure.
43 extern int mgmt_history_rollback_n(struct vty
*vty
, int num_cmts
);
45 extern void mgmt_history_rollback_complete(bool success
);
48 * Show mgmt commit history.
50 extern void show_mgmt_cmt_history(struct vty
*vty
);
52 extern void mgmt_history_new_record(struct mgmt_ds_ctx
*ds_ctx
);
54 extern void mgmt_history_destroy(void);
55 extern void mgmt_history_init(void);
57 #endif /* _FRR_MGMTD_HISTORY_H_ */