private DescribeVpcsResponseType describeVpcs ( ) { DescribeVpcsResponseType ret = new DescribeVpcsResponseType ( ) ; ret . setRequestId ( UUID . randomUUID ( ) . toString ( ) ) ; VpcSetType vpcSet = new VpcSetType ( ) ; for ( Iterator < MockVpc > mockVpc = mockVpcController . describeVpcs ( ) . iterator ( ) ; mockVpc . hasNext ( ) ; ) { MockVpc item = mockVpc . next ( ) ; VpcType vpcType = new VpcType ( ) ; if ( ! DEFAULT_MOCK_PLACEMENT . getAvailabilityZone ( ) . equals ( currentRegion ) ) { vpcType . setVpcId ( currentRegion + "_" + item . getVpcId ( ) ) ; } else { vpcType . setVpcId ( item . getVpcId ( ) ) ; } vpcType . setState ( item . getState ( ) ) ; vpcType . setCidrBlock ( item . getCidrBlock ( ) ) ; vpcType . setIsDefault ( item . getIsDefault ( ) ) ; vpcSet . getItem ( ) . add ( vpcType ) ; } ret . setVpcSet ( vpcSet ) ; return ret ; }
Handles describeVpcs request and returns response with a vpc .