Show
Ignore:
Timestamp:
02/02/09 18:22:50 (3 years ago)
Author:
Frederic Lepied <frederic.lepied@…>
Children:
853b6ff09487cd6805e4ae5a5956b0cbcd28359d
Parents:
eef6ba64af41427ff42b23488371082cf44cfc83
git-committer:
Frederic Lepied <frederic.lepied@…> (02/02/09 18:22:50)
Message:

display next boot and history

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pxe/dpysystem

    r693511a r2c8d924  
    2222    error('System %s not defined' % sys.argv[1]) 
    2323 
    24 print system.name 
     24print 'Name:', system.name 
     25 
    2526for mac in MacAddress.objects.filter(system=system): 
     27    print 'Mac:', 
    2628    for i in range(0, 10, 2): 
    2729        sys.stdout.write('%s:' % mac.mac[i:i+2]) 
    2830    sys.stdout.write('%s\n' % mac.mac[10:12]) 
     31 
     32logs = Log.objects.filter(system=system).order_by('-date') 
     33if len(logs) >= 1: 
     34    print 'Next boot:', logs[0].boot_name.name 
     35 
     36print 'History:' 
     37for l in logs[1:]: 
     38    print l.date, l.boot_name.name 
    2939     
    3040# addsystem ends here