Statistics
| Branch: | Tag: | Revision:

root / test / hs / Test / Ganeti @ 36162faf

# Date Author Comment
36162faf 03/04/2013 06:08 pm Iustin Pop

Rename/make uniform the other query entities

Following the new naming style introduced in Exports.hs, this patch
renames the other resources to export non-qualified names (fieldMap as
opposed to nodeFieldMap), and to use qualified module imports.

Also fixes a haddock issue in a docstring....

0b08c8bf 02/20/2013 07:12 pm Helga Velroyen

Remove test of obsolete getNetworkUuid method

This will remove the tests for the getNetworkUuid method.
The method will be obsolete after the changes regarding
identification of networks by UUID and not name are merged
into master. Will send another patch for removing the...

da9e2aff 02/20/2013 06:47 pm Iustin Pop

Add two utility functions for handling Either lists

These two functions permit operating in bulk on only the Left or Right
values in the original list, then reassembling the list back in the
original order.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

9c0a27d0 02/20/2013 06:47 pm Iustin Pop

Simplify RPC error cases

This patch removes the node from the RPC error constructurs
CurlLayerError and OfflineNodeError. The rationale is that we anyway
return tuples (node, result), and removing this duplication allows
simplified signatures/calls in the execution of RPC calls....

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

a59d5fa1 02/19/2013 04:27 pm Michele Tartara

Infrastructure for specifying instance status change reason

This patch introduces some infrastructural modifications that will be used by
the following commits to implement the support for specifying the reason for
the last status change of an instance.
...

834bea99 02/18/2013 06:08 pm Helga Velroyen

Unit tests for Query/Network.hs

This patch adds a couple of unit tests for Query/Network.hs.
Note that they'll need to be adapted, once issue 362 is addressed.

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

c5a957c3 02/18/2013 05:35 pm Michele Tartara

Add Haskell parser for "xm uptime"

In order to fetch precise information about the uptime of the VMs
running in Xen, we need to analyze the output of the "xm uptime" command.

This commit adds the parser to do that, and its tests.

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

b8585908 02/18/2013 05:35 pm Michele Tartara

Add Haskell parser for "xm list --long"

In order to fetch precise information about the status of the VMs running in
Xen, we need to analyze the output of the "xm list --long" command.

This commit adds the parser to do that, and its tests.

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

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...
37fe56e0 02/12/2013 03:47 pm Iustin Pop

Add functions to parse CLI-level format of priorities

The current serialisation format for submit priorities is
integer-based, same as the opcode json serialisation. But for CLI
level, we need to support a string-based format, so we add functions
to parse and format this representation....

bb63ccb0 02/12/2013 03:39 pm Helga Velroyen

Removes check for conflicts from NetworkDisconnect

This removes the check for conflicts from the Haskell
version of the OpCode NetworkDisconnect. This alignes
the Haskell code with the patch
"Force conflicts check in LUNetworkDisconnect" (which
is currently under review). I will submit these patches...

3c296f56 02/12/2013 03:25 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    QA: Support additional arguments for initialization
    qa_utils: Fix order of arguments passed to _AssertRetCode
    Improve reporting on errors.AddressPoolError exceptions
    Add note about lv-tags rename...
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...

72747d91 02/07/2013 06:14 pm Iustin Pop

Remove use of 'head' and add hlint warning for it

