Changeset 13279 in genesis


Ignore:
Timestamp:
Jun 13, 2015, 7:48:44 PM (7 years ago)
Author:
rick
Message:

Fix listing of systems for CLI purposes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13278 r13279  
    174174      'autogen_revision' : 'NOTFOUND',
    175175      'autogen_gfile' : gfile,
     176      'service_proxy_ileiden' : False,
    176177    }
    177178    f = open(gfile, 'r')
     
    184185      defaults = {
    185186        'service_proxy_normal' : False,
    186         'service_proxy_ileiden' : False,
    187187        'service_accesspoint' : True,
    188188        'service_incoming_rdr' : False,
     
    20272027    elif sys.argv[1] == "list":
    20282028      use_fqdn = False
    2029       if len(sys.argv) < 4 or not sys.argv[2] in ["up", "down", "planned", "all"]:
     2029      if len(sys.argv) < 4:
    20302030        usage()
    2031       if sys.argv[3] == "nodes":
    2032         systems = get_nodelist()
    2033       elif sys.argv[3] == "proxies":
    2034         systems = get_proxylist()
    2035       elif sys.argv[3] == "systems":
    2036         systems = get_hostlist()
    2037       else:
     2031      if not sys.argv[2] in ["up", "down", "planned", "all"]:
    20382032        usage()
     2033      if not sys.argv[3] in ["nodes","proxies","systems"]:
     2034        usage()
     2035
    20392036      if len(sys.argv) > 4:
    20402037        if sys.argv[4] == "fqdn":
     
    20432040          usage()
    20442041
    2045       for system in systems:
     2042      for system in get_hostlist():
    20462043       datadump = get_yaml(system)
     2044       if sys.argv[3] == 'proxies' and not datadump['service_proxy_ileiden']:
     2045         continue
    20472046
    20482047       output = datadump['autogen_fqdn'] if use_fqdn else system
Note: See TracChangeset for help on using the changeset viewer.