(self, disk_xml=None)
Collector and publish not zeroed disk metrics
Collector and publish not zeroed disk metrics
Collector and publish not zeroed disk metrics
def zero_disk(self, disk_xml=None):
        """ Collector and publish not zeroed disk metrics
        """

        troubled_disks = 0
        for filer_disk in disk_xml:
            raid_state = filer_disk.find('raid-state').text
            if not raid_state == 'spare':
                continue
            is_zeroed = filer_disk.find('is-zeroed').text

            if is_zeroed == 'false':
                troubled_disks += 1
        self.push('not_zeroed', 'disk', troubled_disks)
def zero_disk ( self , disk_xml = None ) : troubled_disks = 0 for filer_disk in disk_xml : raid_state = filer_disk . find ( 'raid-state' ) . text if not raid_state == 'spare' : continue is_zeroed = filer_disk . find ( 'is-zeroed' ) . text if is_zeroed == 'false' : troubled_disks += 1 self . push ( 'not_zeroed' , 'disk' , troubled_disks )