Statistics
| Branch: | Tag: | Revision:

root / lib / rapi @ 22001b78

# Date Author Comment
22001b78 12/17/2013 12:46 pm Dimitris Aragiorgis

(2.10) RAPI: Make use of request_body in Reboot/Remove

Until now, the shutdown_timeout parameter could only be passed to
ShutdownInstance() inside kwargs, causing it to be included in the
request body. Based on that, extend RebootInstance() and
RemoveInstance() so that they can take extra arguments (e.g....

52fc37bd 12/17/2013 12:46 pm Dimitris Aragiorgis

(2.10) RAPI: Pass depends body arg (if any) to opcode

Most rlib2 classes override the default _GetDefaultData() method with
custom methods that parse a request's body and query args and return a
(body, specific_static) tuple eventually passed to FillOpCode()....

92ea7d79 12/16/2013 05:31 pm Hrvoje Ribicic

Fix RAPI network tag handling

The network tags were absent from an if check used to actually list
tags. The patch fixes the oversight, and adds a proper error message in
case the issue occurs again for a new tag type.

Signed-off-by: Hrvoje Ribicic <>...

9b5a7ce9 07/19/2013 03:18 pm Christos Stavrakakis

Make RAPI export device names and UUIDs

Add UUIDs and names of instance's disks and NICs to the list of instance
fields that are returned from RAPI.

Signed-off-by: Christos Stavrakakis <>
Reviewed-by: Helga Velroyen <>

4eb06290 07/15/2013 05:24 pm Klaus Aehlig

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7
    Fix RAPI to include missing network fields
    Add support for querying network timestamps
    In the crontab example, look for the correct binary
    Fix wrong numbering in UPGRADE documentation

Conflicts:...

3312709d 07/10/2013 05:21 pm Leon Handreke

Expose bulk parameter for GetJobs in RAPI client

This patch exposes the bulk argument of the jobs resource on
the RAPI python wrapper, making it possible to retrieve status
information about all jobs with a single call.

Signed-off-by: Leon Handreke <>...

95c83fe6 07/10/2013 03:45 pm Christos Stavrakakis

Fix RAPI to include missing network fields

Fix RAPI interface to include missing network fields. Specifically, fix
instance queries to include the network name for instance NICs. Also fix
network queries to include missing common fields, like uuid and serial....

1fa6fcba 04/24/2013 02:44 pm Michele Tartara

Reason trail implementation for "start"

Opcode-specific implementation of the reason trail for the instance
startup operation.

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

1f350e0f 04/24/2013 02:44 pm Michele Tartara

Reason trail implementation for "shutdown"

Opcode-specific implementation of the reason trail for the instance shutdown
operation.

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

55cec070 04/22/2013 02:19 pm Michele Tartara

Reason trail implementation for instance reboot

This commits allows ganeti to correctly forward the reason trail information
regarding instance reboot.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

9b4cb29d 04/22/2013 02:18 pm Michele Tartara

Add "reason" as a common parameter for all the RAPI calls

Also, this add an infrastructure for having parameters common to all the
RAPI calls.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

da3faf9d 04/22/2013 02:18 pm Michele Tartara

Add infrastructure for adding common RAPI parameters

Some parameters can be common to all the RAPI calls: this commit
adds the possibility of specifying them just once, instead of
manually adding them to the classes describing each call.

Signed-off-by: Michele Tartara <>...

aa922d64 04/22/2013 02:10 pm Michele Tartara

Remove old "reason" implementation

Remove the useless parts of the old, partial, implementation of the support for
tracking the reason of instances state change, before implementing the new
reason trail support, as per the design document.

Signed-off-by: Michele Tartara <>...

61f8fda4 03/22/2013 05:06 pm Michele Tartara

Fix bug in rlib2 unit tests

The "queryargs" parameter of the init function of rlib2 classes should
be a dictionary, as defined in the ResourceBase parent class (in
lib/rapi/baserlib.py).

In the rlib2 and baserlib unit tests, when the queryargs parameter is not...

fb409531 03/22/2013 05:01 pm Michele Tartara

Remove use of deprecated function

cgi.parse_qs() is deprecated in python 2.6 and substituted by
urlparse.parse_qs().

This patch modifies the code to use the new function.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

05b6f4d8 03/21/2013 12:13 pm Bernardo Dal Seno

Merge branch 'devel-2.7'

  • devel-2.7
    cfgupgrade: Fix error messages
    Update "FIXME" string in RAPI
    rapi client: add target_node to migrate instance
    Make diskless instances externally mirrored
    Fix migrate/failover -n for ext mirror storage

Trivial merge: no conflicts...

09b7b6f2 03/20/2013 01:49 pm Michele Tartara

Update "FIXME" string in RAPI

We are not ready for this change yet. Let's push it to 2.8.

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

dc700f75 03/12/2013 07:19 pm Daniel Krambrock

rapi client: add target_node to migrate instance

This allows migrating to any node, as it is already possible for
failover, when instances are externally mirrored.

Signed-off-by: Daniel Krambrock <>
Signed-off-by: Guido Trotter <>...

ab9e48d1 03/12/2013 06:16 pm Iustin Pop

Enable split queries for the network

Now that all fields are implemented, and (I think) behave equivalent
to the Python implementation, we can switch on the split queries for
networks.

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

46d21495 03/12/2013 01:32 pm Bernardo Dal Seno

Merge branch 'devel-2.7'

  • devel-2.7
    Add QA for instance creation with policy violation
    Add QA for policy-instance interactions
    Add QA for cluster policies
    Unit tests for objects.InstancePolicy + a fix
    Unit tests for objects.FillIPolicy() + small fix...
7db266bb 03/11/2013 03:06 pm Daniel Krambrock

GanetiRapiClient: fix the no_remember option

There was a typo which prevented the correct option from being passed to
RAPI

Signed-off-by: Daniel Krambrock <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

a82d9394 02/25/2013 02:52 pm Michael Hanselmann

Fix style violations in commit 4a90bd4, small changes

- Commit 4a90bd4 contained a rather large number of style violations:
- Indentation/sequence formatting
- Wrapping of long lines
- Docstrings whose first line was wrapped
- A stray backslash in a docstring...

27a8a190 02/22/2013 12:51 pm Michael Hanselmann

RAPI: Add flag to require authentication

Most RAPI resources do not require authentication for the “GET” method.
In some setups it can be desirable to always require authentication.
This patch adds a command line parameter to always require it.

Some unrelated minor typos in the “ganeti-rapi” man page are also fixed....

798f1ac9 02/20/2013 01:14 pm Michael Hanselmann

Allow generating different RAPI resource lookup tables

Until now the RAPI resource table returned by
“rapi.connector.GetHandlers” always uses fixed strings or compiled
regular expressions as dictionary keys. Now that a table of all RAPI
resources (and their access rights) should be written for the...

c3a5176f 02/19/2013 06:57 pm Michael Hanselmann

baserlib: Make "_OPCODE_ATTRS" public

"_OPCODE_ATTRS" will also be used in the Sphinx extension.

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

5224c9bf 02/19/2013 04:29 pm Michael Hanselmann

Helper to retrieve access permissions for RAPI resource

Merge similar code into a helper function.

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

4a90bd4f 02/19/2013 04:27 pm Michele Tartara

Status change reason support for Reboot

Add support to the Reboot command for specifying the reason for the last
status change.

Some features are implemented as functions, even if used only once, because
they will be used by the future patches introducing reason support for all...

fe502d25 02/15/2013 03:04 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Rename lib/objectutils to outils.py
    Fix typo in gnt-group manpage
    Fix wrong type in a docstring of the RAPI subsystem
    Finish the remote→restricted commands rename
    Enable use of the priority option in hbal
    Add CLI-level option to override the priority...
d9a22528 02/15/2013 12:23 pm Iustin Pop

Revert "Disable live-RPC queries under split query"

This reverts commit fb251c2c4c582ec0d6c00a6f6c5e134ed5196e03. On the
master branch we want to continue to have them enabled.

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

20ba96f5 02/13/2013 12:34 pm Michele Tartara

Fix wrong type in a docstring of the RAPI subsystem

Signed-off-by: Michele Tartara <>
Reviewed-by: Michael Hanselmann <>

5cfa6c37 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove network_type slot (Issue 363)

This slot was not used by Ganeti so the same info can be
provided via tags. In order not to break configuration data
we add a FromDict() method in Network config object that
removes the deprecated network_type (if found) and then invoke...

11eb5cd0 02/08/2013 11:59 am Michael Hanselmann

baserlib: Fix two mistakes in docstring

The method names were wrong due to copy & paste.

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

fb251c2c 01/31/2013 01:10 pm Iustin Pop

Disable live-RPC queries under split query

Currently, the node listing RPC is very slow due to missing
parallelisation. For the 2.7 release, we reset these back to masterd,
hoping to revert them by the time 2.8 is ready.

There are a number of queries that I've left pointing to confd, as...

b8028dcf 12/19/2012 06:29 pm Michael Hanselmann

Replace frozenset with compat.UniqueFrozenset

This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather
only replaces “frozenset” where appropriate. Most of the places are
“static” information that doesn't change after the module has been
loaded....

45317e3a 12/19/2012 03:45 pm Iustin Pop

Remove some unused Python code

This patch removes code which is no longer used due to refactoring:

- http.InitSsl, last usage removed in commit 33231500 (“Convert RPC
client to PycURL”)
- rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8...

d45a824b 12/19/2012 03:45 pm Iustin Pop

Enable job queries via confd in gnt-node and RAPI

This patch is enabling split queries for jobs for gnt-node and rapi
access (only for job listing, not job waiting).

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

e2dd6ece 12/10/2012 06:03 pm Michael Hanselmann

Change value for ECODE_TEMP_NORES

Unfortunately there was a bug in commit 518a45e whereby ECODE_TEMP_NORES
had the same value as ECODE_NORES, leading to failures in a Haskell
test. Of course this would also have affected other users of the constant.

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

bc826292 12/07/2012 02:47 pm Michael Hanselmann

Export error codes from RAPI client module

Until now the error codes were not available from the RAPI client
module. A newly added unit test ensures all error codes are contained in
“ECODE_ALL”, as well as ensuring consistency between the RAPI client and...

2556424d 11/21/2012 05:54 pm Iustin Pop

Small style fixes (' vs ") in network code

This is just trivial fixes; I think I caught all of them.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

1fa2c40b 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass py-apidoc (make commit-check)

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

3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

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

6e8091f9 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass unittests (make check)

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

8140e24f 11/20/2012 07:51 pm Dimitris Aragiorgis

Add tags in network objects

Support:
- gnt-network add --tags.
- gnt-network list-tags/add-tags/remove-tags/.
- gnt-network list -o +tags

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

4588b4bd 11/20/2012 07:51 pm Dimitris Aragiorgis

Rapi support for networks

Support:
- GetNetwork(s)
- CreateNetwork
- ConnectNetwork
- DisconnectNetwork
- RemoveNetwork

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

5e12acfe 11/16/2012 03:57 pm Michael Hanselmann

rapi: Add new user option for querying

This was requested in issue 301. Before this patch, requests to
“/2/query/*” and “/2/instances/*/console” would require authentication
with a user with write access. Since that is not strictly necessary, a
new user option named “read” is added....

2a38e913 11/08/2012 08:37 pm Michael Hanselmann

rlib2: Document two previously undocumented functions

Commit 208a6cff just included empty docstrings.

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

8af734f8 11/08/2012 04:15 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    http/__init__.py: Remove extraneous argument
    rapi.testutils: Add utility to format HTTP headers
    rapi.testutils: Return headers from mock utility
    http: Add wrapper for mimetools.Message
    Add missing tests for commit f0d2286...
22105827 11/08/2012 04:08 pm Michael Hanselmann

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    http/__init__.py: Remove extraneous argument
    rapi.testutils: Add utility to format HTTP headers
    rapi.testutils: Return headers from mock utility
    http: Add wrapper for mimetools.Message
    Add missing tests for commit f0d2286...
1b8e72f3 11/08/2012 03:20 pm Michael Hanselmann

rapi.testutils: Add utility to format HTTP headers

Once again this will be used by forthcoming RAPI test.

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

0351944b 11/08/2012 03:20 pm Michael Hanselmann

rapi.testutils: Return headers from mock utility

A newly added test for RAPI will also verify the returned headers. A
test in ganeti.rapi.client_unittest.py is split into smaller stand-alone
tests.

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

0e632cbd 11/08/2012 03:19 pm Michael Hanselmann

http: Add wrapper for mimetools.Message

A newly added piece of code will also have to parse headers, so having
this wrapper saves us from copying this part of code.

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

1eaddbc6 10/16/2012 06:05 pm Michael Hanselmann

Add new constant for pending job status

This constant contains the job status' “queued”, “waiting” and
“cancelled”.

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

9fbf0098 10/11/2012 01:03 pm Iustin Pop

Enable query socket usage in gnt-node/gnt-group

This switches gnt-node/gnt-group (and their equivalent RAPI resources)
to go over the query socket.

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

915faf72 09/27/2012 02:42 pm René Nussbaumer

Adding RAPI client for instance multi allocation

It was very easy to refactor CreateInstance to repurpose some part of it
for the instance multi allocation request. So we do this.

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

e5ff1a47 09/27/2012 02:42 pm René Nussbaumer

Populate the instance dict with opcode infos

This is needed so we can load it as an opcode. However, this information
should not be available on the client, so we inject that info when we
receive the request.

Provided unittest to verify behaviour.

Signed-off-by: René Nussbaumer <>...

4ee72287 09/24/2012 02:49 pm René Nussbaumer

Adding RAPI resource for multi-allocation

This is straightforward.

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

4e55af74 09/18/2012 06:09 pm Michael Hanselmann

Migrate lib/rapi/baserlib.py from constants to pathutils

File system paths moved from constants to pathutils.

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

6ce90543 09/12/2012 01:47 pm Michael Hanselmann

RAPI client: Fix typo in docstring

Also update the copyright header.

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

a2160e57 09/03/2012 03:13 pm Iustin Pop

Complete and enable the haskell QueryClusterInfo call

Since we have now access to all cluster parameters, we can "fill" the
parameters, and can finally enable it in CLI/RAPI.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

f2374060 08/28/2012 06:02 pm Iustin Pop

Enable tags query over the query socket

This patch adds the tags field to the objects which were missing it
(all except Cluster), implements handling the LuxiCall QueryTags, and
then enables the use of the query socket in cli.ListTags, used by all
commands, and in the RAPI client....

cebd85d8 08/28/2012 06:02 pm Iustin Pop

Switch RAPI to use same tags listing as CLI

Currently, RAPI uses queries (as in QueryNode with field tags) for
getting the tags, whereas the CLI uses the QueryTags Luxi
command. Since this discrepancy is not good, let's switch RAPI to use
the same method as the CLI....

303bc802 08/28/2012 06:00 pm Iustin Pop

Implement support for query only clients in Rapi

This implements the same query=True|False functionality as in
GetClient for cli.py, however since the RAPI code is much more
unit-tested (and the unit-test clients are mocked, for the most part,
without support for addresses) we have to do many adaptations in the...

b8481ebf 08/08/2012 12:57 pm Guido Trotter

rapi client: accept arbitrary shutdown arguments

The "ignore_offline_nodes" parameter is unsupported. Rather than
explicitely adding it, just pass all keyword arguments in the body of
the query, and rapi on the other side will do the right thing.

Supports for old arguments that were passed via the query is unchanged....

28a45bfc 07/06/2012 03:29 pm René Nussbaumer

RAPI regression beparams/memory fix

For compatibility with the old Ganeti version, we want to keep the
beparams/memory field around for another release. This patch fixes this
regression.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

003306f9 06/15/2012 05:38 pm Iustin Pop

Export more information in RAPI group queries

Sadly we don't have a way to test that, for example, all
(G|N|I)Q_CONFIG fields are exported in RAPI, so for now we don't test
this; but we should, in the future.

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

592eb0df 05/30/2012 02:08 pm René Nussbaumer

Fix GenericCurlConfig when pycurl is linked against nss

Redhat links its pycurl against NSS/ so this check fails and therefore
makes ganeti-watcher unusable.

Even though this seems to fix the problem and works, further testing on
this might be needed.

Signed-off-by: René Nussbaumer <>...

1afa108c 04/26/2012 10:42 pm Michael Hanselmann

Add more RAPI test utilities

This patch adds a mock RAPI client to test input values to methods. All
methods either raise an exception if there was a problem or return None.
Third-party code can use this to test their input values to the RAPI
client.

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

d9492490 04/26/2012 10:33 pm Michael Hanselmann

rapi.testutils.FakeCurl: Add header support

With this patch headers are constructed from the PycURL options
and passed to the mock implementation.

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

f90a1ab5 04/26/2012 10:33 pm René Nussbaumer

Move _FakeCurl from tests/ganeti.rapi.client to ganeti.rapi.testutils

This is preparation for the mock system, where we need the same cURL
mock.

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

da04c447 04/26/2012 09:11 pm Michael Hanselmann

RemoteApiHandler: Add support for mocked LUXI client

This will be used for providing a type-checking RAPI client for tests.

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

4b129313 04/20/2012 09:01 pm Chris Schrier

Change CertificateError to subclass GanetiApiError

Signed-off-by: Chris Schrier <>
Reviewed-by: Michael Hanselmann <>

b5800ee9 04/19/2012 11:44 am Chris Schrier

Include PycURL error code in GanetiApiError.

Signed-off-by: Chris Schrier <>
Reviewed-by: Iustin Pop <>

3bd0f3d8 02/21/2012 04:32 pm Iustin Pop

Small fixup to rapi docstrings

The fast that most classes don't override the @cvars means that direct
references to FillOpcode can fail (they do on my workstation, but not
on buildbot?). Anyway, for safety, it's best to qualify the name.

Additionally a small typo is fixed....

37e61a77 02/21/2012 02:35 pm Iustin Pop

Export ndparams in RAPI node query

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

a85f23fa 02/15/2012 12:20 pm Michael Hanselmann

rapi.testutils: Add exported functions to verify opcode input/result

These can be used by third-party code to verify mock code. Further work
on mocks is forthcoming, so this is only a start.

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

f0fd35b1 02/01/2012 10:11 am René Nussbaumer

rapi.client: Removing constants not needed anymore

They were not referenced through the whole code and were marked internal
only.

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

57d8e228 12/13/2011 02:00 pm Michael Hanselmann

RAPI client: Replace body value assignments with helper

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

6396dc04 12/13/2011 02:00 pm Michael Hanselmann

RAPI client: Export feature constants

Users of the RAPI client may want to use feature strings too, therefore
they should be explicitely public.

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

4c864b55 12/13/2011 02:00 pm Michael Hanselmann

RAPI client: Use utilities for building query parameters

Instead of repeating a “if cond: query.append(…)” pattern, utility
functions are added and used.

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

edd49f9b 12/08/2011 07:24 pm Agata Murawska

Group query now calculates ipolicy

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

8e709b21 11/01/2011 06:01 pm Michael Hanselmann

RAPI: Fix issue when replacing disks

This is another fallout from a suboptimal merge.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Andrea Spadaccini <>

7dcf333d 10/31/2011 05:54 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    Fix wrong headers and licences
    Update NEWS and increase to 2.4.5
    Fix parameters of RpcResult in hooks unit tests
    Fix a too long line.
    Move RenameFile to the new functions
    ensure_dirs: Move some useful functions into utils....
97298dc9 10/21/2011 04:16 pm René Nussbaumer

Merge branch 'stable-2.5' into devel-2.5

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

0b58db81 10/18/2011 06:29 pm Michael Hanselmann

RAPI: Make node evacuation actually work

Commit e1f23243 changed te LU and opcode for node evacuation to receive
a “mode” parameter (among other things). Commit de40437a changed the
RAPI code accordingly, but did so for an earlier version of the first
patch. Obviously this couldn't work, so here's the fix....

8b8f54dd 10/18/2011 06:10 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5:
    Revert "rapi.client.ModifyNode should PUT rather than POST"
    - also fix the actual call, which was merged as PUT in master by
    mistake.

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

e366273a 10/18/2011 06:05 pm Guido Trotter

Revert "rapi.client.ModifyNode should PUT rather than POST"

This was a mistake on my side because ModifyGroup and ModifyInstance
were PUT, and I was not aware of the discussion and the rationale why
this one had to be POST.

This reverts commit 55ef0cf6497c570aaab9413851435a7ee744222e....

682878d9 10/18/2011 04:00 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5:
    rapi.client.ModifyNode should PUT rather than POST
    Fix RAPI node modify client and server calls
    xen: changes to facilitate "xl" support (xen 4.1)
    xen: abstract instance config file naming
    Abstract xen's 'xm' command as a constant...
55ef0cf6 10/18/2011 03:56 pm Guido Trotter

rapi.client.ModifyNode should PUT rather than POST

This was caught (albeit in a sibylline manner) by unittests on master
which are not present in 2.5.

Signed-off-by: Guido Trotter <>
Reviewed-by: René Nussbaumer <>

370f2042 10/18/2011 01:45 pm Guido Trotter

Fix RAPI node modify client and server calls

rapi.client.ModifyNode accepts a "group" and not a "node" param.
(this bug is invisible but still not nice)

rlib2.R_2_nodes_name_modify submits the opcode with instance_name rather
than node_name as a param. This would break the call....

539d65ba 10/17/2011 04:58 pm Michael Hanselmann

RAPI: Fix resource for replacing disks

Commit d1c172deb4f inadvertently changes the
“/2/instances/[instance_name]/replace-disks” resource to use body
parameters. There were no QA tests and the issue wasn't noticed.

This patch re-introduces support for query parameters and adds a QA...

8de8e68d 10/13/2011 05:40 pm Michael Hanselmann

rapi: Allow auto-promotion on node role change

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

94497dd1 10/13/2011 05:40 pm Michael Hanselmann

rapi: Add resource for modifying node

A separate patch will add “auto-promote” through
“/2/nodes/[node_name]/role”.

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

2e5c33db 10/12/2011 02:01 pm Iustin Pop

Rename filter and filter_ to qfilter

We currently use 'filter' as the OpCode, QueryRequest and RAPI field
name for representing a query filter. However, since 'filter' is a
built-in function, we actually have to use filter_ throughout the code
in order to not override the built-in function....

d71369d7 09/22/2011 02:31 pm Michael Hanselmann

RAPI: Fix wrong check on instance shutdown

Commit 7fa310f6d84 (April 1st, 2011) converted the RAPI resource for
shutting down an instance to FillOpCode. Unfortunately it missed the
fact that the shutdown resource gets its parameters as query arguments.

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

fa411651 09/22/2011 02:31 pm Michael Hanselmann

baserlib: Accept empty body in FillOpcode

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>
(cherry picked from commit c6e1a3eef05674d637570c39f25a799cec7ba187)

Signed-off-by: Michael Hanselmann <>

42d4d8b9 09/20/2011 06:17 pm Michael Hanselmann

RAPI: Add resource to powercycle node

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

471a31b6 09/20/2011 03:23 pm Andrea Spadaccini

Fix two pylint errors

- hv_kvm.py: silence F0401, that is raised if pylint does not find the
affinity module
- rlib2.py: change disable-msg to disable

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

a52978c7 09/16/2011 10:44 am Michael Hanselmann

RAPI: Add resource to recreate instance's disks

This was still missing from RAPI.

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

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...
f6ce0ba2 09/14/2011 06:29 pm Michael Hanselmann

rlib2: Declare all opcodes and equivalents

By declaring all used opcodes or opcodes equivalent to the operations
executed in a resource we will be able to ensure all opcodes are covered
by RAPI (with some exceptions).

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