Statistics
| Branch: | Tag: | Revision:

root / qa / qa_rapi.py @ 34ddd63a

History | View | Annotate | Download (23.4 kB)

# Date Author Comment
ad658827 03/12/2013 03:52 pm Bernardo Dal Seno

Fix QA: skip reinstall for diskless instances

Diskless instances cannot really be reinstalled, not even through RAPI.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

301adaae 02/27/2013 04:00 pm Michael Hanselmann

QA: Disable RAPI tests for virtual clusters

The QA script connects to the RAPI daemon. In virtual cluster setups the
daemon is usually listening on a local interface not reachable from the
outside.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

dcd85eef 02/27/2013 04:00 pm Michael Hanselmann

QA: Read virtual node's RAPI certificate

The virtual node prefix must be added to the path.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

02a5fe0e 02/12/2013 04:36 pm Michael Hanselmann

QA: Set disk template directly via instance object

Use a method on the instance object instead of going through
“qa_config.GetInstanceTemplate”. This provides for better encapsulation.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

0afce24e 02/12/2013 04:36 pm Michael Hanselmann

Remove qa_config.GetInstanceNicMac

Call the wrapped instance method directly.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

b5f33afa 02/11/2013 04:58 pm Michael Hanselmann

QA: Convert instances from items to attributes

The new objects support attributes. Item access (like a dictionary) is
going away in a couple of patches.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

aecba21e 02/11/2013 04:58 pm Michael Hanselmann

QA: Convert nodes from items to attributes

The new objects support attributes, which are cleaner than
dictionary-style access. Item access (like a dictionary) is going away
in a couple of patches. Also, pylint is better at checking attributes
than dictionary entries....

6f88e076 02/08/2013 03:36 pm Michael Hanselmann

QA: Release instances through method

Instead of having a module-level function in “qa_config” to release an
instance, a new method on instance objects is used.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

a77e3d33 02/08/2013 03:35 pm Michael Hanselmann

QA: Release instance in ganeti-qa

Release instances directly from “ganeti-qa” instead of doing so in the
three tests removing instances. This is in line with how nodes are
released and makes it easier to find and debug double-release issues.

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

5de31440 02/01/2013 12:25 pm Bernardo Dal Seno

QA: Instance tests check the configuration before running

Instance test functions check the current configuration, and they will run
the actual tests only if the configuration supports them. This will be
used for refactoring in following patches.

Signed-off-by: Bernardo Dal Seno <>...

c99200a3 02/01/2013 12:25 pm Bernardo Dal Seno

QA: Use lists of nodes as argument to instance tests

Some instance test functions took two node arguments, some took one, and
some took two but the second argument could be None. This patch makes such
functions uniform by using a list of nodes as an argument. This simplifies...

906a0346 02/01/2013 12:20 pm Bernardo Dal Seno

QA: Added disk template to config

The disk templates used by the instances are tracked in the QA
configuration. This will be used to selectively enable tests according to
the configuration.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

b4d2d2cb 01/11/2013 05:37 pm Michael Hanselmann

QA: Factorize retrieving non-existent groups from config

Also add a check to make sure there are enough groups defined.

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

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....

304d9f02 09/18/2012 05:58 pm Michael Hanselmann

