diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index 8003679ed57b..b013845bb363 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -122,6 +122,12 @@ void nb_cli_enqueue_change(struct vty *vty, const char *xpath, { struct nb_cfg_change *change; + /* + * We don't want object existence checks when using CLI, so allow only + * MODIFY and DESTROY operations. + */ + assert(operation == NB_OP_MODIFY || operation == NB_OP_DESTROY); + if (vty->num_cfg_changes == VTY_MAXCFGCHANGES) { /* Not expected to happen. */ vty_out(vty,