Changeset 8298 in genesis


Ignore:
Timestamp:
Aug 10, 2010, 1:58:59 PM (14 years ago)
Author:
rick
Message:

Allow datadump to be inserted as well, for speedup purposes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/gformat.py

    r8297 r8298  
    352352
    353353
    354 def generate_config(node, config):
     354def generate_config(node, config, datadump=None):
    355355  """ Print configuration file 'config' of 'node' """
    356356  output = ""
    357357  try:
    358358    # Load config file
    359     datadump = get_yaml(node)
     359    if datadump == None:
     360      datadump = get_yaml(node)
    360361   
    361362    # Preformat certain needed variables for formatting and push those into special object
     
    470471        if not os.path.isdir(items['wdir']):
    471472          os.makedirs(items['wdir'])
     473        datadump = get_yaml(node)
    472474        for config in files:
    473475          items['config'] = config
    474476          print "## Generating %(node)s %(config)s" % items
    475477          f = open("%(wdir)s/%(config)s" % items, "w")
    476           f.write(generate_config(node, config))
     478          f.write(generate_config(node, config, datadump))
    477479          f.close()
    478480    else:
Note: See TracChangeset for help on using the changeset viewer.