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

Cluster: add nicparams, and update them on upgrade



This also migrates the default bridge from the cluster object to the nic
params, at load time. Since we don't support changing the default bridge
after cluster init, this is ok for now. In the future we'll make
gnt-cluster init --bridge to the right thing, after the nic parameter
implementation is finished.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 255e19d4
......@@ -784,6 +784,7 @@ class Cluster(TaggableObject):
"enabled_hypervisors",
"hvparams",
"beparams",
"nicparams",
"candidate_pool_size",
"modify_etc_hosts",
]
......@@ -801,6 +802,12 @@ class Cluster(TaggableObject):
self.beparams = UpgradeGroupedParams(self.beparams,
constants.BEC_DEFAULTS)
migrate_default_bridge = not self.nicparams
self.nicparams = UpgradeGroupedParams(self.nicparams,
constants.NICC_DEFAULTS)
if migrate_default_bridge:
self.nicparams[constants.PP_DEFAULT][constants.NIC_LINK] = \
self.default_bridge
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