Commit c1b42c18 authored by Guido Trotter's avatar Guido Trotter
Browse files

Upgrade be/hv params with default values

From time to time we're adding new be or hv parameters. With this patch
missing parameters get set to the default value when loading the cluster
object. This patch version also considers the case when hv/be params
don't exist at all, and fixes a broken unit test triggered in that
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent b86a6bcd
......@@ -742,6 +742,20 @@ class Cluster(TaggableObject):
"""Fill defaults for missing configuration values.
if self.hvparams is None:
self.hvparams = constants.HVC_DEFAULTS
for hypervisor in self.hvparams:
self.hvparams[hypervisor] = self.FillDict(
constants.HVC_DEFAULTS[hypervisor], self.hvparams[hypervisor])
if self.beparams is None:
self.beparams = {constants.BEGR_DEFAULT: constants.BEC_DEFAULTS}
for begroup in self.beparams:
self.beparams[begroup] = self.FillDict(constants.BEC_DEFAULTS,
if self.modify_etc_hosts is None:
self.modify_etc_hosts = True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment