Add simple Ip4Address/Ip4Network types
authorIustin Pop <iustin@google.com>
Mon, 11 Mar 2013 11:50:38 +0000 (12:50 +0100)
committerIustin Pop <iustin@google.com>
Tue, 12 Mar 2013 16:16:03 +0000 (17:16 +0100)
commit3a991f2db78b8dcbb7538527f4d45a5f21d9957e
tree760f260a1a81abd219c394f9b6628771dff74241
parentb1b4a26b3f6f84c95bb1227d60ebe048c4141ab5
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
the way). Currently the only operation supported is 'get next IP
address', which is enough for us.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
src/Ganeti/Objects.hs
test/hs/Test/Ganeti/Objects.hs
test/hs/Test/Ganeti/TestCommon.hs