s3_commandhelper.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:orca 作者: bdastur 项目源码 文件源码
def display_s3_bucket_validations_table(self, bucketlist):
        '''
        List the S3 buckets and the validation results in tabular format
        '''
        # Setup Table.
        header = ["Bucket Name", "Profile",
                  "Naming Policy", "Tag Validation",
                  "Result"]
        table = prettytable.PrettyTable(header)

        for bucket in bucketlist:
            name = bucket['Name']
            profile = bucket['profile_name'][0]
            naming_policy = bucket['validations']['nameresult']
            tag_policy = textwrap.fill(bucket['validations']['tagresult'],
                                       40)
            result = bucket['validations']['result']
            row = [name, profile, naming_policy, tag_policy, result]
            table.add_row(row)

        print table
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号