(self, data)
Sign a dictionary of metrics to be reported to the monitoring API

        First, add the monitored receiver's UUID to the dictionary of
        metrics. Then, use the default local GPG privkey to generate a detached
        signature corresponding to the JSON-dumped version of the dictionary
        (including the UUID). Lastly, append the detached signature. The
        resulting dictionary (including both the UUID and the signature) is
        ready to be sent to the API.

        Args:
            data : Dictionary with receiver data to be reported
Sign a dictionary of metrics to be reported to the monitoring API
Sign a dictionary of metrics to be reported to the monitoring API
def sign_report(self, data):
        """Sign a dictionary of metrics to be reported to the monitoring API

        First, add the monitored receiver's UUID to the dictionary of
        metrics. Then, use the default local GPG privkey to generate a detached
        signature corresponding to the JSON-dumped version of the dictionary
        (including the UUID). Lastly, append the detached signature. The
        resulting dictionary (including both the UUID and the signature) is
        ready to be sent to the API.

        Args:
            data : Dictionary with receiver data to be reported

        """
        assert (self.registered)
        data['uuid'] = self.user_info['monitoring']['uuid']
        fingerprint = self.user_info['monitoring']['fingerprint']
        data['signature'] = str(
            self.gpg.sign(json.dumps(data),
                          fingerprint,
                          clearsign=False,
                          detach=True))
        if (data['signature'] == ''):
            logger.error('GPG signature failed')
def sign_report ( self , data ) : assert ( self . registered ) data [ 'uuid' ] = self . user_info [ 'monitoring' ] [ 'uuid' ] fingerprint = self . user_info [ 'monitoring' ] [ 'fingerprint' ] data [ 'signature' ] = str ( self . gpg . sign ( json . dumps ( data ) , fingerprint , clearsign = False , detach = True ) ) if ( data [ 'signature' ] == '' ) : logger . error ( 'GPG signature failed' )