ec2_commandhelper.py 文件源码

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

项目:orca 作者: bdastur 项目源码 文件源码
def display_ec2_tags(self, outputformat='json',
                         filter=None, aggr_and=False):
        '''
        Display Tags for all EC2 Resources
        '''
        ec2_client = aws_service.AwsService('ec2')
        tagsobj = ec2_client.service.list_tags()

        if filter is not None:
            tagsobj = orcautils.filter_dict(tagsobj,
                                            filter,
                                            aggr_and=aggr_and)

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(tagsobj)
        else:
            self.display_ec2_tags_table(tagsobj)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号