forked from TrueCloudLab/s3-tests
dho-qa: Verify multiple buckets
Updates client verification tool to accept multiple bucket names on the command line and dump information for each in case we need to test different buckets.
This commit is contained in:
parent
ebef1e5a0c
commit
d9f3324b5e
1 changed files with 19 additions and 18 deletions
|
@ -54,27 +54,28 @@ def main():
|
|||
else:
|
||||
OUTFILE = sys.stdout
|
||||
|
||||
try:
|
||||
bucket = conn.get_bucket(args[0])
|
||||
except S3ResponseError as e:
|
||||
print >> sys.stderr, "S3 claims %s isn't a valid bucket...maybe the user you specified in config.yml doesn't have access to it?" %args[0]
|
||||
common.teardown()
|
||||
return
|
||||
for bucket_name in args:
|
||||
try:
|
||||
bucket = conn.get_bucket(bucket_name)
|
||||
except S3ResponseError as e:
|
||||
print >> sys.stderr, "S3 claims %s isn't a valid bucket...maybe the user you specified in config.yml doesn't have access to it?" %bucket_name
|
||||
common.teardown()
|
||||
return
|
||||
|
||||
(name, grants) = get_bucket_properties(bucket)
|
||||
print >> OUTFILE, "Bucket Name: %s" % name
|
||||
for grant in grants:
|
||||
print >> OUTFILE, "\tgrant %s %s" %(grant)
|
||||
|
||||
for key in bucket.list():
|
||||
full_key = bucket.get_key(key.name)
|
||||
(name, size, grants, metadata) = get_key_properties(full_key)
|
||||
print >> OUTFILE, name
|
||||
print >> OUTFILE, "\tsize: %s" %size
|
||||
(name, grants) = get_bucket_properties(bucket)
|
||||
print >> OUTFILE, "Bucket Name: %s" % name
|
||||
for grant in grants:
|
||||
print >> OUTFILE, "\tgrant %s %s" %(grant)
|
||||
for metadata_key in metadata:
|
||||
print >> OUTFILE, "\tmetadata %s: %s" %(metadata_key, metadata[metadata_key])
|
||||
|
||||
for key in bucket.list():
|
||||
full_key = bucket.get_key(key.name)
|
||||
(name, size, grants, metadata) = get_key_properties(full_key)
|
||||
print >> OUTFILE, name
|
||||
print >> OUTFILE, "\tsize: %s" %size
|
||||
for grant in grants:
|
||||
print >> OUTFILE, "\tgrant %s %s" %(grant)
|
||||
for metadata_key in metadata:
|
||||
print >> OUTFILE, "\tmetadata %s: %s" %(metadata_key, metadata[metadata_key])
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue