Changeset 10611 in genesis


Ignore:
Timestamp:
Apr 29, 2012, 5:49:38 PM (13 years ago)
Author:
rick
Message:

Printing FQDN is usefull when processing in scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10599 r10611  
    12761276        store_yaml(datadump)
    12771277    elif sys.argv[1] == "list":
     1278      use_fqdn = False
    12781279      if len(sys.argv) < 4 or not sys.argv[2] in ["up", "down", "planned", "all"]:
    12791280        usage()
     
    12861287      else:
    12871288        usage()
     1289      if len(sys.argv) > 4:
     1290        if sys.argv[4] == "fqdn":
     1291          use_fqdn = True
     1292        else:
     1293          usage()
     1294
    12881295      for system in systems:
    12891296       datadump = get_yaml(system)
     1297
     1298       output = datadump['autogen_fqdn'] if use_fqdn else system
    12901299       if sys.argv[2] == "all":
    1291          print system
     1300         print output
    12921301       elif datadump['status'] == sys.argv[2]:
    1293          print system
     1302         print output
    12941303    elif sys.argv[1] == "create":
    12951304      if sys.argv[2] == "network.kml":
Note: See TracChangeset for help on using the changeset viewer.