SystemCraftsman / strimzi-kafka-cli

Command Line Interface for the Strimzi Kafka Operator
Apache License 2.0
78 stars 13 forks source link

Cannot retrieve topics list in different formats #119

Open mousamdahal opened 2 months ago

mousamdahal commented 2 months ago

While checking on for retrieving the topics in JSON format, I came to know that, JSON or any other format is not available. This is because while retrieving the topics list on line no 135 von topics.py


def list(cluster, namespace):
    os.system(
        Kubectl()
        .get()
        .kafkatopics()
        .label("strimzi.io/cluster={cluster}")
        .namespace(namespace)
        .build()
        .format(cluster=cluster)
    )

On the above code the output is not included.

I need this feature for integrating this tool on the script which I am working on, so if I need to fix this than I will be open for that too.