in source/CRRdeployagent/CRRdeployagent.py [0:0]
def get_replica_buckets(client):
print('List Replica Buckets:')
try:
list_buckets = client.list_buckets()['Buckets']
replica_buckets = []
for i in list_buckets:
bucket_response = get_bucket_replication(i['Name'], client)
if 'ReplicationConfigurationError-' != bucket_response \
and bucket_response['ReplicationConfiguration']['Rules'][0]['Status'] != 'Disabled':
source_buckets.append(i['Name'])
dest_bucket_arn = bucket_response['ReplicationConfiguration']['Rules'][0]['Destination']['Bucket']
replica_buckets.append(dest_bucket_arn.split(':', 5)[5])
except Exception as e:
print(e)
raise e
return replica_buckets