Changeset 9589 in genesis


Ignore:
Timestamp:
Aug 28, 2011, 11:33:05 AM (13 years ago)
Author:
rick
Message:

Quick used for exporting data to other systems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r9514 r9589  
    687687\tdns [outputdir]              =  Generate BIND compliant zone files in dns.
    688688\tstandalone                   =  Run configurator webserver [default port=8000]
     689\twind-export                  =  Generate SQL import scripts for WIND database
     690\tfull-export                  =  Generate yaml export script for heatmap.
    689691\tstatic                       =  Generate all config files and store on disk
    690692\t                                with format ./static/%%NODE%%/%%FILE%%
     
    781783              '%(ssid)s', 'IEEE 802.11b', %(channel)s, 'active');""" % ifacedump
    782784            print sql
     785    elif sys.argv[1] == "full-export":
     786      hosts = {}
     787      for node in get_hostlist():
     788        datadump = get_yaml(node)
     789        hosts[datadump['nodename']] = datadump
     790      print yaml.dump(hosts)
     791
    783792    elif sys.argv[1] == "dns":
    784793      make_dns(sys.argv[2] if len(sys.argv) > 2 else 'dns')
Note: See TracChangeset for help on using the changeset viewer.