Statistics
| Branch: | Tag: | Revision:

root / autotools / build-bash-completion @ 653bc0f1

History | View | Annotate | Download (25.9 kB)

# Date Author Comment
0cd5ab45 02/12/2014 05:27 pm Petr Pudlak

Remove the HTOOLS configuration variable

.. and update the code that uses it.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Helga Velroyen <>

b8669a69 09/25/2013 01:49 pm Jose A. Lopes

Hs2Py constants: update Python references

Update references to constants that were previously in the generated
'lib/_autoconf.py' and since the previous patch have been included in
the Hs2Py constant generation.

Signed-off-by: Jose A. Lopes <>...

14013e5d 03/13/2013 12:49 pm Michele Tartara

Add user and group for the monitoring agent

This commit adds the user and group variables for the monitoring agent in all
the configuration files where they are required.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

8e55e20f 01/16/2013 12:19 pm Michael Hanselmann

Move burnin to ganeti.tools.burnin

Similar to other scripts, “tools/burnin” just becomes a wrapper script.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

3add7574 12/24/2012 11:38 pm Iustin Pop

Rename htools/ to src/

Per offline discussions, this is the first patch of the
renames. Tested with "make distcheck", seems to work fine.

The only change outside of the renaming is a bit of simplification in
the .gitignore rules; otherwise, simply s/htools/src/....

b954f097 12/22/2012 11:47 am Constantinos Venetsanopoulos

Add the gnt-storage client

Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.

For now, only two commands are supported: 'info' and 'diagnose'.

'diagnose' calculates the node status of each provider on each node,...

108c0a3e 12/21/2012 10:26 pm Iustin Pop

Merge branch 'devel-2.6'

  • devel-2.6:
    Final update of NEWS file for 2.6.2 and version bump
    Fix job completion with big job queues
    confd: reduce noise during normal config reload
    Change hbal handling of !auto_balance instances
    Small corrections in man pages...
e0f470ac 12/19/2012 03:52 pm Iustin Pop

Fix job completion with big job queues

Accidentally stumbled upon this while testing unrelated code on a
machine with ~3K active jobs - the bash completion unittest was
hanging.

Upon investigation, it turns out that bash's ${var//pattern/repl/} is
probably quadratic in the size of input (or worse, even):...

988dc5ca 12/19/2012 01:10 pm Iustin Pop

Enable bash completion for mon-collector

This just ties in all the pieces so far and enables bash completion
for it.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

24476fa0 12/19/2012 01:10 pm Iustin Pop

bash-completion: add support for multi-cmd Haskell binaries

This patch adds support for parsing the command list out of a binary
(very strict format), and then iterating over that and building the
sub-commands options/arguments.

It also does a bit of general cleanup in the script....

4e4b6b7a 11/20/2012 07:51 pm Apollon Oikonomopoulos

Include networks in Makefile and bash completion

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

7ca67731 10/11/2012 12:55 pm Michael Hanselmann

bash_completion: Fix mistake introduced in merge 6a74f58

This part of the code was duplicated by accident.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

6a74f584 10/11/2012 12:38 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    verify-disks: Explicitely state nothing has to be done
    Add list of design documents implemented in version 2.6
    Better list of replace-disks arguments + typos fixed
    jqueue: Look at archived jobs when watching
    Show old primary/secondary node on disk replacement...
46118ed2 10/08/2012 02:09 pm Iustin Pop

Merge ganeti-master-cleaner back into ganeti-cleaner

As I wrote during/after the review on commit 2958c56, “ganeti-cleaner:
Separate queue cleaning code”, while I appreciated the permission
separation, I didn't like too much the file-based approach:

- it is a very simple script, and lots of the code is duplicated...

ecebe9f6 10/08/2012 02:07 pm Iustin Pop

Split the OptComplNumeric into integer/float ones

This allows the command completion to treat them as separate option
types; this is not useful in build-bash-completion right now, but
might become so in the future.

Signed-off-by: Iustin Pop <>...

f8d01158 10/08/2012 02:06 pm Iustin Pop

Enable bash completion for Haskell daemons too

