本文整理汇总了Python中sinastorage.bucket.SCSBucket.list_buckets方法的典型用法代码示例。如果您正苦于以下问题:Python SCSBucket.list_buckets方法的具体用法?Python SCSBucket.list_buckets怎么用?Python SCSBucket.list_buckets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sinastorage.bucket.SCSBucket
的用法示例。
在下文中一共展示了SCSBucket.list_buckets方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_list_bucket
# 需要导入模块: from sinastorage.bucket import SCSBucket [as 别名]
# 或者: from sinastorage.bucket.SCSBucket import list_buckets [as 别名]
def test_list_bucket(self):
scs = SCSBucket()
bucket_gen = scs.list_buckets()
self.assertTrue(bucket_gen is not None, 'List bucket result is None')
for bucket in bucket_gen:
bucketStr = str(bucket)
self.assertTrue(bucket[0] is not None, 'bucket:%s name is None'%bucketStr)
self.assertTrue(bucket[1] is not None, 'bucket:%s CreationDate is None'%bucketStr)
示例2: listBucket
# 需要导入模块: from sinastorage.bucket import SCSBucket [as 别名]
# 或者: from sinastorage.bucket.SCSBucket import list_buckets [as 别名]
def listBucket():
Buckets = []
s = SCSBucket()
buckets_generator = s.list_buckets()
for bucket in buckets_generator:
bucketName = bucket[0]
bMeta = SCSBucket(bucketName).meta()
Buckets.append(bMeta)
return Buckets
示例3: list_bucket
# 需要导入模块: from sinastorage.bucket import SCSBucket [as 别名]
# 或者: from sinastorage.bucket.SCSBucket import list_buckets [as 别名]
def list_bucket():
s = SCSBucket()
buckets_generator = s.list_buckets()
for bucket in buckets_generator:
print bucket