Statistics
| Branch: | Tag: | Revision:

root / test / py / cmdlib @ 1c4910f7

# Date Author Comment
1c4910f7 03/11/2014 05:09 pm Jose A. Lopes

OS images in 'LUInstanceCreate' and OS scripts optional

  • Use the empty string in 'ganeti.objects.Instance.os' to signify that
    the instance does not use OS scripts.
  • Make several calls related to OS scripts first test whether OS
    scripts are being used....
8436d0da 03/07/2014 08:54 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    (no changes)
  • stable-2.10
    Revision bump for the 2.10.1 release
    Update NEWS file for 2.10.1
    Use node UUIDs for executing LU hook
    Add PreparePostHookNodes to LUs
    Fix error propagation in post-commit hooks...
205d3309 03/07/2014 08:33 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Revision bump for the 2.10.1 release
    Update NEWS file for 2.10.1
    Use node UUIDs for executing LU hook
    Add PreparePostHookNodes to LUs
    Fix error propagation in post-commit hooks
  • stable-2.9...
aa14fb0a 03/05/2014 11:21 am Hrvoje Ribicic

Fix failing tests

The previously introduced changes caused some tests to fail. This patch
alters the tests to expect different values, while still ensuring
correct behavior.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

ec3a7362 03/05/2014 10:58 am Jose A. Lopes

Remove duplicated '_CheckOSVariant'

It seems '_CheckOSVariant' was moved from 'ganeti.cmdlib.instance' to
'ganeti.cmdlib.instance_utils' but the source was never deleted. This
patch deletes the source copy if this function.

Signed-off-by: Jose A. Lopes <>...

ff1c051b 03/04/2014 11:41 am Thomas Thrainer

Use node UUIDs for executing LU hooks

LUNodeAdd, the only LU using a node name still, is changed to overwrite
PreparePostHookNodes() and use node UUIDs only as well.
This allows to remove the support for 3-tuples as results of
BuildHooksNodes() and removes the translation to node names....

b4726cd7 02/28/2014 02:08 pm Dimitris Bliablias

Add unittest for gnt-cluster modify --mac-prefix

Add unittest for cluster mac-prefix modification support.

Signed-off-by: Dimitris Bliablias <>
Reviewed-by: Jose A. Lopes <>

a53772a0 02/14/2014 04:57 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Update design doc wrt to improved SSL design
    Test node certificate renewal in QA
    Use node UUID as client certificate serial number
    Revert "Temporarily remove SSL changes from NEWS file"
    Revert "Disabling client certificate usage"...
d5104ca4 02/14/2014 03:51 pm Helga Velroyen

Revert "Disabling client certificate usage"

This reverts commit 45f75526b848, which was introduced to
temporarily disable the implementation of SSL client
certificates. As this patch series fixes the reason for
the disabling, we are rolling back the patch....

d759a02b 02/10/2014 06:38 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    (no changes)
  • stable-2.10
    Fix 'JobIdListOnly' type from 'List' to 'Map'
    Remove NEWS entry for 2.9.4
    Workaround for monitor bug related to greeting msg
    hotplug: Verify if a command succeeded or not...
adcccd43 02/10/2014 06:24 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Fix 'JobIdListOnly' type from 'List' to 'Map'
    Remove NEWS entry for 2.9.4
    Workaround for monitor bug related to greeting msg
    hotplug: Verify if a command succeeded or not
    hotplug: Call each qemu commmand with an own socat...
6bce7ba2 02/07/2014 11:14 am Santi Raffa

OpCodes: modify InstanceCreate for private, secret params

Modify InstanceCreate to accept process private and secret parameters.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

07e3c124 02/07/2014 11:14 am Santi Raffa

OpCodes: modify ClusterSetParams for private parameters

Modify ClusterSetParams to accept and process private parameters.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

a5efec93 02/07/2014 11:14 am Santi Raffa

Add private OS parameters to cluster and instance conf

This updates objects, constructors and mocks for Instance and Cluster
objects in Python and Haskell.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

560ef132 02/07/2014 11:13 am Santi Raffa

serializer: emit and encode Private values

For inbound data the simplest, safest thing to do is to traverse all
JSON right after encoding and search for private parameters by key.

This ensures that all consumers of this data get Private values
transparently and consistently; the serializing methods don't have to...

ddd667f7 02/06/2014 12:45 pm Thomas Thrainer

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Make the LUInstanceCreate return node names, not UUIDs
    Document new handling of degraded instances in NEWS
    Gracefully handle degraded instances in verification
    Be aware of the degraded case when cleaning up an instance...
45f75526 01/24/2014 05:06 pm Helga Velroyen

Disabling client certificate usage

This patch temporarily disables the usage of the client
SSL certificates. The handling of RPC connections had a
conceptional flaw, because the certificates lack a proper
signature. For this, Ganeti needs to implement a CA,...

a6c43c02 12/20/2013 03:15 pm Helga Velroyen

Verify client certificates

This patch adds a step to 'gnt-cluster verify' to verify
the existence and validity of the nodes' client
certificates. Since this is a crucial point of the
security concept, the verification is very detailed with
expressive error messages and well tested by unit tests....

b3cc1646 12/20/2013 03:15 pm Helga Velroyen

Verify incoming RPCs against candidate map

From this patch on, incoming RPC calls are checked against
the map of valid master candidate certificates. If no map
is present, the cluster is assumed to be in
bootstrap/upgrade mode and compares the incoming call...

840ad2ab 12/20/2013 03:15 pm Helga Velroyen

Handle client certificates on node add/remove

This patch adds the certificate of a newly added or
readded master candidate node to the map of master candidate
certificates. It removes a master candidate node's certificate
digest from the candidate certificate map if the node is...

5b6f9e35 12/20/2013 03:15 pm Helga Velroyen

Add certificate for master node

On cluster initialization, the master node's
SSL certificate digest is added to the list of master
candidate certificates.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Hrvoje Ribicic <>

f3ac6f36 12/19/2013 01:59 pm Klaus Aehlig

Merge branch 'stable-2.10' into master

  • stable-2.10
    Version bump for 2.10.0~rc1
    Update NEWS for 2.10.0 rc1 release
    Fix pylint 0.26.0/Python 2.7 warning
    Update INSTALL and devnotes for 2.10 release
  • stable-2.9
    Bump revision for 2.9.2
    Update NEWS for 2.9.2 release...
4869595d 12/17/2013 10:11 pm Petr Pudlak

Add a Python directory for RPC code to keep it at one place

Move rpc.py to rpc/node.py and modify imports in existing code.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Helga Velroyen <>

845b7ed1 12/17/2013 06:12 pm Santi Raffa

Gluster: mount automatically

Add parameters to the Gluster disk template so Gluster can manage the
mount point point autonomously.

Signed-off-by: Santi Raffa <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>

ac156ecd 12/17/2013 06:12 pm Santi Raffa

Gluster: use ssconf value for mountpoint directory

Gluster still does not mount anything autonomously, but this commit
changes where Gluster expects its mountpoint to be.

Signed-off-by: Santi Raffa <>
Signed-off-by: Thomas Thrainer <>...

c486fb6c 12/16/2013 12:37 pm Thomas Thrainer

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Bump revision for 2.9.2
    Update NEWS for 2.9.2 release
    Pass hvparams to GetInstanceInfo
    Adapt parameters that moved to instance variables
    Avoid lines longer than 80 chars
    SingleNotifyPipeCondition: don't share pollers...
2a02d6fe 11/26/2013 11:14 am Helga Velroyen

Remove instance query python code

This patch removes the python code for the instance
queries. So far, it replaces it by 'NotImplemented'
exceptions. In a later patch of this series, the
remaining part is remove completely.

Signed-off-by: Helga Velroyen <>...

fbde16f0 11/26/2013 11:13 am Helga Velroyen

Use query client when neccessary for group queries

This patch makes code use the query client for group
queries where necessary in order to remove the python
queries soon.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Hrvoje Ribicic <>

fbeb41e6 11/26/2013 11:13 am Helga Velroyen

Switch to haskell for export (aka backup) queries

This patch removes the python implementation of export
(aka backup) queries. So far, it is replaced by
'NotImplemented' exceptions, but later in this series
it will be replaced completely.

Signed-off-by: Helga Velroyen <>...

a9532fb0 11/26/2013 11:13 am Helga Velroyen

masterd: implement query via luxi

The master daemon so far still did queries via the python
implementation. This patch implements that it uses the
haskell implementation and removes the node queries from
the list of OP-queriable entities.

Signed-off-by: Helga Velroyen <>...

96ed3a3e 11/21/2013 04:06 pm Dimitris Aragiorgis

Introduce --hotplug-if-possible option

This will be useful for an external entity using RAPI that
wants to modify devices of instances.

