- Sep 27, 2012
-
-
Michael Hanselmann authored
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 enabled at the beginning of the script and be reset to its original value at the end as to not interfere with other code on shell initialization. [1] http://unix.stackexchange.com/questions/45957 [2] http://mywiki.wooledge.org/glob Reported by Sascha Lucas. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit 893ad76d)
-
- Jul 23, 2012
-
-
Iustin Pop authored
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. To fix this, we sort the subcommands based on the first subcommand in a given group ('first' also in sorted order); this results in a stable contents of file, as tested by building it many times and checking for differences. The patch also does a few other minor changes to the file (e.g. updating copyright years, etc.). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 22, 2012
-
-
Iustin Pop authored
Allow all errors to be displayed, instead of aborting at the first one, and don't show stacktraces anymore. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is trivial, but should prevent such things in the future. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 07, 2012
-
-
Iustin Pop authored
This adds a bit of dumb mapping of values to names, while trying to be safe. This is the best we can do without resorting to parsing or interpreting ASTs. The difference in the output is: -- | Converted from Python list or set ADMINST_ALL adminstAll :: [String] -adminstAll = ["down", "offline", "up"] +adminstAll = [adminstDown, adminstOffline, adminstUp] Since for most such values we use strings, we don't gain in type safety on the Haskell side. But it makes the output more readable and it might open up other opportunities later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This add support for exporting constants from multiple modules (as opposed to hard-coding constants), and also makes the output more readable by skipping things we know for sure we don't want to convert (as opposed to things we would like to but don't know _how_ to convert). Additionally, we export the constants from the luxi module too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 04, 2012
-
-
Michael Hanselmann authored
Until now “TestRunIf” and “TestEnabled” could only handle AND. With this patch a new class named “Either” is added to “qa_config” and allows OR. The name “Either” was chosen instead of “Or” as the latter is very close to the reserved keyword “or”. Examples: ["rapi", Either(["instance-rename", "instance-reboot"])] Either(["node-list", "instance-list", "job-list"]) Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 26, 2012
-
-
Michael Hanselmann authored
This script shows a few examples on how to use the RAPI input test client. It is also run at “make check” time to ensure it's not completely broken. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 19, 2012
-
-
Iustin Pop authored
This is a stupid/trivial patch. I didn't realise when adding htools-hpc that this will "break" tab completion on htools; as in, I will have to add / manually always when completing files on the command line. So to fix my laziness, let's rename htools-hpc to hpc-htools, eliminating this completion conflict. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 13, 2012
-
-
Iustin Pop authored
This allows the offline tests to also generate coverage data, and the hs-coverage target is changed to show both unit-test and offline-tests coverage. The downside is that now we build yet-another-binary, which makes the unit-test time slower… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This enables the offline-test.sh run both in the special "hs-check" rule and during normal "make check". Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 05, 2012
-
-
Iustin Pop authored
This moves the dashes check to a new check-man-dashes script. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Currently the check-man test is dependent on the MAN_HAS_WARNINGS test, which made sense as long as the script only did the warnings check. However, we should run the [em] tests always, and in general we could run other tests too, even if man doesn't support --warnings; so let's split the check man. As a first prerequisite, we rename check-man to check-man-warnings (and the respective Makefile variables). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 27, 2012
-
-
Iustin Pop authored
This checks to see if any man output has [em] in it, as that will not be correctly show in ASCII. Unfortunately the check will depend on whether the other man check is done, but I didn't want to introduce yet another short script for this (can be done, no issue). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 13, 2012
-
-
Iustin Pop authored
This is a trivial conversion. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Unfortunately, we only support lists of simple types, and not even lists of tuples. If we actually needed those, it would be possible to implement them, with a bit more complexity in the converter. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This prepares for tuple and other conversions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
The two main drawbacks for convert-constants are the fact that it can't handle sets/frozensets (mainly due to the fact that I don't know how useful this would be to the Haskell code) and that it cannot export dictionaries. To fix the second case, the current patch changes the code to support flattening (potentially nested) dictionaries into single name space. Yes, this could generate conflicts, but they will be detected at compile time. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 09, 2012
-
-
Michael Hanselmann authored
It is not necessary to run a Python script to generate the filter, which didn't work very well anyway on systems with modules in /usr/share/pyshared. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 06, 2012
-
-
Guido Trotter authored
- Always two empty lines before a version. - Standardize how version names should be called. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 05, 2012
-
-
Michael Hanselmann authored
This adds support for a callback returning name resolver options. This is required for powercycling offline nodes. While it would be possible to implement this using a separate RPC client class, doing so would require some code duplication with the standard “RpcRunner” class. The callback can generate the options based on the call arguments. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 22, 2011
-
-
Bernardo Dal Seno authored
autotools/testrunner was missing in distcheck. Now some changes from 70041061 have been reverted, and testrunner is not built anymore. coverage now uses fakeroot when needed. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
Tests ending in "-runasroot" or "-runasroot.py" are run through fakeroot, so activity that needs root privileges can be tested. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Dec 21, 2011
-
-
Iustin Pop authored
This will be used in a later patch for parameter pre-processing. For now we just add the parameter as 'None' and add a consistency check for the parameter definitions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 21, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 14, 2011
-
-
Michael Hanselmann authored
Commit b459a848 was supposed to replace all, but one was missed. Add a check to autotools/check-python-code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
- Nov 08, 2011
-
-
Michael Hanselmann authored
I passed the timeout calculation function in the wrong field of the definition. A small change is also needed in “build-rpc” to not abort when writing the docstring. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 07, 2011
-
-
Michael Hanselmann authored
This avoids having to override the function in the RPC runner. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This way the generated code no longer contains arbitrary code. Post-processing functions are used by reference. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Until now “autotools/build-rpc” would read the definition of all RPCs and write them to a new file, “lib/_generated_rpc.py” with some modifications. With this patch the generated code loads the definitions and, at module load time, gets references to the actual definitions. Further patches will even remove the calls to the post-processing functions from the generated code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is in preparation to reducing the amount of generated code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 02, 2011
-
-
Andrea Spadaccini authored
Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Ensures licence and copyright headers are correct. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Nov 01, 2011
-
-
Michael Hanselmann authored
Instead of in-place code now each argument has an (optional) kind assigned. The RPC client will then take care of encoding each argument according to its definition. A new base (_RpcClientBase) is added to take care of encoding and dispatching calls. Future patches will also use these definitions in the node daemon. A nice side-effect of this change is the ability to use stand-alone functions, as opposed to class member methods, for most of the encoding. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Oct 26, 2011
-
-
Michael Hanselmann authored
A new script, “autotools/build-rpc”, will be used to generate code for RPC client wrappers. This is done because “lib/rpc.py” contains lots and lots of boilerplate code. Forthcoming patches will start converting RPC wrappers. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 07, 2011
-
-
Andrea Spadaccini authored
lib/constants.py * add to each CV_E* tuple the documentation of the error code * add the DOCUMENTED_CONSTANTS constant for the doc preprocessor autotools/docpp * add a new directive class CONSTANTS_<kind>, that gets data from constants.DOCUMENTED_CONSTANTS lib/cmdlib.py * modify the code that unpacked the CV_E* tuples to ignore the documentation parameter Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
autotools/docpp * handle generic custom directives in the form <class>_<kind> * adapt handling of query fields build/sphinx_ext.py * add the BuildValuesDoc function to output definitions using the sphinx syntax that was already used for query fields * adapt BuildQueryFields to use BuildValuesDoc Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 30, 2011
-
-
Michael Hanselmann authored
This check will abort if one of the standalone modules (currently lib/rapi/client.py and tools/ganeti-listrunner) imports anything from the Ganeti source directory. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
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). This commit changes all the disable-msg directives to disable. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-