We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1796cf commit f1870acCopy full SHA for f1870ac
kafka/admin/acl_resource.py
@@ -1,5 +1,4 @@
1
from __future__ import absolute_import
2
-from kafka.errors import IllegalArgumentError
3
4
# enum in stdlib as of py3.4
5
try:
@@ -8,6 +7,9 @@
8
7
# vendored backport module
9
from kafka.vendor.enum34 import IntEnum
10
+from kafka.errors import IllegalArgumentError
11
+from kafka.util import from_32_bit_field
12
+
13
14
class ResourceType(IntEnum):
15
"""Type of kafka resource to set ACL for
@@ -247,3 +249,7 @@ def validate(self):
247
249
raise IllegalArgumentError(
248
250
"pattern_type cannot be {} on a concrete ResourcePattern".format(self.pattern_type.name)
251
)
252
253
254
+def valid_acl_operations(int_val):
255
+ return set([ACLOperation(v) for v in from_32_bit_field(int_val) if v not in (0, 1, 2)])
0 commit comments