The common use case for that is:
"I want to add a NIC/disk to an instance. If it is running
then try to hotplug the device. If not, then just add it to config."...

031d2db1 11/18/2013 05:22 pm Dimitris Aragiorgis

Allow instances to obtain externally reserved IPs

The administrator should be able to assign an externally reserved IP
to a Ganeti instance manually, if desired. Currently this is not
supported. External reservations should act as holes in the pool and
not just as IPs already used by someone outside of Ganeti....

a4417db4 11/15/2013 04:49 pm Thomas Thrainer

Merge branch 'stable-2.10' into master

Merge branch 'stable-2.10' into master

  • stable-2.10
    Don't allow optional node parameters
    Move OVS node parameters to the right place
    Make NIC VLAN queryable
    Pass VLAN parameter correctly in moves
    Use constant instead of raw string...
07e68848 11/14/2013 04:30 pm Thomas Thrainer

Don't allow optional node parameters

Ganeti does not support optional fields in parameters
(hypervisor-params, disk-params, etc.). OpenVSwitch related node
parameters were the exception to this rule, which caused numerous
problems related to import/export and (de-)serialization....

a09639d1 11/11/2013 10:29 pm Santi Raffa

Remove hardcoded references to File, SharedFile templates

DTS_FILEBASED is a constant that exists and this commit makes sure
that it is used whenever sensible, rather than resorting to hardcoding
the pair of templates in very many files.

Signed-off-by: Santi Raffa <>...

cba1fce1 11/05/2013 03:31 pm Klaus Aehlig

Merge branch 'stable-2.10' into master

  • stable-2.10
    Fix documentation
    Replace all constant definitions with re-exports
    Prepare constants for automatic reexport
    Hs2Py constants: 'hvsParameterTypes' and 'hvsParameters'
    Fix indentation that triggers PEP8 error...
bb133242 10/31/2013 12:46 pm Klaus Aehlig

Merge branch 'stable-2.10' into master

  • stable-2.10
    Remove FIXME + update man pages wrt iallocator
    Don't check for master netdev when using OVS
    Fix TypeError in backend/ConfigureOVS
    Create Open vSwitch on Master during Cluster init
    SimpleRetry on BlockDev.Remove()...
24711492 10/31/2013 11:28 am Dimitris Aragiorgis

Check if hotplug is supported in CheckPrereq

Introduce new RPC hotplug_supported that invokes the corresponding
hypervisor's method which checks if hotplug is generally
supported. Call this RPC early in CheckPrereq() and abort if
hotplug is not supported. Currently only KVM hypervisor with...

063613aa 10/29/2013 03:56 pm Thomas Thrainer

Use import-export daemon for intra-cluster moves

This unifies the inter- and intra-cluster moves and the backup code, so
less code needs to be maintained.

Also fix failing tests for LUInstanceMove by following the code changes
in the tests.

Signed-off-by: Thomas Thrainer <>...

fda3d987 10/24/2013 12:27 pm Dimitris Aragiorgis

Add unittests for Hotplug support

Try base InstanceSetParams tests that modify instance's
devices with hotplug=True.

Add some unittests for kvm hypervisor regarding runtime file
manipulation. Based on a sample runtime file search for
specific disk and nic entries based on their UUID....

ba924970 10/24/2013 12:27 pm Dimitris Aragiorgis

Hotplug: cmdlib support

Hotplugging is done by functions invoked by ApplyContainerMods(). In
order hotplugging to take place the --hotplug option must be passed
otherwise the modifications will take place after reboot.

NIC hotplug supports add, remove and modify. The modify is done by removing...

ff5def9b 10/24/2013 12:27 pm Dimitris Aragiorgis

Return link_name in blockdev_assemble rpc

Until now this RPC returned only dev_path. Since we use it in
hotplug we have to know the simlink of the device so that we
pass it to the corresponding hypervisor command and include it
in block_devices entry in runtime files....

f8f415a1 10/17/2013 01:23 pm Helga Velroyen

Fix unit test regarding recent changes in node_info RPC

This fixes a unit test in instance_storage_unittest.py,
which was affected by the recent change in the RCP
'node_info'.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Hrovje Ribicic <>

5859dad6 10/16/2013 11:59 am Helga Velroyen

Move orphaned unit tests to cmdlib/cluster_unittest.py

Through some merge from 2.9 to master, some unit tests
in the file ganeti.comdlib.common_unittest.py were
no longer referenced in the Makefile and as such not
run anymore. With the introduction of the cmdlib test...

