def print_xen_object(obj_type, obj, indent_level=0, spaces_per_indent=4):
 if (not CONF.verbose):
  return
 uuid = obj['uuid']
 try:
  name_label = obj['name_label']
 except KeyError:
  name_label = ''
 msg = ("%s (%s) '%s'" % (obj_type, uuid, name_label))
 indent = ((' ' * spaces_per_indent) * indent_level)
 print ''.join([indent, msg])

def print_xen_object ( obj_type , obj , indent_level = 0 , spaces_per_indent = 4 ) : if ( not CONF . verbose ) : return uuid = obj [ 'uuid' ] try : name_label = obj [ 'name_label' ] except KeyError : name_label = '' msg = ( "%s (%s) '%s'" % ( obj_type , uuid , name_label ) ) indent = ( ( ' ' * spaces_per_indent ) * indent_level ) print '' . join ( [ indent , msg ] )
pretty-print a xen object .