def performGenericPatch(connection, url, payloadDict): ''' This will perform a generic PATCH method on a given url Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - url is the address of where the operation will be performed - payloadDict is the python dict with the parameters for the operation ''' data = json.dumps(payloadDict) reply = connection.httpPatch(url=url, data=data) if not reply.ok: raise Exception(reply.text) return reply