diff options
-rw-r--r-- | lib/db-ctl-base.c | 5 | ||||
-rw-r--r-- | tests/ovs-vsctl.at | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index e95c77da2..77cc76a9f 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -1823,6 +1823,11 @@ cmd_destroy(struct ctl_context *ctx) return; } + if (!delete_all && ctx->argc == 2) { + VLOG_WARN("either --all or records argument should be specified"); + return; + } + if (delete_all) { const struct ovsdb_idl_row *row; const struct ovsdb_idl_row *next_row; diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index d2cb41403..8f7916037 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -1484,6 +1484,11 @@ AT_CHECK([RUN_OVS_VSCTL( qos : [] ]]) AT_CHECK([RUN_OVS_VSCTL( + [ destroy Qos])], [0],[], [stderr]) +AT_CHECK([sed "s/^.*|WARN|//" < stderr], [0], +[[either --all or records argument should be specified +]]) +AT_CHECK([RUN_OVS_VSCTL( [--all destroy Qos])]) AT_CHECK([RUN_OVS_VSCTL( [-- list Qos])]) |