On Sat, May 07, 2016 at 04:22:44PM -0700, Justin Pettit wrote:
>
> > On May 6, 2016, at 1:10 PM, Ben Pfaff wrote:
> >
> > @@ -448,10 +441,11 @@ nbctl_lswitch_add(struct ctl_context *ctx)
> > static void
> > nbctl_lswitch_del(struct ctl_context *ctx)
> > {
> > +bool must_exist = !shash_find(&
On Sat, May 07, 2016 at 04:10:28PM -0700, Justin Pettit wrote:
>
> > On May 6, 2016, at 1:10 PM, Ben Pfaff wrote:
> >
> > static void
> > nbctl_lport_add(struct ctl_context *ctx)
> > {
> > -struct nbrec_logical_port *lport;
> > +bool may_exist = shash_find(&ctx->options, "--may-exist") !
> On May 6, 2016, at 1:10 PM, Ben Pfaff wrote:
>
> @@ -448,10 +441,11 @@ nbctl_lswitch_add(struct ctl_context *ctx)
> static void
> nbctl_lswitch_del(struct ctl_context *ctx)
> {
> +bool must_exist = !shash_find(&ctx->options, "--if-exists");
In addition to my previous comments, I just noti
> On May 6, 2016, at 1:10 PM, Ben Pfaff wrote:
>
> static void
> nbctl_lport_add(struct ctl_context *ctx)
> {
> -struct nbrec_logical_port *lport;
> +bool may_exist = shash_find(&ctx->options, "--may-exist") != NULL;
For the commands to which you added "--may-exist", it might be nice to
ovs-vsctl distinguishes between internal database inconsistencies, which
it logs, and errors in commands specified by the user, which cause fatal
exits. ovn-nbctl wasn't as careful about this and tended to just log
everything. This commit brings it up to the same standard as ovs-vsctl.
This comm