usr/src/cmd/installadm/list.py
changeset 862 e9f31f2f2f2d
parent 754 0eeb7b2fa05a
child 906 1293ecd7e911
equal deleted inserted replaced
861:ccd399d2c6f7 862:e9f31f2f2f2d
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 # Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
    22 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
    23 # Use is subject to license terms.
    23 #
    24 """
    24 """
    25 
    25 
    26 A/I List Services
    26 A/I List Services
    27 
    27 
    28 """
    28 """
   822         """
   822         """
   823         tdict = {'arch':'', 'mem':'', 'ipv4':'', 'mac':'', 
   823         tdict = {'arch':'', 'mem':'', 'ipv4':'', 'mac':'', 
   824                     'platform':'', 'network':'', 'cpu':''}
   824                     'platform':'', 'network':'', 'cpu':''}
   825         twidth = 0
   825         twidth = 0
   826         for key in mancriteria.keys():
   826         for key in mancriteria.keys():
   827             if not mancriteria[key] or mancriteria[key] == '':
   827             if mancriteria[key] is None or mancriteria[key] == '':
   828                 continue # no criteria for instance key
   828                 continue # no criteria for instance key
   829             twidth = max(twidth, len(key.lstrip('MAX').lstrip('MIN')))
   829             twidth = max(twidth, len(key.lstrip('MAX').lstrip('MIN')))
   830             svalue = AIdb.formatValue(key, mancriteria[key])
   830             svalue = AIdb.formatValue(key, mancriteria[key])
   831             if key.find('MAX') == 0 or key.find('MIN') == 0:
   831             if key.find('MAX') == 0 or key.find('MIN') == 0:
   832                 tkey = key[3:] # strip off the MAX or MIN for a new keyname
   832                 tkey = key[3:] # strip off the MAX or MIN for a new keyname