- Jan 28, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 27, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 10, 2011
-
-
Adeodato Simo authored
Signed-off-by:
Adeodato Simo <dato@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Adeodato Simo authored
This was forgotten in f18fab7d. Signed-off-by:
Adeodato Simo <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 05, 2011
-
-
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>
-
- Dec 08, 2010
-
-
Adeodato Simo authored
Signed-off-by:
Adeodato Simo <dato@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 29, 2010
-
-
Michael Hanselmann authored
Dictionaries are hard to encode into query strings, therefore the “/2/instances/[instance_name]/reinstall” resource is changed to accept its parameters via the request body. The old query string parameters are still accepted for backwards compatibility. To allow clients to detect whether a server supports the new body parameters, a new feature string is added to the “/2/features” resource. Some people might not like this, but it reuses existing functionality. The RAPI client and its unittests are updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 10, 2010
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
With this patch, a new PycURL object will be created for each request. This should make the RAPI client safe for simultaneous calls from multiple threads. Unittests are adjusted accordingly. An unnecessary variable assignment is also removed from the unittest script. This patch survived a small QA and unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 29, 2010
-
-
David Knowles authored
Signed-off-by:
David Knowles <dknowles@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 23, 2010
-
-
Iustin Pop authored
See the discussion on the previous patch about this. Basically unless we want to a add a new 'feature' marking for the live migration parameter, there is no simple way to handle this nicely in the client. Given that the client was/is marked as experimental, this patch simply replaces live with mode. This means that this client won't work with 2.1 clusters… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jul 13, 2010
-
-
Michael Hanselmann authored
Commit 8a47b447 implemented instance creation in the RAPI client, but it left out support for the old instance creation request format. This patch now implements the old format as good as possible. This will only be used when talking to clusters before Ganeti 2.1.3. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 01, 2010
-
-
Michael Hanselmann authored
Currently the RAPI client uses the urllib2 and httplib modules from Python's standard library. They're used with pyOpenSSL in a very fragile way, and there are known issues when receiving large responses from a RAPI server. By switching to PycURL we leverage the power and stability of the widely-used curl library (libcurl). This brings us much more flexibility than before, and timeouts were easily implemented (something that would have involved a lot of work with the built-in modules). There's one small drawback: Programs using libcurl have to call curl_global_init(3) (available as pycurl.global_init) while exactly one thread is running (e.g. before other threads) and are supposed to call curl_global_cleanup(3) (available as pycurl.global_cleanup) upon exiting. See the manpages for details. A decorator is provided to simplify this. Unittests for the new code are provided, increasing the test coverage of the RAPI client from 74% to 89%. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 18, 2010
-
-
Michael Hanselmann authored
Two new resources are added: - /2/instances/$name/prepare-export - /2/instances/$name/export The documentation for the existing resource for creating instances is updated for remote imports. The RAPI client is extended for the new resources. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 17, 2010
-
-
Michael Hanselmann authored
GetInstanceInfo should return the resource /2/instances/$name/info, but so far it returns /2/instances/$name. The same applies to GetNodeInfo, which returns /2/nodes/$name. Both names are stripped of their “Info” suffix and a new method, GetInstanceInfo, is added for /2/instances/$name/info. There's no equivalent for nodes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 13, 2010
-
-
Michael Hanselmann authored
Currently this only supports the new instance creation request data format version 1, but support for the old version can be easily implemented. Most arguments are optional and documented in the RAPI documentation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
The /2/features RAPI resource can be used to detect optional features implemented by the RAPI server. This will be used to recognize servers implementing a new request format for instance creation requests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 11, 2010
-
-
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
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
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
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
- 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>
-
- May 04, 2010
-
-
David Knowles authored
- Always check SSL certificate for validity - Actually JSON-encode HTTP content Signed-off-by:
David Knowles <dknowles@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 21, 2010
-
-
David Knowles authored
Ensure that all RAPI client methods that should return job ids actually return job ids. Signed-off-by:
David Knowles <dknowles@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Signed-off-by:
Iustin Pop <iustin@google.com>
-
- Apr 07, 2010
-
-
Iustin Pop authored
Wrong escape, so we make sure to use proper escapes (we want the backslashes to be embedded, not interpreted). Also change " to ' to be easier to read. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
David Knowles <dknowles@google.com>
-
- Apr 06, 2010
-
-
David Knowles authored
Signed-off-by:
David Knowles <dknowles@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> (modified slightly the unittest to account for missing httplib2 library)
-