History | View | Annotate | Download (20.9 kB)
Add missing ipolicy field
This was missing so far…
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Change cluster's hypervisors type
We now have Hypervisor type in Objects, might just as well use it.
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Further hlint fixes
Commit 2cdaf22, “Re-enable standard hlint warnings”, got it almostright. The only problem is that (confusingly) the default set of hintsis not in HLint.Default, but in HLint.HLint (it includes Default andsome built-ins).
After changing the lint file to correctly include the defaults, we had...
Add entire ConfigData serialisation tests
Using the recently-added genArbitrary, we can now implement Arbitraryinstances for even "huge" objects like Cluster, so let's use that toimplement entire ConfigData serialisation tests.
Note that, as we don't have yet proper types for some of the Params...
Add unit test for serialisation of DiskLogicalId and Nodes
Since the DiskLogicalId type is manually serialised/deserialised (seeObjects.hs, `encodeDLid' and `decodeDLId'), let's add a test thatchecks that these are idempotent when combined.
Since we're at it, let's add the same test for Node serialisation,...
Move JSON.hs and Compat.hs out from under HTools/
These two files are not htools-specific, so let's move them out of theHTools subdirectory/module hierarchy and directly under Ganeti.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
One more SADT type - VType
This adds the VTYPE_* conversion to VType, used for QFT equivalencelater.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Expand THH with more functionality for parameters
This adds two related improvements to THH:
- for parameters, we declare a list with all their fields, so that Query2 can build the list of fields (e.g. for hvparams, or ndparams) automatically
- we declare a new type class for "DictObjects", i.e. objects which...
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.
Add type classes for common objects
These mirror the TaggableObject in Python, in the sense that we willbe able to define generic functions for querying such fields.
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...
Add a fillDict function
This is similar to the Python version, objects.py:FillDict.
Enable tags query over the query socket
This patch adds the tags field to the objects which were missing it(all except Cluster), implements handling the LuxiCall QueryTags, andthen enables the use of the query socket in cli.ListTags, used by allcommands, and in the RAPI client....
Add Objects definitions for the ispec/ipolicy types
Note that since we don't have yet a way to nicely handle two-leveloptional parameters, the Filled/Partial types and filling function areall manually built.
Signed-off-by: Iustin Pop <iustin@google.com>...
Improve Objects.hs definitions
This adds a few missing/incomplete definitions. We're still missingthe special parameters (disk params, hvparams, os_hvp).
Remove container field special cases
Since we now handle Containers uniformly, we can remove all traces ofthe special handling for this field type.
Expand TH with tags field
Also add this new field and the other generic fields to the clusterobject.
Add Hypervisor and start exporting AdminState
Very simple Hypervisor object, that we want to pass in some of RPCcalls is added. We also export AdminState data type, as it is usedin one of the calls that will be implemented in this patch series.
Signed-off-by: Agata Murawska <agatamurawska@google.com>...
Add disk logical ID support in Objects.hs
This is a complex field, so we have to do a lot of manual work for now.
The complexity arises from the fact that the contents of the field,and the way to parse it, depends on the disk type field, so we don'thave a single, static way of parsing it. Hence we needed the...
htools: add partial implementation of lib/objects.py
This is partial since not all object types can be easily converted fornow (will need some changes on the Python side for this).
Most importantly, the *Params types do not have a good solution now:the Python code, due to its dynamic typing, hides the fact that we...