From e3e96ff7d06526c8bb5b10d943b97f66f3eece57 Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Fri, 11 Oct 2024 01:29:09 +0530 Subject: [PATCH] Added Transactional ID Resource Type for ACL operations (#1834) --------- Co-authored-by: John "Preston" Mille --- src/confluent_kafka/admin/__init__.py | 1 + src/confluent_kafka/admin/_resource.py | 1 + src/confluent_kafka/src/AdminTypes.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/confluent_kafka/admin/__init__.py b/src/confluent_kafka/admin/__init__.py index 35b3ea719..4d16cd539 100644 --- a/src/confluent_kafka/admin/__init__.py +++ b/src/confluent_kafka/admin/__init__.py @@ -77,6 +77,7 @@ RESOURCE_TOPIC, RESOURCE_GROUP, RESOURCE_BROKER, + RESOURCE_TRANSACTIONAL_ID, OFFSET_INVALID) from confluent_kafka import \ diff --git a/src/confluent_kafka/admin/_resource.py b/src/confluent_kafka/admin/_resource.py index b786f3a9a..896ccddb4 100644 --- a/src/confluent_kafka/admin/_resource.py +++ b/src/confluent_kafka/admin/_resource.py @@ -25,6 +25,7 @@ class ResourceType(Enum): TOPIC = _cimpl.RESOURCE_TOPIC #: Topic resource. Resource name is topic name. GROUP = _cimpl.RESOURCE_GROUP #: Group resource. Resource name is group.id. BROKER = _cimpl.RESOURCE_BROKER #: Broker resource. Resource name is broker id. + TRANSACTIONAL_ID = _cimpl.RESOURCE_TRANSACTIONAL_ID #: Transactional ID resource. def __lt__(self, other): if self.__class__ != other.__class__: diff --git a/src/confluent_kafka/src/AdminTypes.c b/src/confluent_kafka/src/AdminTypes.c index bcb75926f..5deeded2e 100644 --- a/src/confluent_kafka/src/AdminTypes.c +++ b/src/confluent_kafka/src/AdminTypes.c @@ -524,6 +524,7 @@ static void AdminTypes_AddObjectsResourceType (PyObject *m) { PyModule_AddIntConstant(m, "RESOURCE_TOPIC", RD_KAFKA_RESOURCE_TOPIC); PyModule_AddIntConstant(m, "RESOURCE_GROUP", RD_KAFKA_RESOURCE_GROUP); PyModule_AddIntConstant(m, "RESOURCE_BROKER", RD_KAFKA_RESOURCE_BROKER); + PyModule_AddIntConstant(m, "RESOURCE_TRANSACTIONAL_ID", RD_KAFKA_RESOURCE_TRANSACTIONAL_ID); } static void AdminTypes_AddObjectsResourcePatternType (PyObject *m) {