def get_source_buckets()

in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py [0:0]


def get_source_buckets():
    print('List Buckets:')
    try:
        list_buckets = client['s3']['handle'].list_buckets()['Buckets']
        source_bucket_list = []
        for i in list_buckets:
            bucket_response = get_bucket_replication(i['Name'])
            if 'ReplicationConfigurationError-' != bucket_response \
                    and bucket_response['ReplicationConfiguration']['Rules'][0]['Status'] != 'Disabled':
                source_bucket_list.append(i['Name'])
    except Exception as e:
        print(e)
        raise e
    return source_bucket_list