owner = rgw_account_id{account_id};
}
- formatter->open_object_section("result");
rgw_pubsub_topics result;
if (rgw::all_zonegroups_support(*site, rgw::zone_features::notification_v2) &&
driver->stat_topics_v1(tenant, null_yield, dpp()) == -ENOENT) {
encode_json("marker", next_token, formatter.get());
}
}
- formatter->close_section(); // result
formatter->flush(cout);
}
if tenant == '':
topics_result = admin(['topic', 'list'], cluster)
topics_json = json.loads(topics_result[0])
- if 'topics' not in topics_json:
- topics_json = topics_json.get('result',{})
- for topic in topics_json['topics']:
+ for topic in topics_json:
rm_result = admin(['topic', 'rm', '--topic', topic['name']], cluster)
print(rm_result)
else:
topics_result = admin(['topic', 'list', '--tenant', tenant], cluster)
topics_json = json.loads(topics_result[0])
- if 'topics' not in topics_json:
- topics_json = topics_json.get('result',{})
- for topic in topics_json['topics']:
+ for topic in topics_json:
rm_result = admin(['topic', 'rm', '--tenant', tenant, '--topic', topic['name']], cluster)
print(rm_result)
result = admin(['topic', 'list', '--tenant', tenant], get_config_cluster())
parsed_result = json.loads(result[0])
if assert_len:
- assert_equal(len(parsed_result['topics']), assert_len)
+ assert_equal(len(parsed_result), assert_len)
return parsed_result
assert_equal(status / 100, 2)
# verify both buckets are subscribed to the topic
rgw_topic_entry = [
- t for t in list_topics()["topics"] if t["name"] == topic_name
+ t for t in list_topics() if t["name"] == topic_name
]
assert_equal(len(rgw_topic_entry), 1)
subscribed_buckets = rgw_topic_entry[0]["subscribed_buckets"]
# verify subscriptions to the account topic
rgw_topic_entry = [
t
- for t in list_topics(tenant=account_id)["topics"]
+ for t in list_topics(tenant=account_id)
if t["name"] == topic_name
]
assert_equal(len(rgw_topic_entry), 1)
# now verify account topic serves both buckets
rgw_topic_entry = [
t
- for t in list_topics(tenant=account_id)["topics"]
+ for t in list_topics(tenant=account_id)
if t["name"] == topic_name
]
assert_equal(len(rgw_topic_entry), 1)