70b634e6 10/15/2013 02:54 pm Thomas Thrainer

Add unit tests for LUBackupExport

This patch adds unit tests for LUBackupExport.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

3388debb 10/15/2013 02:54 pm Thomas Thrainer

Add unit tests for LUBackupPrepare

This patch adds unit tests for LUBackupPrepare.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

a80e802a 10/15/2013 02:53 pm Thomas Thrainer

Add unit tests for LUBackupQuery

This patch adds unit tests for LUBackupQuery.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

70e8dd0a 10/11/2013 02:13 pm Helga Velroyen

Move unit tests for --file-storage-dir to cmdlib/*

There were some unit tests for the '--file-storage-dir'
option of 'gnt-cluster modify' still left in the unit
test file ganeti.cmdlib.cluster_unittest.py.
With the introducion of the unit test framework for...

916c0e6f 10/11/2013 02:13 pm Helga Velroyen

Move disk template unit tests to test/py/cmdlib/

This patch moves some unit tests related to dis/enabling
disk templates from ganeti.cmdlib.cluster_unittest.py
to cmdlib/cluster_unittest.py to utilized the new cmdlib
unit test framework.

Signed-off-by: Helga Velroyen <>...

537dba0c 10/02/2013 05:55 pm Raffa Santi

Add tests specific to the user/kernelspace access feature

Check that the validation procedures don't accept invalid values
and also don't choke on valid values.

Signed-off-by: Santi Raffa <>
Reviewed-by: Thomas Thrainer <>

9b9e088c 10/02/2013 05:55 pm Raffa Santi

Define 'access' disk-parameter type

Add the "access" parameter to the RBD configuration. Fix test broken
by this change.

Signed-off-by: Santi Raffa <>
Reviewed-by: Thomas Thrainer <>

d4d424fb 10/02/2013 03:50 pm Jose A. Lopes

Replace 'IALLOCATOR_NEVAC_*' with 'NODE_EVAC_*'

Replace uses of 'IALLOCATOR_NEVAC_PRI', 'IALLOCATOR_NEVAC_SEC',
'IALLOCATOR_NEVAC_ALL', and 'IALLOCATOR_NEVAC_MODES', with
'NODE_EVAC_PRI', 'NODE_EVAC_SEC', 'NODE_EVAC_ALL', and
'NODE_EVAC_MODES', given that these constants are repeated....

f3cb57d5 09/27/2013 02:25 pm Michele Tartara

Prevent lint error in mocked classes

Accessing private methods of parent classes is bad, but it is sometimes the best
approach for classes mocking them for testing reasons.
Selectively disable the related lint error just for the few functions that need
to do it....

317a3fdb 09/27/2013 02:24 pm Michele Tartara

Fix indentation for newer lints

Newer versions of pylint are more strict regarding indentation rules. This
commit fixes a couple of indentations that they consider wrong.

Signed-off-by: Michele Tartara <>
Reviewed-by: Jose A. Lopes <>

3c260845 09/26/2013 04:02 pm Thomas Thrainer

Honor disks_active of instance when adding disks

Adding a disk to an instance used to leave the disk behind activated, no
matter how the disks_active flag of the instance was. This changes make
sure that new disks are only active if the other disks of the instance...

922a9e65 09/26/2013 04:02 pm Thomas Thrainer

Wait for disk sync when adding a disk

When creating an instance, gnt-instance waits for instance disks to
sync. Inconsistently, this was not the case for adding a disk to an
instance. This patch changes the default behavior to wait for sync when
adding a disk, but honor the --no-wait-for-sync option which...

fd424c8a 09/24/2013 09:17 am Thomas Thrainer

Remove physical_id from config mock

Disk objects no longer support the physical_id field, so remove it from
mocked disk objects.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Jose A. Lopes <>

3d835d1b 09/24/2013 09:17 am Thomas Thrainer

Fix tests related to the physical_id field

Remove all references to the physical_id field of disk objects in tests.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Jose A. Lopes <>

47cce79a 09/17/2013 06:45 pm Sebastian Gebhard

Further tests for LUNodeAdd

This patch adds tests for the remaining functionality of LUNodeAdd.

Signed-off-by: Sebastian Gebhard <>
Signed-off-by: Klaus Aehlig <>
Reviewed-by: Klaus Aehlig <>

55ba3ad6 09/17/2013 06:45 pm Sebastian Gebhard

Add unittests for OpenvSwitch in LUNodeAdd

This patch adds node_unittest.py containing the framework for unit
testing LUNodeAdd.
At this point, only test setup and tests for OpenvSwitch are
implemented.

Signed-off-by: Sebastian Gebhard <>...

4256f8fe 09/17/2013 06:45 pm Sebastian Gebhard

Replace more IPs with reserved adresses

Recently, some IP addresses were changed to TEST-NETs from RFC 5737.
This patch changes some more occurences of wrong IPs and replaces them.

TEST-NET-1 is used for primary_ips, TEST-NET-2 for networks and TEST-NET-3 for...

d45574de 09/17/2013 06:45 pm Sebastian Gebhard

Mock RPC for unit tests

This patch enables patching the rpc module to create a mocked version
which can be used to mock a rpc.DnsOnlyRunner(). This is needed for
unit testing LUNodeAdd, as it need to run RPCs against nodes not yet
present in the configuration....

11414807 09/13/2013 02:20 pm Klaus Aehlig

Fix example IPs and hostnames in tests

Our tests are a form of documentation, and hence should use
IPs from the TEST-NET ranges according to RFC 5737. They definitely
should not use real public IP addresses.

Similarly, example host names should be from one of the reserved...

2f3230f6 09/12/2013 03:56 pm Thomas Thrainer

Add unit test for LUInstanceQuery and -QueryData

This patch provides rudimentary unit test coverage for LUInstanceQuery
and LUInstanceQueryData.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

d1b2ffe8 09/12/2013 03:56 pm Thomas Thrainer

Add unit tests for LUInstanceMigrate and -Failover

This patch adds rudimentary unit test coverage for LUInstanceMigrate and
LUInstanceFailover.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

b02063fe 09/12/2013 03:56 pm Thomas Thrainer

Add unit tests for LUInstanceChangeGroup

This patch provides unit test coverage for LUInstanceChangeGroup.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

27619aac 09/12/2013 03:56 pm Thomas Thrainer

Add unit tests for LUInstanceSetParams

This patch adds unit tests for LUInstanceSetParams. It does not provide
100% coverage, but covers a significant portion.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

f41b569f 09/12/2013 03:56 pm Thomas Thrainer

Fix testMasterNetmask in TestLUClusterSetParams

The netmask was previously wrongly given as a bitmask, now it's given as
the net prefix length.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

0c5f1b13 09/12/2013 03:23 pm Thomas Thrainer

Merge branch 'stable-2.9' into master

  • stable-2.9
    Fix bridging in net-common
    Sync build_chroot with buildbot slack role
    Auto-upgrade of disks' config wrt LD-renaming
    Fix tests regarding DISK_LD_DEFAULTS
    Fixing renaming of DISK_LD_DEFAULTS
    Replace LD_* constants with DT_* constants...
31ccfc0e 08/27/2013 04:50 pm Helga Velroyen

cluster modify: deprecate --no-drbd-storage

As in the previous patch, the option '--no-drbd-storage'
is deprectated, because it is subsumed by the non-inclusion
of 'drbd' in the list of enabled disk templates.

Signed-off-by: Helga Velroyen <>...

7c577910 08/27/2013 04:50 pm Helga Velroyen

cmdlib/cluster.py: unit tests for usermode helper

This patch factors out the functions that deal with setting
and modifying the DRBD usermode helper in cluster.py in
order to make them more unittestable. The unit tests are
provided as well. No functional changes otherwise....

1583d0e4 08/21/2013 10:27 am Thomas Thrainer

Adapt tests for merged changes in IPolicy handling

The enabled disk templates in IPolicies are stricter checked after the
merge from 2.9, so adapt the tests to follow those changes.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

4a8c84f3 08/21/2013 10:27 am Thomas Thrainer

Add unit tests for LUInstanceMultiAlloc

This patch adds unit test coverage for LUInstanceMultiAlloc.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

bf2a3eba 08/21/2013 10:27 am Thomas Thrainer

Add unit test for LUInstanceRename

This patch adds unit test coverage for LUInstanceRename.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

72bac0c5 08/21/2013 10:27 am Thomas Thrainer

Add basic unit tests for instance import

This patch adds basic unit tests for instance import in
LUInstanceCreate. It does not provide full coverage though.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

57da0458 08/21/2013 10:27 am Thomas Thrainer

Introduce GetMockLU and reduce use of _FakeLU

Introduce a new method of creating a mocked LU for tests, and reduce the
use of the legacy _FakeLU class.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

e066018b 08/21/2013 10:27 am Thomas Thrainer

Add unit tests for LUInstanceRemove and -Move

This patch adds unit test coverage for LUInstanceRemove and
LUInstanceMove.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

66222813 08/21/2013 10:27 am Thomas Thrainer

Add unit tests for LUInstanceCreate and move tests

- Move instance related tests to instance_unittest.py
- Adapt moved tests to the new test framework where appropriate
- Add unit test coverage for LUInstanceCreate
- Only instance creation is covered yet, no imports...

3c768f88 08/14/2013 03:19 pm Thomas Thrainer

Add unit test for LUGroupVerifyDisks

This patch adds unit test coverage for LUGroupVerifyDisks.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

4b8f9420 08/14/2013 03:19 pm Thomas Thrainer

Add unit test for LUGroupEvacuate

This patch adds unit test coverage for LUGroupEvacuate.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

7ac3f7b0 08/14/2013 03:19 pm Thomas Thrainer

Add unit tests for LUGroupRename

This patch adds unit test coverage for LUGroupRename.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

8ef0c3eb 08/14/2013 03:19 pm Thomas Thrainer

Add unit tests for LUGroupRemove

This patch adds unit test coverage for LUGroupRemove.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

67d2f602 08/14/2013 03:19 pm Thomas Thrainer

Add unit tests for LUGroupSetParams

This adds unit test coverage for LUGroupSetParams.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

ae904a6b 08/14/2013 03:19 pm Thomas Thrainer

Add unit test for LUGroupQuery

Provide unit test coverage for LUGroupQuery.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

d189f139 08/14/2013 03:19 pm Thomas Thrainer

Add unit tests for LUGroupAssignNodes

Add unit test coverage for LUGroupAssignNodes, including the split
instances check.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

9051a390 08/14/2013 03:19 pm Thomas Thrainer

Add unit tests for LUGroupAdd

Provide unit test coverage for LUGroupAdd.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

8129eac1 08/14/2013 03:19 pm Thomas Thrainer

Move TestLUGroupAssignNodes to group_unittest.py

While moving the test, it is adapted to the new test framework.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

570b6322 08/13/2013 12:02 pm Thomas Thrainer

Add test for LUClusterVerifyDisks

This LU only creates additional jobs as result, so this is a trivial
unit test.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

9fdb10be 08/13/2013 12:02 pm Thomas Thrainer

Extend unit tests for LUClusterVerifyGroup

- Add tests for additional Verify* methods
- Converted test for VerifyFiles to the new test framework
- Added possibility to prepare the LU in a test class before actually
executing the test method with it

Signed-off-by: Thomas Thrainer <>...

b8f45292 08/08/2013 05:21 pm Thomas Thrainer

Add possibility to access locked LU in tests

This features is useful to test (private) methods of LU's during tests,
where those methods rely on the LU being completely initialized and
locking already performed.

An initial version of unit tests for LUClusterVerifyGroup makes use of...

850be460 08/08/2013 05:20 pm Thomas Thrainer

Add test for LUClusterVerifyConfig

Add unit test covering LUClusterVerifyConfig.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

c60f7675 08/08/2013 05:20 pm Thomas Thrainer

Add test for LUClusterVerify

As this LU returns other jobs as result, submitting jobs from within
LU's is now mocked too.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

08cef8fc 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterRename

Also mock the netutils and ssh module in order to test all code paths.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

c487ae24 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterRepairDiskSizes

Also add build method for easy building of disk objects to the test
framework.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

f02733cc 08/07/2013 06:52 pm Thomas Thrainer

Introduce shortcut properties for config objects

Some configuration objects are accessed quite often, so introduce
shortcut properties for those.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

a794b8d7 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterSetParams

Some changes to the test framework were performed while writing this
test:
- Extended builder for disks
- Introduced builder for NICs
- Fixed bugs in RpcResultsBuilder

Signed-off-by: Thomas Thrainer <>...

812e07ab 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterPostInit

Also extract common assertion logic for hook invocations to
CmdlibTestCase.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

b730e2a7 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterQuery

Unit-test LUClusterQuery. Some changes in the mocked cluster
configuration are made, because the configuration was not completely
valid before.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

6aac41fa 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterRedistConf

Unit-test LUClusterRedistConf. Given the simplicity of the LU, this unit
test only exercises the LU code.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

bd6fb93b 08/07/2013 06:52 pm Thomas Thrainer

Add unit tests for LUClusterDestroy

This patch adds unit test for the LUClusterDestroy Logical Unit.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>