Changeset 8298 in genesis for nodes/gformat.py
- Timestamp:
- Aug 10, 2010, 1:58:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/gformat.py
r8297 r8298 352 352 353 353 354 def generate_config(node, config ):354 def generate_config(node, config, datadump=None): 355 355 """ Print configuration file 'config' of 'node' """ 356 356 output = "" 357 357 try: 358 358 # Load config file 359 datadump = get_yaml(node) 359 if datadump == None: 360 datadump = get_yaml(node) 360 361 361 362 # Preformat certain needed variables for formatting and push those into special object … … 470 471 if not os.path.isdir(items['wdir']): 471 472 os.makedirs(items['wdir']) 473 datadump = get_yaml(node) 472 474 for config in files: 473 475 items['config'] = config 474 476 print "## Generating %(node)s %(config)s" % items 475 477 f = open("%(wdir)s/%(config)s" % items, "w") 476 f.write(generate_config(node, config ))478 f.write(generate_config(node, config, datadump)) 477 479 f.close() 478 480 else:
Note:
See TracChangeset
for help on using the changeset viewer.