示例#1
0
 def information_vpc(self, columns, filters):
     from wrapper.vpc import Vpc
     from misc import Misc
     vpc = Vpc(session=self.session)
     result = vpc.information_vpc(filters=filters)
     ret = []
     for instance in result:
         ret.append(
             Misc.parse_object(object=instance,
                               columns=columns,
                               service="vpc"))
     return ret
示例#2
0
 def information_elbs(self, columns, filters):
     from wrapper.elb import Elb
     from misc import Misc
     elb = Elb(session=self.session)
     result = elb.information_elbs(filters=filters)
     ret = []
     for elb_object in result:
         ret.append(
             Misc.parse_object(object=elb_object,
                               columns=columns,
                               service="elb"))
     return ret
示例#3
0
 def information_ami(self, columns, filters):
     from wrapper.ami import Ami
     from misc import Misc
     ami = Ami(session=self.session)
     result = ami.information_ami(filters=filters)
     ret = []
     for instance in result:
         ret.append(
             Misc.parse_object(object=instance,
                               columns=columns,
                               service="ami"))
     return ret
示例#4
0
 def information_kinesis(self, columns):
     from wrapper.kinesis import Kinesis
     from misc import Misc
     kinesis = Kinesis(session=self.session)
     streams = kinesis.information_kinesis_streams()
     ret = []
     for stream in streams:
         ret.append(
             Misc.parse_object(service="kinesis",
                               object=stream,
                               columns=columns))
     return ret
示例#5
0
 def information_cloudformation(self, columns):
     from wrapper.cloudformation import Cloudformation
     from misc import Misc
     cloudformation = Cloudformation(session=self.session)
     stacks = cloudformation.describe_stacks()
     ret = []
     for stack in stacks:
         ret.append(
             Misc.parse_object(service="cloudformation",
                               object=stack,
                               columns=columns))
     return ret
示例#6
0
 def information_apigateway(self, columns):
     from wrapper.apigateway import Apigateway
     from misc import Misc
     apigateway = Apigateway(session=self.session)
     result = apigateway.information_apigateway()
     ret = []
     for instance in result:
         ret.append(
             Misc.parse_object(object=instance,
                               columns=columns,
                               service="apigateway"))
     return ret
示例#7
0
 def information_ec2_instances(self, columns, filters):
     '''
     This function gathers information about ec2 instances
     :param columns: The requested columns that should be returned
     :type columns: array
     :param filters: The boto3 filters that should be used for filtering the results
     :type filters: array
     :return: an array with parsed instances for printing
     :rtype: array
     '''
     from wrapper.ec2 import Ec2
     from misc import Misc
     ec2 = Ec2(session=self.session)
     result = ec2.information_ec2_instances(filters=filters)
     ret = []
     for instance in result:
         ret.append(
             Misc.parse_object(object=instance,
                               columns=columns,
                               service="ec2"))
     return ret