Changeset 372
- Timestamp:
- 06/13/07 13:01:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jobarchived/jobarchived.py
r371 r372 584 584 if name == 'CLUSTER': 585 585 586 self.clustername = attrs.get( 'NAME', "")586 self.clustername = str( attrs.get( 'NAME', "" ) ) 587 587 588 588 elif name == 'METRIC' and self.clustername in ARCHIVE_DATASOURCES: 589 589 590 metricname = attrs.get( 'NAME', "")590 metricname = str( attrs.get( 'NAME', "" ) ) 591 591 592 592 if metricname == 'MONARCH-HEARTBEAT': 593 self.heartbeat = attrs.get( 'VAL', "")593 self.heartbeat = str( attrs.get( 'VAL', "" ) ) 594 594 595 595 elif metricname.find( 'MONARCH-JOB' ) != -1: 596 596 597 597 job_id = metricname.split( 'MONARCH-JOB-' )[1].split( '-' )[0] 598 val = attrs.get( 'VAL', "")598 val = str( attrs.get( 'VAL', "" ) ) 599 599 600 600 if not job_id in self.jobs_processed: … … 777 777 if name == 'GANGLIA_XML': 778 778 779 self.XMLSource = attrs.get( 'SOURCE', "")780 self.gangliaVersion = attrs.get( 'VERSION', "")779 self.XMLSource = str( attrs.get( 'SOURCE', "" ) ) 780 self.gangliaVersion = str( attrs.get( 'VERSION', "" ) ) 781 781 782 782 debug_msg( 10, 'Found XML data: source %s version %s' %( self.XMLSource, self.gangliaVersion ) ) … … 784 784 elif name == 'GRID': 785 785 786 self.gridName = attrs.get( 'NAME', "")787 self.time = attrs.get( 'LOCALTIME', "")786 self.gridName = str( attrs.get( 'NAME', "" ) ) 787 self.time = str( attrs.get( 'LOCALTIME', "" ) ) 788 788 789 789 debug_msg( 10, '`-Grid found: %s' %( self.gridName ) ) … … 791 791 elif name == 'CLUSTER': 792 792 793 self.clusterName = attrs.get( 'NAME', "")794 self.time = attrs.get( 'LOCALTIME', "")793 self.clusterName = str( attrs.get( 'NAME', "" ) ) 794 self.time = str( attrs.get( 'LOCALTIME', "" ) ) 795 795 796 796 if not self.clusters.has_key( self.clusterName ) and self.clusterName in ARCHIVE_DATASOURCES: … … 802 802 elif name == 'HOST' and self.clusterName in ARCHIVE_DATASOURCES: 803 803 804 self.hostName = attrs.get( 'NAME', "")805 self.hostIp = attrs.get( 'IP', "")806 self.hostReported = attrs.get( 'REPORTED', "")804 self.hostName = str( attrs.get( 'NAME', "" ) ) 805 self.hostIp = str( attrs.get( 'IP', "" ) ) 806 self.hostReported = str( attrs.get( 'REPORTED', "" ) ) 807 807 808 808 debug_msg( 10, ' | |-Host found: %s - ip %s reported %s' %( self.hostName, self.hostIp, self.hostReported ) ) … … 810 810 elif name == 'METRIC' and self.clusterName in ARCHIVE_DATASOURCES: 811 811 812 type = attrs.get( 'TYPE', "")812 type = str( attrs.get( 'TYPE', "" ) ) 813 813 814 814 exclude_metric = False … … 816 816 for ex_metricstr in ARCHIVE_EXCLUDE_METRICS: 817 817 818 orig_name = attrs.get( 'NAME', "" )818 orig_name = str( attrs.get( 'NAME', "" ) ) 819 819 820 820 if string.lower( orig_name ) == string.lower( ex_metricstr ): … … 829 829 830 830 myMetric = { } 831 myMetric['name'] = attrs.get( 'NAME', "")832 myMetric['val'] = attrs.get( 'VAL', "")831 myMetric['name'] = str( attrs.get( 'NAME', "" ) ) 832 myMetric['val'] = str( attrs.get( 'VAL', "" ) ) 833 833 myMetric['time'] = self.hostReported 834 834
Note: See TracChangeset
for help on using the changeset viewer.