From e783bf9dc498c9a2ad364d1df1e0d6f353e450f8 Mon Sep 17 00:00:00 2001 From: Ali Masarwa Date: Tue, 18 Apr 2023 14:49:55 +0300 Subject: [PATCH] RGW: notification | hide auto generated topics when listing topics Signed-off-by: Ali Masarwa (cherry picked from commit 1186c477fbafc2e96d903e73349deebbd0b94ab7) --- src/rgw/rgw_pubsub.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_pubsub.cc b/src/rgw/rgw_pubsub.cc index 6ebd87e3fe434..f00a6a1de860e 100644 --- a/src/rgw/rgw_pubsub.cc +++ b/src/rgw/rgw_pubsub.cc @@ -359,7 +359,10 @@ void rgw_pubsub_topics::dump(Formatter *f) const { Formatter::ArraySection s(*f, "topics"); for (auto& t : topics) { - encode_json(t.first.c_str(), t.second, f); + auto& topic = t.second; + if (topic.name == topic.dest.arn_topic) { + encode_json(t.first.c_str(), topic, f); + } } } -- 2.39.5