(self, request, check_id)
return
Creates a check for the given check_id. If the check_id already
        exists, then it updates that check.
        TBD: Include error 400 and 500s. Module cannot be updated (test
            against noit service to see the response code expected)
Creates a check for the given check_id. If the check_id already
        exists, then it updates that check.
        TBD: Include error 400 and 500s. Module cannot be updated (test
            against noit service to see the response code expected)
Creates a check for the given check_id . If the check_id already exists then it updates that check . TBD : Include error 400 and 500s . Module cannot be updated ( test against noit service to see the response code expected )
def set_check(self, request, check_id):
        """
        Creates a check for the given check_id. If the check_id already
        exists, then it updates that check.
        TBD: Include error 400 and 500s. Module cannot be updated (test
            against noit service to see the response code expected)
        """
        try:
            UUID(check_id)
        except (ValueError, AttributeError):
            request.setResponseCode(500)
            return
        request.setHeader(b"content-type", b"application/xml")
        response = self.validate_check_payload(request)
        request.setResponseCode(response[0])
        if (response[0] == 200):
            response_body = create_check(response[1], check_id)
            return xmltodict.unparse(response_body)
        return
def set_check ( self , request , check_id ) : try : UUID ( check_id ) except ( ValueError , AttributeError ) : request . setResponseCode ( 500 ) return request . setHeader ( b"content-type" , b"application/xml" ) response = self . validate_check_payload ( request ) request . setResponseCode ( response [ 0 ] ) if ( response [ 0 ] == 200 ) : response_body = create_check ( response [ 1 ] , check_id ) return xmltodict . unparse ( response_body ) return