def update(self):
        """Update CPU stats using the input method."""

        # Grab stats into self.stats
        if self.input_method == 'local':
            stats = self.update_local()
        elif self.input_method == 'snmp':
            stats = self.update_snmp()
        else:
            stats = self.get_init_value()

        # Update the stats
        self.stats = stats

        return self.stats
def update ( self ) : if self . input_method == 'local' : stats = self . update_local ( ) elif self . input_method == 'snmp' : stats = self . update_snmp ( ) else : stats = self . get_init_value ( ) self . stats = stats return self . stats
Update CPU stats using the input method.