[ovs-dev] [completion 2/3] ovs-vsctl-bashcomp: Add bash command-line completion for ovs-vsctl.
Alex Wang
alexw at nicira.com
Tue Mar 10 04:31:11 UTC 2015
On Mon, Mar 9, 2015 at 6:34 PM, Peter Amidon <peter at picnicpark.org> wrote:
>
> I was just looking at this as well, and came to a similar conclusion;
> adding a comment about the structure of 'arguments' is a good idea Alex,
> do you know what the completion should be doing here? I can try to
> implement the additional completion in parallel.
>
>
I'm personally fine with just using the 'ARG' here.
The precise command format should be:
add-aa-mapping bridge NEW-ISID NEW-VLAN
del-aa-mapping bridge ISID VLAN
You could refer to 'AutoAttach TABLE' in ovs-vswitchd.conf.db.
Thanks,
Alex Wang,
> Thanks,
>
> ---Peter
>
> On Mon, 09 Mar 2015 17:35:25 -0700: Alex Wang <alexw at nicira.com> wrote:
>
>
> > Sorry, forgot to rebase to master.
> > The rejection is due to the newly added auto attach feature. This
> makes me
> > worry about the lack of comments. I'll also add comment indicating
> how to
> > compose the 'arguments' member of 'struct vsctl_command_syntax'.
>
> > Thanks,
> > Alex Wang,
>
> On Mon, Mar 9, 2015 at 3:54 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> >> On Mon, Mar 09, 2015 at 10:00:29AM -0700, Alex Wang wrote:
> >> > From: Peter Amidon <peter at picnicpark.org>
> >> >
> >> > This patch adds bash command-line completion script for ovs-vsctl.
> >> > Therein, codes are added to ovs-vsctl to allow it to print the
> >> > options and command arguments. The ovs-vsctl-bashcomp.bash will
> >> > parse the vsctl command and complete on the user input.
> >> >
> >> > The completion script can do the following::
> >> >
> >> > - display available completion and complete on user input for
> >> > global/local options, command, and argument.
> >> >
> >> > - query database and expand keywords like 'table/record/column/key'
> >> > to available completions.
> >> >
> >> > - deal with argument relations like 'one and more', 'zero or one'.
> >> >
> >> > - complete multiple ovs-vsctl commands cascaded via '--'.
> >> >
> >> > To use the script, either copy it inside /etc/bash_completion.d/
> >> > or manually run it via . ovs-vsctl-bashcomp.bash.
> >> >
> >> > Signed-off-by: Alex Wang <alexw at nicira.com>
> >> >
> >> > ---
> >> > RFC->PATCH:
> >> > - Adopt Ben's suggested change of print_command_arguments().
> >> > - Remove 'include "list.h"' since it is no longer used.
> >> > - Adopt Peter's change of simplifying the _ovs_vsctl_get_PS1()
> >> > for unit test.
> >>
> >> This doesn't seem to apply to current master (reject in ovs-vsctl.c).
> >> Can you rebase it for me?
> >>
>
More information about the dev
mailing list