summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-08-04 13:54:55 -0400
committerGitHub <noreply@github.com>2020-08-04 13:54:55 -0400
commit070d9eb9c8ebc7255412c445df6871898dfc152f (patch)
tree3105cb07035c9dfda2e77a23cc33d972c672d0fd /lib/command.c
parent7e545c5614a77e83e1fe1d52d07eb58061e71134 (diff)
parentb855e95fd36f66d6644437afa248ad6afe6f4c44 (diff)
Merge pull request #6727 from opensourcerouting/nb-cfg-backoff
lib: introduce configuration back-off timer for YANG-modeled commands
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 80b75d9b23..159ed07b38 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -904,6 +904,13 @@ static int cmd_execute_command_real(vector vline, enum cmd_filter_type filter,
> vty->candidate_config->version)
nb_config_replace(vty->candidate_config,
running_config, true);
+
+ /*
+ * Perform pending commit (if any) before executing
+ * non-YANG command.
+ */
+ if (matched_element->attr != CMD_ATTR_YANG)
+ nb_cli_pending_commit_check(vty);
}
ret = matched_element->func(matched_element, vty, argc, argv);