+ def UpgradeConfig(self):
+ """Fill defaults for missing configuration values.
+
+ """
+ if self.ndparams is None:
+ self.ndparams = {}
+
+ def FillND(self, node):
+ """Return filled out ndparams for L{object.Node}
+
+ @type node: L{objects.Node}
+ @param node: A Node object to fill
+ @return a copy of the node's ndparams with defaults filled
+
+ """
+ return self.SimpleFillND(node.ndparams)
+
+ def SimpleFillND(self, ndparams):
+ """Fill a given ndparams dict with defaults.
+
+ @type ndparams: dict
+ @param ndparams: the dict to fill
+ @rtype: dict
+ @return: a copy of the passed in ndparams with missing keys filled
+ from the cluster defaults
+
+ """
+ return FillDict(self.ndparams, ndparams)
+