This requires a few tiny changes to build-bash-completion and to
Makefile rules, but is straightforward.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

fad06963 10/08/2012 02:01 pm Iustin Pop

Support the new option types in build-bash-completion

Beside parsing the arguments as well, we also change the serialisation
format for choices/suggests, to make the Python code simpler.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

d163abf9 09/27/2012 01:52 pm Michael Hanselmann

bash_completion: Enable extglob while parsing file

In older versions of GNU Bash extended patterns, such as “@(…)”, are only
available with the “extglob” shell option. As pointed out in [1] and [2],
“extglob” must be enabled while parsing the code. Therefore the flag must be...

ada0e680 09/26/2012 02:19 pm Iustin Pop

Enable bash completion for htools scripts

This patch ties together the previous commits, by extending
build-bash-completion to call all htools scripts and get their
completion information, then use that to build fake cli_options
representing them and finally generate the bash completion...

893ad76d 09/25/2012 02:14 pm Michael Hanselmann

bash_completion: Enable extglob while parsing file

In older versions of GNU Bash extended patterns, such as “@(…)”, are only
available with the “extglob” shell option. As pointed out in [1] and [2],
“extglob” must be enabled while parsing the code. Therefore the flag must be...

34dfced1 09/25/2012 02:14 pm Michael Hanselmann

Revert "bash_completion: Always enable extglob"

This reverts commit 94014b6328f813b674a1126ffd221705d7e315b3. Turns out
I misunderstood the “extglob” shell option.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

e80aeb89 09/19/2012 06:12 pm Michael Hanselmann

bash_completion: Generate more compact version

First the numbers:
$ stat --format '%s %n' doc/examples/bash_completion*
77847 doc/examples/bash_completion
86492 doc/examples/bash_completion-debug

The non-debug version doesn't use indentation and does not have some...

94014b63 09/19/2012 04:54 pm Michael Hanselmann

bash_completion: Always enable extglob

In older versions of GNU Bash extended patterns, such as “@(…)” are only
available with the “extglob” shell option. This patch adds a wrapper
function so that extglob is always enabled while doing any completion.
Due to early returns inside the main completion function this seemed...

13718ded 09/18/2012 06:09 pm Michael Hanselmann

Migrate build-bash-completion from constants to pathutils

File system paths moved from constants to pathutils.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

951accad 08/27/2012 05:18 pm Iustin Pop

Merge branch 'devel-2.6'

  • devel-2.6:
    Make stable-2.6 compatible with newer pep8
    Fix computation of disk sizes in _ComputeDiskSize
    Add verification of RPC results in _WipeDisks
    Add test for checking that all gnt-* subcommands run OK
    Fix double use of PRIORITY_OPT in gnt-node migrate...
5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

f5ce7613 07/23/2012 10:20 am Iustin Pop

Ensure a stable content of the bash completion file

Currently, the order of commands in the bash completion file is
random, because the sub-commands are not sorted. This makes it harder
to investigate the differences in packaged Ganeti or in installed
Ganeti, since chunks in this file will have a random order....

e4f4896b 09/15/2011 04:40 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5: (33 commits)
    htools: remove dead code
    hail: don't select the primary as new secondary
    hail: add an extra safety check in relocate
    Fix RAPI documentation for gnt-instance console
    Add SPICE compression and streaming options...
b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

3db199ea 08/24/2011 01:04 pm Michael Hanselmann

bash completion: Shorten function names

This saves another 5 kB from the generated script. An old debug comment
written to the generated output is also removed.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

b33cad4a 08/19/2011 03:14 pm Michael Hanselmann

bash completion: Group commands by arguments and options

This grouping, which was a TODO for a long time, reduces the script size
by about 5kB.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

49283373 08/19/2011 03:14 pm Michael Hanselmann

Check option name format when building bash completion

This is just a style check. Option names should be consistent. Since all
of them go through the “build-bash-completion” script, this seemed to be
a good place.

Signed-off-by: Michael Hanselmann <>...

667dbd6b 12/01/2010 09:31 pm Adeodato Simo

Querying node groups: add client/gnt_group.py

