Statistics
| Branch: | Tag: | Revision:

root / test / hs @ da5f09ef

# Date Author Comment
da5f09ef 03/27/2013 12:46 pm Bernardo Dal Seno

Refactor ispecs in ipolicy structures

Minimum and maximum instance specs are put together into a single element
of the instance policy. This is in preparation for introducing multiple
min/max specs.

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

c270ee07 03/21/2013 05:41 pm Helga Velroyen

gnt-cluster modify: dis/enabling storage types

This patch extends the 'gnt-cluster modify' command to manipulate the list
of enabled storage types. Note that this currenlty does no validation
with respect to whether or not there are instances currently using a storage...

f511082f 03/13/2013 02:23 pm Michele Tartara

Add Mond to the list of possible daemons

Also, add its logfiles and extra log files.

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

147fd319 03/12/2013 06:16 pm Iustin Pop

Expand TestHelper to allow non-underscore prefixes

HLint 1.8.28 requires us to always add "ignore CamelCase", which can
be problematic sometimes (e.g. when using OverloadedStrings). Let's
expand TestHelper to also support less-standard 'caseFooBar' names, so...

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

Change to CamelCase format in Test/Ganeti/Objects.hs

This is in preparation for using OverloadedString extensions in this
file, which conflicts with hlint 1.8.28's handling of annotations.

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

3a991f2d 03/12/2013 06:16 pm Iustin Pop

Add simple Ip4Address/Ip4Network types

This patch adds some very simple IPv4 address/network types, and uses
them in the 'Network' config object.

We need these in order to properly compute the reserved IP addresses,
without depending on an external library (which I haven't found, by...

9b154e2b 03/05/2013 06:15 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Update required pylint version
    Constants.hs.in: improve Haddock markup in the template
    convert-constants: generate better Haddock markup
    Expand Haddock to run over test files as well

Conflicts:
Makefile.am (curl changes and new hs directories)...

7ddd8e4c 03/05/2013 05:53 pm Iustin Pop

Expand Haddock to run over test files as well

This patch does multiple enhancements to the way we build the Haddock
docs, motivated by the fact that if we don't run Haddock over test
files as well, bad formatting can be submitted and will accumulate
over time (without any checks)....

491d02ca 03/05/2013 01:56 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    Add export lists for files which didn't have them
    Fix Haskell compatibility tests with disabled file storage
    Fix QA with disabled file storage
    Fix convert-constants handling of booleans
    Fix handling of disabled (shared) file storage...
c56dd17b 03/05/2013 11:03 am Iustin Pop

Switch LispConfig double comparison to relative error

This further improves the comparison for "non-trivial"
numbers. Without this patch, there are still cases where the absolute
error is too big, and we need to switch to relative error.

Concept has been taken from...

1fe0e999 03/04/2013 06:39 pm Iustin Pop

Make the XmParser config test runtime more consistent

Currently, the test uses a frequency of 5 string/5 double/1 list for
generating Arbitrary instances of ListConfig. However, the list case
has simply a "choose (1, 20)" `vectorOf` arbitrary, which means it...

a7e76dc3 03/04/2013 06:39 pm Iustin Pop

Improve output of the XmParser config test

Currently, this tests and its helper function 'isAlmostEqual' uses
plain booleans to signify failures, which means you can't really debug
a failed test. The patch changes the call chain to use annotated
properties all through, which results in messages like:...

91c1a265 03/04/2013 06:10 pm Iustin Pop

Fix node partial name matching in Haskell code

This implements QffHostname and fixes the node listing (as well as
export listing when filtering on node name).

This bug was hidden by the fact that node listing with "gnt-node list
aa" works if you don't have live queries (as it was originally), as...

e7124835 03/04/2013 06:09 pm Iustin Pop

Fix bug in group queries related to node/instance fields

Since we use the primitive string type for group UUIDs, the group
fields have a bug where we pass the group name as filter for node
tests, whereas the nodes themselves use the group UUID. This results...

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

dde85e1e 03/04/2013 05:59 pm Iustin Pop

Add export lists for files which didn't have them

Two test helper files didn't have export lists (lost during the split
of tests). This patch finally reintroduces them, to hopefully make the
export list saner and with fewer changes for purely-internal changes....

3cbd5808 03/04/2013 05:18 pm Iustin Pop

Fix Haskell compatibility tests with disabled file storage

When file storage is disabled at ./configure time, we shouldn't pass
opcodes containing DTFile/DTSharedFile/StorageFile to Python for
validation, as they will fail.

This patch implements this by simply tweaking the Arbitrary instances...

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

a81ca843 02/12/2013 03:47 pm Iustin Pop

Enable use of the priority option in hbal

This patch adds the option to hbal, and uses it to tweak the submitted
jobs. There are also two small shelltests for testing the parsing.

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

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

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

Support instance-minor pairing in the DRBD collector

This commits enables the DRBD data collector to use the Confd client to
gather information about the pairing between DRBD minors and instances.

For testing purposes, the DRBD data collector now requires either zero...

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

3e16567e 12/27/2012 03:34 pm Iustin Pop

Rename test/hs/test to htest

The current base name of 'test' means that this binary will generate
profiling, coverage, etc. files with the name 'test.*', result in
tab-completion conflicts with the test directory. Let's slightly
change its base name for typing easiness....

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