Revision 82989b8d tools/cfgupgrade
b/tools/cfgupgrade | ||
---|---|---|
94 | 94 |
" the master node", ssconf_master_node, hostname) |
95 | 95 |
return False |
96 | 96 |
|
97 |
def UpgradeNetworks(config_data): |
|
98 |
networks = config_data.get("networks", None) |
|
99 |
if not networks: |
|
100 |
config_data["networks"] = {} |
|
101 |
|
|
102 |
|
|
103 |
def UpgradeGroups(config_data): |
|
104 |
nicparams = config_data["cluster"]["nicparams"]["default"] |
|
105 |
for group in config_data["nodegroups"].values(): |
|
106 |
networks = group.get("networks", None) |
|
107 |
if not networks: |
|
108 |
group["networks"] = {} |
|
109 |
|
|
97 | 110 |
|
98 | 111 |
def main(): |
99 | 112 |
"""Main program. |
... | ... | |
237 | 250 |
if not options.dry_run: |
238 | 251 |
utils.RemoveFile(options.WATCHER_STATEFILE) |
239 | 252 |
|
253 |
UpgradeNetworks(config_data) |
|
254 |
UpgradeGroups(config_data) |
|
255 |
|
|
240 | 256 |
try: |
241 | 257 |
logging.info("Writing configuration file to %s", options.CONFIG_DATA_PATH) |
242 | 258 |
utils.WriteFile(file_name=options.CONFIG_DATA_PATH, |
Also available in: Unified diff