source: people/peter.buschman/backup_monitoring/parsing/parsers/vmquery/test.py@ 976

Last change on this file since 976 was 976, checked in by peter, on Dec 6, 2011 at 10:19:33 AM

Raw checkin of current NetBackup / TSM parsing code.

File size: 519 bytes
Line 
1
2import sys
3import time
4
5from backup_monitoring.parsing.parsers import vmquery as parser
6
7file = open('test.txt', 'r')
8
9stream = parser.stream(file)
10
11i = 0
12
13for record in stream:
14
15 i += 1
16
17 print i
18
19 #print record
20
21 try:
22
23 instance = parser.parse(record)
24
25 #for key, value in instance.items():
26 # print '[%s] = [%s]' % (key, value)
27
28 except:
29
30 for line in record:
31
32 print line
33
34 sys.exit(1)
35
36# time.sleep(5)
37
38file.close()
Note: See TracBrowser for help on using the repository browser.