Merge branch 'devel-2.3'
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge branch 'devel-2.2' into devel-2.3
Fix coverage reports
Currently, the coverage reports include the unittests themselves, andthis skewes unfairly the reports, as the coverage for the tests is veryhigh (since they all run).
To fix this, we export the ganeti temp dir from run-in-temp-dir, and we...
Remove last vestiges of docbook
This patch removes the last traces of docbook.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Conflicts: Makefile.am: Trivial
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Makefile: Add new dist target for releases
A new script, autotools/check-tar, is used to check the resulting.tar.gz file for unwanted contents like wrong file owners orpermissions.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add nodegroup bash autocomplation
We autocomplete both by nodegroup name and uuid.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
cli: Use list of options shared between commands
The completion script for bash has to know about these options. Until nowthe list was in two places--once in cli.py and once inautotools/build-bash-completion. A shared list is used with this patch.
Move ShellWriter class to utils
Also add unittest.
Second attempt at fixing check-man
I was wrong, actually LANG-vs-LC_ALL only fixed one case, by mistake. Toget proper UTF-8 encoding, we need to enforce any UTF-8 locale. Wechoose the 'default' of en_US.UTF-8.
Signed-off-by: Iustin Pop <iustin@google.com>...
Fix check-man for newer man-db
Again, check-man :)
Commit 5fa1642226 removed LC_ALL=C, since that breaks the check.However, with no LANG/LC_* variables, man-db is still broken.
We import the new lintian behaviour, i.e. LANG=C (which seems to differfrom LC_ALL=C, even with empty environment). I'm not sure of the...
Introduce a bool CLI option type
This option type enforces its value to either True or False, relievingthe scripts from manually parsing the values in each function.
We also update the bash completion code to use the option type ifpossible.
Fix two issues related to check-man
First, we don't need to check man pages at sed time, because this meanseveryone building the package will do - we only need to check at docbooktime, which is mostly at developer time.
Second, don't force LC_ALL to C, as this breaks newer man-db. I've...
Add unittest for daemon-util
This test doesn't cover everything, but it's better than nothing.
Add support for non-Python unittests
cli: Add ArgOs for later use in gnt-os
Signed-off-by: René Nussbaumer <rn@google.com>Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add make target to generate unittest coverage report
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Skip line-length warnings in man
Check built manpages for errors
One fix is necessary in gnt-cluster.sgml. Also adding “DELETE_ON_ERROR”target to remove output file if an error occurred while building it (inthis case the manpage).
This was reported by Iustin Pop in issue 87 and proposed check method...
build-bash-completion: Take care of pylint warnings
build-bash-completion: Fix a few pylint warnings
check-python-code: Use “set -e” to abort on errors
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 listof checked Python scripts and wraps one line of more...
Revert "Backport AC_PATH_PROGS_FEATURE_CHECK"
This reverts commit 52b699ecaa688a2aaac00fa64558e249d0bc9a26.
Backport AC_PATH_PROGS_FEATURE_CHECK
In order to allow working with older versions of autoconf we backportthis macro, but only if it's not defined already (by autoconf itself).
This commit can be reverted after we decide support for autoconf 2.61and below should be deprecated....
bash_completion: Move common code into function
This reduces the size of the script by about 9 kB.
Disallow "xrange" function
check-python-code: Show line number for problems
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Remove explicit DEBUG_OPT and add it by default
Since >90% of the commands take the “--debug” option, and all shouldactually take it (the gnt-job command is currently missing it), it makessense to simply remove this and add it by default in cli.py.
Show "--help" in bash completion
check-python-code: Report EOL whitespace
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Check for tabs and long lines in Python code
Move LoadModule function to ganeti.build
It should only be used at build-time.
Add bash completion for --node node1[:node2]
Add more debugging to bash completion
Move LoadModule function to utils
It can be used by unittests for daemons/* or scripts/*.
Bash completion: Implement dynamic option value completion
Bash completion: Add function to get all iallocators
Bash completion: Simplify option completion
This makes the output file quite a bit smaller and is neededin preparation for non-static option completion (e.g. list ofnodes).
Bash completion: Support for --foo=bar option format
That is with the equal sign.
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....
bash completion: Allow arguments with min < max arguments
Add script to run build commands in temporary directory
Python always compiles imported modules. By running these targetsin a temporary directory we don't pollute the source tree.
Simplify manpage building
This eliminates one temporary directory in the process.
Handle more errors in bash completion
Don't print error messages if cluster hasn't been initialized yet.
Add ArgHost class
It expands to the hostnames known by bash.
Use script to generate bash completion
Completion for tools/burnin is not yet implemented. It needs to beconverted to definition-based options handling first.
Use docbook2* paths found during configure for actual build
docbook-wrapper had the names for the docbook2* programs hardcoded. Thispatch changes Makefile.am and the wrapper script to pass them viaanother argument.
Another issue where rapi.in was built before rapi-resources.sgml is...
Set locale when using docbook programs
At least docbook2man inserts a date formatted using the currentlocale into its output.
Reviewed-by: iustinp
Use a single Makefile.am instead of many
This change allows us to use cleaner dependencies betweendirectories. The build system is basically rewritten in large partsand may contain bugs.
Add checking of python modules at ./configure time
This patch adds checking for our external python modules at the./configure stage, as it's better to check than rely on documentation.
The patch adds one autoconf macro from the autoconf macro archive(http://autoconf-archive.cryp.to)...