func (_m *EC2API) DescribeVpcs(req *ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error) {
	output := &ec2.DescribeVpcsOutput{}
	if err := _m.recorder.CheckError("DescribeVpcs"); err != nil {
		return output, err
	}
	_m.recorder.Record("DescribeVpcs")
	returns, exist := _m.recorder.giveRecordedOutput("DescribeVpcs", req)
	if exist {
		assertedErr, _ := returns[1].(error)
		return returns[0].(*ec2.DescribeVpcsOutput), assertedErr
	}
	for _, reqvpcid := range req.VpcIds {
		for _, vpc := range _m.vpcs {
			if reqvpcid == vpc.VpcId {
				output.Vpcs = append(output.Vpcs, vpc)
			}
		}
	}
	return output, nil
}
DescribeVpcs provides a mock function with given fields: _a0
package ec2
import (
	"strings"
	"sync"
	randomdata "github.com/Pallinder/go-randomdata"
	aws "github.com/aws/aws-sdk-go/aws"
	awssdk "github.com/aws/aws-sdk-go/aws"
	ec2 "github.com/aws/aws-sdk-go/service/ec2"
	"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
	"errors"
	"net"
	"github.com/golang/protobuf/proto"
	mock "github.com/stretchr/testify/mock"
	"github.com/google/uuid"
)
const RUNNING int64 = 16
const STOP int64 = 80
type EC2API struct {
	mock.Mock
	vpcs                     map[string]*ec2.Vpc
	vpcassocaiatedsubnet     map[string][]*ec2.Subnet          
	networkinterfaces        map[string]*ec2.NetworkInterface  
	assignedIpOnSubnet       map[string][]string               
	subnets                  map[string]*ec2.Subnet            
	assignedMacAddress       []string                          
	assignedelasticIps       *sync.Map                         
	assignedsecurityGroups   map[string]*ec2.SecurityGroup     
	createdEc2instances      []*ec2.Instance
	defaultSecurityGroupID   string
	defaultSubnetId          string
	routeTable               map[string]*ec2.RouteTable
	recorder                 *Recorder
	defaultSecurityGroupName string
}
var AVI_STANDARD_ELASTIC_ALLOCATION_DOMAIN string = "aws"
var _ ec2iface.EC2API = &EC2API{}
var supportedsubnetfilter []string = []string{"vpc-id", "availabilityZone", "cidrBlock"}
var defaultServiceEngineInstanceName = "service-engine"
var defaultAvailabilityZone = "us-east-1"
var defaultVpcID = "avi-seeding-vpc"
var defaultCidrBlock = "10.0.0.0/16"
var defaultVpcState = "available"
var defaultSubnetCidr = "10.0.0.0/24"
func New() *EC2API {
	securityGroupId := uuid.New()
	securityGroupIdStr := "sg-" + securityGroupId.String()
	securityGroupName := "sg-default"
	defaultSecurityGroup := &ec2.SecurityGroup{
		GroupId:     &securityGroupIdStr,
		GroupName:   &securityGroupName,
		VpcId:       &defaultVpcID,
		Description: proto.String("default security group"),
	}
	defaultSecurityGroups := map[string]*ec2.SecurityGroup{}
	defaultSecurityGroups[securityGroupIdStr] = defaultSecurityGroup
	recorder := &Recorder{}
	recorder.init()
	return &EC2API{
		vpcs:                     make(map[string]*ec2.Vpc, 0),
		vpcassocaiatedsubnet:     make(map[string][]*ec2.Subnet, 0),
		networkinterfaces:        make(map[string]*ec2.NetworkInterface, 0),
		assignedIpOnSubnet:       make(map[string][]string, 0),
		subnets:                  make(map[string]*ec2.Subnet, 0),
		assignedMacAddress:       make([]string, 0),
		assignedelasticIps:       &sync.Map{},
		assignedsecurityGroups:   defaultSecurityGroups,
		createdEc2instances:      make([]*ec2.Instance, 0),
		defaultSecurityGroupID:   securityGroupIdStr,
		recorder:                 recorder,
		routeTable:               make(map[string]*ec2.RouteTable, 0),
		defaultSecurityGroupName: securityGroupName,
	}
}
func (_m *EC2API) EXPECT() *Recorder {
	return _m.recorder
}
func (_m *EC2API) AppendInstance(instance *ec2.Instance) {
	instance.State = &ec2.InstanceState{
		Code: proto.Int64(RUNNING),
		Name: proto.String("running"),
	}
	_m.createdEc2instances = append(_m.createdEc2instances, instance)
}
func (_m *EC2API) AppendVpcs(vpc *ec2.Vpc) {
	_m.vpcs[*vpc.VpcId] = vpc
}
func (_m *EC2API) GetDefaultSecurityGroupID() string {
	return _m.defaultSecurityGroupID
}
func (_m *EC2API) InitialSeeding() {
	_m.AppendVpcs(&ec2.Vpc{
		VpcId:     &defaultVpcID,
		CidrBlock: &defaultCidrBlock,
		State:     &defaultVpcState,
	})
	createSubnetOutput, _ := _m.CreateSubnet(
		&ec2.CreateSubnetInput{
			CidrBlock:        &defaultSubnetCidr,
			VpcId:            &defaultVpcID,
			AvailabilityZone: &defaultAvailabilityZone,
		},
	)
	_m.defaultSubnetId = *createSubnetOutput.Subnet.SubnetId
	networkInterface, _ := _m.CreateNetworkInterface(&ec2.CreateNetworkInterfaceInput{
		Description: awssdk.String("se nic"),
		SubnetId:    awssdk.String(_m.GetDefaultSubnetID()),
	})
	routeTableID := "avi-route-table-" + uuid.New().String()
	routeTableAssociationID := "avi-route-table-association-" + uuid.New().String()
	_m.routeTable[routeTableID] = &ec2.RouteTable{
		VpcId:        &defaultVpcID,
		RouteTableId: &routeTableID,
		Associations: []*ec2.RouteTableAssociation{
			&ec2.RouteTableAssociation{
				RouteTableAssociationId: &routeTableAssociationID,
				Main:                    proto.Bool(true),
				RouteTableId:            &routeTableID,
			},
		},
		Routes: []*ec2.Route{
			&ec2.Route{
				GatewayId:            proto.String("local"),
				DestinationCidrBlock: &defaultCidrBlock,
				State:                proto.String("active"),
				Origin:               proto.String("Create Route Table"),
			},
		},
	}
	routeTableID = "avi-route-table-" + uuid.New().String()
	routeTableAssociationID = "avi-route-table-association-" + uuid.New().String()
	_m.routeTable[routeTableID] = &ec2.RouteTable{
		VpcId:        &defaultVpcID,
		RouteTableId: &routeTableID,
		Associations: []*ec2.RouteTableAssociation{
			&ec2.RouteTableAssociation{
				RouteTableAssociationId: &routeTableAssociationID,
				Main:                    proto.Bool(false),
				RouteTableId:            &routeTableID,
				SubnetId:                &_m.defaultSubnetId,
			},
		},
		PropagatingVgws: []*ec2.PropagatingVgw{
			&ec2.PropagatingVgw{
				GatewayId: proto.String("igw-avi-internet-gateway"),
			},
		},
		Routes: []*ec2.Route{
			&ec2.Route{
				GatewayId:            proto.String("igw-avi-internet-gateway"),
				DestinationCidrBlock: proto.String("0.0.0.0/0"),
				State:                proto.String("active"),
				Origin:               proto.String("Create Route Table"),
			},
		},
	}
	_m.AppendInstance(&ec2.Instance{
		InstanceId: &defaultServiceEngineInstanceName,
		VpcId:      &defaultVpcID,
		NetworkInterfaces: []*ec2.InstanceNetworkInterface{
			&ec2.InstanceNetworkInterface{
				VpcId:              &defaultVpcID,
				NetworkInterfaceId: networkInterface.NetworkInterface.NetworkInterfaceId,
				MacAddress:         networkInterface.NetworkInterface.MacAddress,
				PrivateIpAddress:   networkInterface.NetworkInterface.PrivateIpAddress,
				SubnetId:           networkInterface.NetworkInterface.SubnetId,
			},
		},
		Placement: &ec2.Placement{
			AvailabilityZone: &defaultAvailabilityZone,
		},
		Tags: []*ec2.Tag{
			&ec2.Tag{
				Key:   proto.String("Name"),
				Value: &defaultServiceEngineInstanceName,
			},
		},
		SecurityGroups: []*ec2.GroupIdentifier{
			&ec2.GroupIdentifier{
				GroupId:   &_m.defaultSecurityGroupID,
				GroupName: &_m.defaultSecurityGroupName,
			},
		},
	})
}
func (_m *EC2API) GetDefaultSubnetID() string {
	return _m.defaultSubnetId
}
func (_m *EC2API) GetDefaultServiceEngine() *ec2.Instance {
	for _, instance := range _m.createdEc2instances {
		if *instance.InstanceId == defaultServiceEngineInstanceName {
			return instance
		}
	}
	panic("no initial seeding")
}
func (_ *EC2API) GetDefaultAvailabiltyZone() string {
	return defaultAvailabilityZone
}
func (_m *EC2API) GetDefaultVPCID() string {
	return defaultVpcID
}
func (_m *EC2API) GetDefaultVPCCIDRBlock() string {
	return defaultCidrBlock
}
func (_m *EC2API) GetDefaultSubnetCidr() string {
	return defaultSubnetCidr
}
func (_m *EC2API) CreateInstace(name, subnetId, vpcId string) *ec2.Instance {
	networkInterface, _ := _m.CreateNetworkInterface(&ec2.CreateNetworkInterfaceInput{
		Description: awssdk.String("interface for " + name),
		SubnetId:    awssdk.String(subnetId),
	})
	instanceid := name + "-" + uuid.New().String()
	instance := &ec2.Instance{
		InstanceId: &instanceid,
		VpcId:      &vpcId,
		NetworkInterfaces: []*ec2.InstanceNetworkInterface{
			&ec2.InstanceNetworkInterface{
				VpcId:              &vpcId,
				NetworkInterfaceId: networkInterface.NetworkInterface.NetworkInterfaceId,
				MacAddress:         networkInterface.NetworkInterface.MacAddress,
				PrivateIpAddress:   networkInterface.NetworkInterface.PrivateIpAddress,
				SubnetId:           networkInterface.NetworkInterface.SubnetId,
				Attachment:         &ec2.InstanceNetworkInterfaceAttachment{DeviceIndex: aws.Int64(0), DeleteOnTermination: aws.Bool(true), AttachmentId: aws.String(GiveRandomId("eni-attach-"))},
			},
		},
		Placement: &ec2.Placement{
			AvailabilityZone: &defaultAvailabilityZone,
		},
		Tags: []*ec2.Tag{
			&ec2.Tag{
				Key:   proto.String("Name"),
				Value: &instanceid,
			},
		},
		SecurityGroups: []*ec2.GroupIdentifier{
			&ec2.GroupIdentifier{
				GroupId:   &_m.defaultSecurityGroupID,
				GroupName: &_m.defaultSecurityGroupName,
			},
		},
	}
	_m.AppendInstance(instance)
	return instance
}
func (_m *EC2API) AttachNetworkInterface(req *ec2.AttachNetworkInterfaceInput) (*ec2.AttachNetworkInterfaceOutput, error) {
	output := new(ec2.AttachNetworkInterfaceOutput)
	output.AttachmentId = aws.String(GiveRandomId("eni-attach-"))
	return output, nil
}
func (m *EC2API) ModifyNetworkInterfaceAttribute(req *ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error) {
	output := new(ec2.ModifyNetworkInterfaceAttributeOutput)
	return output, nil
}