- May 11, 2010
-
-
Michael Hanselmann authored
* devel-2.1: (29 commits) RAPI client: Improve SSL error reporting RAPI client: Don't check node role in client RAPI client: Update ReplaceInstanceDisks RAPI client: Fix behaviour of “allocatable” storage flag RAPI client: Encode boolean and None query values RAPI client: No longer check storage type locally RAPI client: Add constant for RAPI version RAPI QA: Use RAPI client QA: Restore RAPI cert after “gnt-cluster renew-crypto” QA: Add function create temporary backup file RAPI client: Don't assume job IDs to be numeric Add RAPI client utility module with RAPI PollJob function RAPI client: Include HTTP error code in GanetiApiError exception Support different HTTP error codes in RAPI client unittest mock RAPI client: Fix error message for unsupported methods in unittest RAPI client: Allow waiting for job changes RAPI: Allow waiting for job changes RAPI client: Rename “DeleteJob” to “CancelJob” RAPI client: Various code style changes RAPI client: Add missing unittest for RepairNodeStorageUnits ... Conflicts: qa/qa_cluster.py: Trivial Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Only the server knows which node roles can be set via RAPI. Constants are provided for convenience. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
- The RAPI client shouldn't check the replacement mode as only the server knows which ones are valid (constants are still provided for convenience) - Disks shouldn't be a list of names, but of indexes Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
When modifying a storage unit, the “allocatable” flag should default to “no modification”. This replicates the behaviour of the command line interface. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Boolean values must be passed as 0 or 1. None should be an empty value (""). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Only the RAPI server (actually masterd) knows which storage types are valid. The exception can no longer be raised as the type is only checked in the job. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This reverts a60e3cb0 partially by moving the RAPI version into a constant. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The RAPI tests will depend on the certificate. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
The RAPI client module shouldn't depend on any Ganeti module, yet it's useful to have some Ganeti-specific code, like a PollJob function for RAPI. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Having the HTTP error code allows users of the class to act differently based on the error code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
This allows testing error conditions (e.g. if a job wasn't found). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Jobs can't be deleted, but cancelled (even though the HTTP method “DELETE” is used). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
- Replace hardcoded values with constants - Code formatting - Exception messages without periods and fixed string formatting Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
Even removing tags returns a job ID. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
If the version changes, the API is likely to change as well. Not having to ask for the version first makes the code simpler. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
Michael Hanselmann authored
- It's possible to implement all functionality in ganeti.rapi.client using Python's standard modules httplib and urllib2 - By doing so, proper SSL certificate verification is implemented - Adjust some of the code to Ganeti's code style (this is not yet finished) Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Reading only one line is useful for reading passwords from files. This also adds unittests for utils.ReadFile. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
- May 10, 2010
-
-
Michael Hanselmann authored
63bcea2a added file checks for import/export, but unfortunately they were broken. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
By separating the LUXI-specific code and stdio-related code into separate classes, we can make cli.PollJob protocol- agnostic, allowing it to be used with RAPI. This patch also adds unittests for cli.PollJob. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
* devel-2.1: (22 commits) NEWS: fix empty lines Fix a unittest name and docstring Force ssh to allocate a tty Fix a unittest docstring IsProcessAlive: retry stat() a few times Retry{Again,Timeout}: explain reraising utils.Retry: pass up timeout arguments Add a few Retry unittests Bump version for 2.1.2.1 release Update NEWS for Ganeti 2.1.2.1 KVM: only export instance tags if present ssh.GetUserFiles: move to EnsureDirs Hypervisors: use utils.EnsureDirs backend: remove a couple of useless mkdir calls daemon.GenericMain: fix docstring jstore: use EnsureDirs, and add more constants Bump version for 2.1.2 release Update NEWS file for 2.1.2 Add dates to the NEWS file RAPI QA: Test instance creation/removal via RAPI ... Conflicts: NEWS - trivial (merge NEWS entries) lib/backend.py - trivial (master doesn't have the changed code) lib/constants.py - trivial (merge constants, plus one s/0700/SECURE_DIR_MODE/) test/ganeti.utils_unittest.py - trivial (name+docstring changes) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Make sure there are exactly two empty lines between different versions (rather than 1 or 3). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
Guido Trotter authored
The docstring has been copied by the name, but the name reports a misspell of the function it is actually testing. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
Balazs Lecz authored
This is required to avoid the "Pseudo-terminal will not be allocated because stdin is not a terminal." ssh error message in case a Ganeti script is run non-interactively. Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
Guido Trotter authored
On multiprocessor dom0 stat() on /proc can sometimes return EINVAL. Before giving up, we try a few times to get a consistent answer. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If Retry has to fail with RetryTimeout, it might be useful to pass the Retry argument to RetryTimeout, to help debugging outside the Retry cycle. We also define a RetryTimeout.RaiseInner() helper, to re-raise an exception passed to RetryAgain. All served with a side of unit tests. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Check that Retry actually times out, and actually retries. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-