Skip to content

Commit

Permalink
tests/admin: added support to query topic partitions
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit 000fdbf)
  • Loading branch information
mmaslankaprv authored and Michal Maslanka committed Jul 20, 2023
1 parent 694c10f commit df45c4d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/rptest/services/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,16 @@ def get_partitions(self,
information like replica set assignments with core affinities.
"""
assert (topic is None and partition is None) or \
(topic is not None and partition is not None)
assert topic or namespace is None
(topic is not None)

namespace = namespace or "kafka"
path = "partitions"
if topic:
path = f"{path}/{namespace}/{topic}/{partition}"
path = f"{path}/{namespace}/{topic}"

if partition is not None:
path = f"{path}/{partition}"

return self._request('get', path, node=node).json()

def get_transactions(self, topic, partition, namespace, node=None):
Expand Down

0 comments on commit df45c4d

Please sign in to comment.