Migrate qa/*.py from constants to pathutils

File system paths moved from constants to pathutils.

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

5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

76b62028 08/07/2012 12:48 pm Iustin Pop

Switch job IDs to numeric

This has been a long-standing cleanup item, which we've always
refrained from doing due to the high estimated effort needed.

In reality, it turned out that after some infrastructure improvements
(the previous patches), the actual job queue-related changes are quite...

a8dbf746 06/19/2012 06:03 pm Michael Hanselmann

QA: Fix modification of HV parameters via RAPI

This is basically another case of commit d488adb.

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

f346a7d9 06/07/2012 04:51 pm Michael Hanselmann

QA: Add configuration options for static MAC address

In some QA environments static MAC addresses must be used.

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

c1513c7f 06/07/2012 04:51 pm Michael Hanselmann

QA: Ignore tags using regular expression

In some QA environments external scripts may add tags. With this patch a
regular expression can be used to ignore them during QA runs.

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

51131cad 05/14/2012 06:38 pm Michael Hanselmann

QA: Cleanup after commit 5fa0375e4a

Some tests had wrong assumptions on the instance status and some
needed explicit start or stop commands.

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

5fa0375e 05/10/2012 02:02 pm Michael Hanselmann

QA: Decorate tests with instance checks

Start using “InstanceCheck” decorator where appropriate. Use direct call
for check in places where the instance status changes during the test.

The parameters of “TestInstanceImport” had to be re-ordered to have the...

496d5ac8 04/20/2012 05:19 pm Michael Hanselmann

Fix RAPI QA with exports via query2

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

4faa4861 04/18/2012 05:01 pm Iustin Pop

Fix further QA failures due to query changes

Hopefully these will be the last ones…

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

4c1a464b 01/17/2012 12:08 pm Iustin Pop

Rework instance rename QA tests

After looking again at the QA speeds, it turned out that instance
rename was run 12 times via the command line and 12 times via RAPI;
outside of start/stop which we need for maintenance during QA, this is
the most used test....

8ccbbe4b 11/22/2011 07:55 pm Guido Trotter

qa: use maximum and minimum memory

test modification of either parameter, but also both at once.

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

fd7b69c0 10/31/2011 04:36 pm Michael Hanselmann

Fix wrong headers and licences

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Stephen Shirley <>

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...

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

QA: Add tests for instance start/stop via RAPI

This would have detected the issue fixed in the previous patch.

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

b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

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)....

d0c8c01d 07/25/2011 04:55 pm Iustin Pop

Most boring patch ever

s/'/"/ in (hopefully) the right places.

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

c0a146a1 07/21/2011 04:25 pm Michael Hanselmann

Implement instance failover via RAPI

No idea why this was missed before.

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

fe508a9d 04/21/2011 04:08 pm Michael Hanselmann

QA: Add tests for node group tags

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

713a79e7 04/01/2011 12:12 pm Michael Hanselmann

Fix QA breakage caused by 3fd7f6524

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

4fab7cab 03/15/2011 03:11 pm Michael Hanselmann

QA: Add tests for queries via RAPI

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

2932dc44 03/08/2011 12:55 pm Michael Hanselmann

QA: Improve tests for gnt-os

- Test OS lists via command line and RAPI
- Test “gnt-os diagnose” and “gnt-os info”

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

0e265161 02/18/2011 05:58 pm Guido Trotter

TestRapiInstanceRename use instance name

Currently the QA rename job wrongly passed the whole info dict to the
client.

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

0220d2cf 02/18/2011 02:16 pm Guido Trotter

Add QA rapi test for instance reinstall

This tests at least the basic case, unfortunately there is no way to
check all possibilities using the provided rapi client, as that will use
the new method unless the cluster doesn't support it.

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

b82d4c5e 01/28/2011 04:31 pm Michael Hanselmann

Add RAPI resource for instance console

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

71910715 01/18/2011 01:47 pm Iustin Pop

Rename OpPrepareExport and LUPrepareExport

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

3582eef6 01/12/2011 12:41 pm Iustin Pop

Run pylint over QA code too

Right now, the QA code is not covered by pylint, and this shows at
least one low-impact bug.

This patch does the necessary changes to make QA pylint-clean, and the
changes the makefile to run pylint for it.

Notable changes:
...

4b10fb65 12/13/2010 06:33 pm Adeodato Simo

More QA tests for group operations

This adds QA tests for the SetGroupParams operation, both for CLI and
RAPI. Additionally, it adds tests for add/rename/remove groups via RAPI,
which had not been included in a previous patch series. Finally, it also
tests setting "alloc_policy" (and, for the CLI, "ndparams") at group...

90e99856 12/13/2010 06:33 pm Adeodato Simo

Add the "alloc_policy" attribute to node groups

This can be set at group creation time and via OpSetGroupParams. The default
is "preferred", and existing node groups from previous Ganeti version will
get the attribute set to this value.

Signed-off-by: Adeodato Simo <>...

e5c2accd 12/09/2010 02:37 pm Guido Trotter

Simplify instance rename qa test

The current instance rename qa testing function can only perform
back-and-forth renames, both for command line and rapi. In order to be
able to perform same-name rename tests we change it to be able to
perform simple renames, and then we change qa to call it to perform both...

75cf411a 12/08/2010 09:45 pm Adeodato Simo

Introduce constant for the name of the initial node group

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

30131294 12/01/2010 09:40 pm Adeodato Simo

Querying node groups: add QA tests

This adds QA tests for both CLI and RAPI.

Signed-off-by: Adeodato Simo <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

4d2bd00a 10/20/2010 03:05 pm Michael Hanselmann

QA RAPI: Test HTTP 404 and 501

This tests the HTTP Not Found and Not Implemented errors.

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

638a7266 10/07/2010 03:16 pm Iustin Pop

Try again to fix the inter-cluster move QA test

This time, we re-establish the old pri/sec nodes corretly. Unfortunately this
will require now a 3-node cluster at least for drbd instances, hence it's
somewhat suboptimal, but… The other option would be to move it simply from p:s...

677e16eb 10/06/2010 03:38 pm Iustin Pop

QA: Fix instance move tests

The instance move tests were moving the instance from node pair (A,_) to
(B, A), and left it there. This patch makes sure that the first step
moves the instance to (B,A) but the second one back to (A,B), so that
the instance is left on the same primary node....

a889c536 10/05/2010 05:59 pm Michael Hanselmann

RAPI QA: Override MAC address when moving instance

This will make this test work again.

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

c326b4ef 09/16/2010 01:46 pm Michael Hanselmann

QA: Test more tag operations via RAPI

This ensures tag operations work via RAPI. Also print requested URI to
stdout for debugging.

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

fd837171 09/16/2010 01:43 pm Michael Hanselmann

qa_rapi: Fix indentation error

If no function to verify the result was specified, qa_rapi._DoTests
wouldn't return the result.

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

3b7158ef 08/18/2010 02:21 pm Michael Hanselmann

RAPI client: Support modifying instances

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

7fb50870 08/10/2010 06:56 pm Michael Hanselmann

QA: Test renaming instance via RAPI

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

938bde86 07/29/2010 04:05 pm Michael Hanselmann

QA: Test instance migration via CLI and RAPI

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

4ea3de4e 07/08/2010 06:57 pm Balazs Lecz

Add oper_vcpus instance status field

This introduces a new instance status field, named "oper_vcpus".
It contains the actual number of VCPUs an instance is using as
seen by the hypervisor.

Signed-off-by: Balazs Lecz <>
Reviewed-by: Iustin Pop <>

2a7c3583 07/01/2010 03:13 pm Michael Hanselmann

RAPI client: Switch to pycURL

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.
...

5d831182 06/14/2010 07:57 pm Michael Hanselmann

qa_rapi: Test inter-cluster instance move script

This test moves an instance on the same cluster and, if successful,
moves it back. While not testing a real move between two clusters,
this is certainly better than nothing.

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

ebeb600f 05/18/2010 06:53 pm Michael Hanselmann

RAPI changes for instance moves

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....

924e95f9 05/13/2010 04:58 pm Michael Hanselmann

QA: Test instance creation/deletion via RAPI client

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

2771835c 05/11/2010 06:04 pm Michael Hanselmann

RAPI QA: Use RAPI client

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

8cb70e56 05/05/2010 01:20 pm Michael Hanselmann

RAPI QA: Test instance creation/removal via RAPI

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

94e63ca1 05/05/2010 01:20 pm Michael Hanselmann

RAPI QA: Support for request body

- Add support for sending JSON-encoded body to RAPI daemon
(required to test more complex resources)
- Expand names when testing resources against config

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

725ec2f1 04/12/2010 05:53 pm René Nussbaumer

QA: Make the rapi credential handling less involving

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

e6ce18ac 03/26/2010 03:56 pm René Nussbaumer

Adding QA RAPI tests for activate-disks and deactivate-disks calls

  • This also adds support for authenticated RAPI calls
  • Other HTTP methods than GET/POST

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

22482387 09/25/2009 05:13 pm Iustin Pop

Fix RAPI QA, broken by NIC parameters changes

This also adds the new nic.links query field.

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

8c96d01f 07/24/2009 03:05 pm Guido Trotter

Move rapi to GetDaemonPort

Currently rapi is the only daemon which accepts a port option, rather
than querying its own port from services, and failing back to the
default if not found. Changing this to conform to what other daemons do.

Also update the ganeti-rapi(8) manpage...

e1876432 07/24/2009 11:35 am Guido Trotter

Get rid of constants.RAPI_ENABLE

This constant is unused, except in qa. Removing it since it's always True.

This patch also removes the unused qa_rapi.PrintRemoteAPIWarning
function, and removes a comment about temporary constants "until we have
cluster parameters"....

68289c75 02/10/2009 10:13 am Iustin Pop

Fix one more RAPI QA test

This was skipped in the previous QA patch.

Reviewed-by: imsnah

49b1d36e 02/06/2009 03:06 pm Iustin Pop

QA: switch RAPI to https

Since we by default now use SSL for RAPI, we need to switch the QA
tests to SSL too.

Reviewed-by: amishchenko

a5b9d725 02/05/2009 11:47 am Iustin Pop

Revive RAPI QA tests for 2.0-style RAPI

This patch fixes the RAPI QA tests to work with today's RAPI code and
also does some other minor improvements:
- QA: only create the cluster if so configured (‘create-cluster’ key),
this allows running parts of the QA suite against existing clusters...

c85d3b64 08/15/2008 11:43 am Michael Hanselmann

Whitespace fixes for remote API QA checks

Reviewed-by: ultrotter

ed54b47e 08/15/2008 11:43 am Michael Hanselmann

Remove QA hook functionality

To my knowledge they're used nowhere and it's at least slightly
confusing to people adding new QA checks.

Reviewed-by: ultrotter

a47f574c 07/15/2008 04:36 pm Oleksiy Mishchenko

Migrate RAPI QA to trunk.

Reviewed-by: imsnah