'Create the ping data request'

def _assemblePingRequest(self):

    try:
        if (self.hostState is None):
            return None
        req = {'key': self.settings.mms_key, 'hosts': self.hostState}
        req['agentVersion'] = self.agentVersion
        req['agentHostname'] = self.agentHostname
        req['pythonVersion'] = self.pythonVersion
        req['pymongoVersion'] = self.pymongoVersion
        req['pymongoHasC'] = self.pymongoHasC
        req['agentSessionKey'] = self.sessionKey
        req['srcVersion'] = self.srcVersion
        req['dataFormat'] = 1
        req['disableProfileDataCollection'] = self.disableProfileDataCollection
        req['disableGetLogsDataCollection'] = self.disableGetLogsDataCollection
        return bson.BSON.encode(req, check_keys=False)
    finally:
        del self.hostState
        self.hostState = {}
