History | View | Annotate | Download (4.5 kB)
objects.Cluster: add method to get hv defaults
Currently the FillHV method is the one that does the cluster hvparams +os hvparams merger. However, in some cases we need to do just this,without adding the instance hvparams on top.
This patch adds a function to compute just this (hv + os hvp...
Adding unittests for objects.Cluster.FillHV
This adds tests for the stacking of objects.Cluster.FillHV to verifythat the override is working as expected.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Ignore log messages in unittests
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
ConfigObject.ToDict() only export non-None values
The method is changed to a normal loop, to avoid calling getattr()twice. Also getstate is changed to just use ToDict() by default.
This should also make getstate work for objects which have tooverride the ToDict function because they contain other objects....