ovn-nbctl: Make error handling consistent with ovs-vsctl.
authorBen Pfaff <blp@ovn.org>
Sun, 8 May 2016 16:21:41 +0000 (09:21 -0700)
committerBen Pfaff <blp@ovn.org>
Sun, 8 May 2016 16:26:06 +0000 (09:26 -0700)
commitd24d33728d92f22ece563bb9cbc15e70ef10d6ff
tree436fe0432638586f92c682bf2be9770f7eb236db
parent0c29eb7dcf9a715754e7359e65c187f526cd4737
ovn-nbctl: Make error handling consistent with ovs-vsctl.

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 commit also adds --if-exists and --may-exist options in the same kinds
of places as ovs-vsctl, to allow for scripting in cases where it's OK if
an operation has already occurred.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
ovn/utilities/ovn-nbctl.8.xml
ovn/utilities/ovn-nbctl.c
tests/ovn-nbctl.at