Since 'head' is unsafe to use in most cases, this patch removes its
use from most of the code, adds a lint warning for it (and for tail as
well), and adds override annotations in the few cases where it's
actually OK to use it (mainly when using head over the result of...

83251115 02/05/2013 06:55 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7:
    Redirect output for gnt-* list/list-fields commands
    Add function to execute QA commands with redirected output
    Implement option to skip logging of QA commands
    Fix typo in a comment
    Add some more Haskell/Python equivalence tests...
ca7b4f48 02/05/2013 10:36 am Iustin Pop

Add some more Haskell/Python equivalence tests

This would have caught the log file problem fixed in the previous
patch (9411474b), for example. Also we test user/group equivalence,
name only.

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

b6d9bec8 01/30/2013 07:38 pm Dato Simó

Program/Harep.hs: add skeleton for the new auto-repair tool

harep(1) detects certain kind of problems with instances and applies the
allowed set of solutions. See doc/design-autorepair.rst.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

0ae4b355 01/30/2013 07:26 pm Helga Velroyen

Removes check for conflicts from NetworkDisconnect

This removes the check for conflicts from the Haskell
version of the OpCode NetworkDisconnect. This alignes
the Haskell code with the patch
"Force conflicts check in LUNetworkDisconnect" (which
is currently under review). I will submit these patches...

b43064d0 01/24/2013 08:30 pm Helga Velroyen

Extend config by networks and networks by UUIDs

For network queries to work, we need to extend the general
config type to include all available networks. Additionally,
we add UUIDs to the network type itself.

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

9fb621af 01/18/2013 12:41 pm Yiannis Tsiouris

Text wrap in Haskell code

This adds two functions in Utils.hs: 'wrap' and 'trim' along with some
simple tests. 'wrap' is used in Common.hs for wrapping command
descriptions to a fixed line length, e.g. useful for the "--help"
option.

Signed-off-by: Yiannis Tsiouris <>...

45566243 01/15/2013 07:31 pm Iustin Pop

Remove special-case of "0" in niceSort

Since now niceSort is more consistently behaved, we don't have the
special casing. This should have been removed in commit a7f0953a, but
I didn't realise it.

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

d46c9fd6 01/15/2013 05:17 pm Dato Simó

test/Types.hs: add an HLint ANN for ignoring camelCase

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

2f3a3365 01/15/2013 11:42 am Helga Velroyen

Replace nodegroups' PartialNic by PartialNicParams

This fixes a bug that corrups the config when one adds a
network to a node group. I wil soon extend QA by some commands
that would have detected this.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

ef947a42 01/14/2013 05:54 pm Dato Simó

Loader.hs: ignore expired ArSuspended policies

At the moment, because 'mergeData' is pure, it may set instance auto-repair
policies that are of the form `ArSuspended $ Until timestamp_in_the_past`.
If later on the auto-repair tool notices this, it has lost access to what...

b6aeda4a 01/14/2013 05:54 pm Dato Simó

Utils.hs: add a clockTimeToString function

This function allows to easily convert a ClockTime object to a string
representation of its timestamp (seconds-only).

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

b009f682 01/14/2013 05:54 pm Dato Simó

Utils.hs: function to chomp prefix + separator from a string

Some auto-repair tags are composed of a prefix and then an optional
argument; the new "chompPrefix" function in Utils.hs allows to strip a
prefix, allowing the last character (the separator) to be absent if there...

3e77a36c 01/14/2013 05:52 pm Dato Simó

Add initial constants and Haskell ADTs for auto repair

In this commit, the AutoRepairType and AutoRepairResult types are defined,
with the possible values specified in doc/design-autorepair.rst.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

f1f6f117 01/09/2013 07:17 pm Dato Simó

test/Utils.hs: fix capitalization in docstring comment

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

eb62691c 01/08/2013 06:16 pm Michele Tartara

Support integrating instance information in the DRBD parser

This commit modifies the DRBD parser and its data structures to include
information about the instance a DRBD minor belongs to.

Test files have been updated as well, to support the new field in the data...

8d459129 01/07/2013 07:00 pm Michael Hanselmann

Add "use_locking" parameter to network query opcode

This was extracted from a patch by Dimitris Aragiorgis with the subject
“Add locking to _NetworkQuery”. The rest of the patch did no longer
apply and will require more work.

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

2fd5a116 12/28/2012 05:50 pm Iustin Pop

Move src/Ganeti/HTools/Program.hs to Program/Main.hs

This removes one more tab conflict; this is the last module in our
code where we have both x.hs and x/.

Furthermore, we collapse all actual code into the new Main.hs module,
leaving the htools.hs basically empty (will allow better testing in...

1c0f9d12 12/27/2012 03:34 pm Iustin Pop

Remove duplicate test file functions

This patch unifies the functions that generated the tree
reorganisation discussion in the first place :)

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

83846468 12/27/2012 03:34 pm Iustin Pop

Move htest/ files under the test/ tree

htest/data becomes test/data/htools (basically reverting commit
8feabc89), and htest/* becomes test/hs/*.

Most changes beside the rename are trivial s/…/…, with the exception
of autotools/run-in-tempdir, which needed some more changes now that...