This implements `gnt-group list`.

Signed-off-by: Adeodato Simo <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

36e247e1 09/14/2010 07:49 pm Guido Trotter

Add nodegroup bash autocomplation

We autocomplete both by nodegroup name and uuid.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

5786c087 09/07/2010 12:44 pm Michael Hanselmann

cli: Use list of options shared between commands

The completion script for bash has to know about these options. Until now
the list was in two places--once in cli.py and once in
autotools/build-bash-completion. A shared list is used with this patch.

Signed-off-by: Michael Hanselmann <>...

858905fb 07/15/2010 05:38 pm Michael Hanselmann

Move ShellWriter class to utils

Also add unittest.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

e7b61bb0 03/23/2010 10:35 am Iustin Pop

Introduce a bool CLI option type

This option type enforces its value to either True or False, relieving
the scripts from manually parsing the values in each function.

We also update the bash completion code to use the option type if
possible.

Signed-off-by: Iustin Pop <>...

f9faf9c3 03/09/2010 02:27 pm René Nussbaumer

cli: Add ArgOs for later use in gnt-os

Signed-off-by: René Nussbaumer <>
Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michael Hanselmann <>

b4086ce8 01/14/2010 02:16 pm Michael Hanselmann

build-bash-completion: Take care of pylint warnings

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f59418db 01/13/2010 07:08 pm Michael Hanselmann

build-bash-completion: Fix a few pylint warnings

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

8adfb141 11/25/2009 02:08 pm Michael Hanselmann

build-bash-completion: Check for None before comparing

Comparing a number with None is not a good idea:

>>> (0 < None, 0 > None)
(False, True)

This patch also adds build-bash-completion to the list
of checked Python scripts and wraps one line of more...

a10caf87 10/27/2009 01:53 pm Michael Hanselmann

bash_completion: Move common code into function

This reduces the size of the script by about 9 kB.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

064c21f8 09/18/2009 01:53 pm Iustin Pop

Remove explicit DEBUG_OPT and add it by default

Since >90% of the commands take the “--debug” option, and all should
actually take it (the gnt-job command is currently missing it), it makes
sense to simply remove this and add it by default in cli.py.

Signed-off-by: Iustin Pop <>...

1f4e391b 09/16/2009 07:13 pm Michael Hanselmann

Show "--help" in bash completion

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

e948770c 09/10/2009 07:01 pm Michael Hanselmann

Move LoadModule function to ganeti.build

It should only be used at build-time.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

2d3ed64b 09/04/2009 06:58 pm Michael Hanselmann

Add bash completion for --node node1[:node2]

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

5b0ca9d4 09/04/2009 06:58 pm Michael Hanselmann

Add more debugging to bash completion

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

d6f5892b 09/03/2009 06:44 pm Michael Hanselmann

Move LoadModule function to utils

It can be used by unittests for daemons/* or scripts/*.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

63d44c55 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Implement dynamic option value completion

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

30d44392 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Add function to get all iallocators

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

d4b94fe8 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Simplify option completion

This makes the output file quite a bit smaller and is needed
in preparation for non-static option completion (e.g. list of
nodes).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

632d5090 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Support for --foo=bar option format

That is with the equal sign.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

580ef58d 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Small optimizations

$2 doesn't contain the correct value when completing something like
"--disk-template=…". Getting it via COMP_WORDS is better.

Short options (e.g. -I) can't have an equal sign.

Also add useful debugging commands for development....

5431eff1 08/26/2009 07:08 pm Michael Hanselmann

bash completion: Allow arguments with min < max arguments

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

5a78e2e7 08/25/2009 06:38 pm Michael Hanselmann

Handle more errors in bash completion

Don't print error messages if cluster hasn't been initialized yet.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

83ec7961 08/24/2009 06:01 pm Michael Hanselmann

Add ArgHost class

It expands to the hostnames known by bash.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

4f3d5b76 08/24/2009 04:53 pm Michael Hanselmann

Use script to generate bash completion

Completion for tools/burnin is not yet implemented. It needs to be
converted to definition-based options handling first.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>