On Fri, Sep 8, 2017 at 1:57 PM Han Zhou <[email protected]> wrote: > The command error message is misleading, e.g.: > > $ ovn-nbctl acl-del ls1 100 'outport=="lsp1" && ip4' > ovn-nbctl: cannot specify priority without match > > $ ovn-nbctl acl-del ls1 to-lport 'outport=="lsp1" && ip4' > ovn-nbctl: cannot specify priority without match > > This patch fixes the problem. > $ > $ ovn-nbctl acl-del ls1 100 'outport=="lsp1" && ip4'
> Signed-off-by: Han Zhou <[email protected]> > Acked-by: Mark Michelson <[email protected]> > --- > ovn/utilities/ovn-nbctl.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c > index 46ede4e..8e5c1a4 100644 > --- a/ovn/utilities/ovn-nbctl.c > +++ b/ovn/utilities/ovn-nbctl.c > @@ -1469,10 +1469,6 @@ nbctl_acl_del(struct ctl_context *ctx) > const struct nbrec_logical_switch *ls; > ls = ls_by_name_or_uuid(ctx, ctx->argv[1], true); > > - if (ctx->argc != 2 && ctx->argc != 3 && ctx->argc != 5) { > - ctl_fatal("cannot specify priority without match"); > - } > - > if (ctx->argc == 2) { > /* If direction, priority, and match are not specified, delete > * all ACLs. */ > @@ -1503,6 +1499,10 @@ nbctl_acl_del(struct ctl_context *ctx) > > int64_t priority = parse_priority(ctx->argv[3]); > > + if (ctx->argc == 4) { > + ctl_fatal("cannot specify priority without match"); > + } > + > /* Remove the matching rule. */ > for (size_t i = 0; i < ls->n_acls; i++) { > struct nbrec_acl *acl = ls->acls[i]; > -- > 2.1.0 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
