History | View | Annotate | Download (9.1 kB)
Add more node-related data types and functions
This is a simple type declaration for NodeRole, a NdParamObject typeclass, and a few related helper functions for nodes and node groups.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Expand Objects.hs definitions
This patch adds the missing parameters in the cluster/group objects,for now as simple maps (dictionaries), without type safety. Therationale for adding them as such is:
- we need something to enable query functionality- since we don't modify the values, we don't risk introducing bugs...
Config.hs: Add a function to lookup group
Like in the python code, this is a bit more complex since groups areindexed by UUID, so we must fallback to lookup via the name (slow; butthe number of groups should be small).
Signed-off-by: Iustin Pop <iustin@google.com>...
Re-enable standard hlint warnings
Commit 5a1e31b4 (Add infrastructure for, and two extra hlint rules)was intended to add two extra hlint rules, but I didn't realise atthat time that "--hint" when first used overrides the built-inlints. As such, since then we were basically running with just those...
Improve the TH 'Container' type
This is the first part of the changes related to the 'Container' type.
We currently handle this type as follows: it's a simple type aliasover the Data.Map type, which means:
- it's easy to use the Data.Map functions to change the type...
Implement a node to drbd minors query function
This can be queried remotely since it's a pure configuration query.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Add support for computing instance all/secondary nodes
This fixes an old FIXME. Since we now how actual DRBD configurationdata, we can finally compute the instance's secondary nodes.
Implement lookup of partial names in Config.hs
This uses the recently-moved functions to implement partial lookup ofnames on getNode and getInstance, similar to the Python codebase.
htools: add a very basic lib/config.py equivalent
This only is able to load the configuration data for now.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>