def display_ec2_nw_interfaces(self, outputformat="json"):
'''
Display network interfaces
'''
ec2_client = aws_service.AwsService('ec2')
nw_interfaces = ec2_client.service.list_network_interfaces()
if outputformat == "json":
pprinter = pprint.PrettyPrinter()
pprinter.pprint(nw_interfaces)
else:
self.display_ec2_nw_interfaces_table(nw_interfaces)
评论列表
文章目录