[ovs-dev] [PATCH v1 ovn] ovn-nb/sbctl.c: Use env variables for passing options.

aginwala aginwala at asu.edu
Tue Oct 15 02:45:11 UTC 2019


On Mon, Oct 14, 2019 at 4:38 PM Ben Pfaff <blp at ovn.org> wrote:

> On Mon, Oct 14, 2019 at 03:33:25PM -0700, Ben Pfaff wrote:
> > On Wed, Oct 09, 2019 at 04:56:40PM -0700, amginwal at gmail.com wrote:
> > > From: Aliasgar Ginwala <aginwala at ebay.com>
> > >
> > > Add new env variables OVN_NBCTL_OPTIONS and OVN_SBCTL_OPTIONS for
> > > ovn-nbctl and ovn-sbctl respectively where user can set any single
> > > supported option. e.g export OVN_NBCTL_OPTIONS=--no-leader-only.
> > > Above env var OVN_NBCTL_OPTIONS have no effect if user runs
> > > command as ovn-nbctl --no-leader-only <command>
> > >
> > > Signed-off-by: Aliasgar Ginwala <aginwala at ebay.com>
> >
> > I think that this could be factored out into lib/command-line.c rather
> > than done as a copy-and-paste into two files.
> >
> > I don't think that the ops_passed variable needs to be static.
>
> Also, I'd consider giving an example in the documentation of how to use
> this new variable.  The purpose is unclear enough that I might not be
> able to quickly guess how or why to use it without an example.
>
Thanks for the review Ben:
I can move that logic to command-line.c to new function in ovs repo
as ovs_cmdl_env_parse_all and use it in nbctl and sbctl.   Will update
example in doc accordingly in v2.

> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list