private DescribeRouteTablesResponseType describeRouteTables ( ) { DescribeRouteTablesResponseType ret = new DescribeRouteTablesResponseType ( ) ; ret . setRequestId ( UUID . randomUUID ( ) . toString ( ) ) ; RouteTableSetType routeTableSet = new RouteTableSetType ( ) ; for ( Iterator < MockRouteTable > mockRouteTable = mockRouteTableController . describeRouteTables ( ) . iterator ( ) ; mockRouteTable . hasNext ( ) ; ) { MockRouteTable item = mockRouteTable . next ( ) ; RouteTableType routeTable = new RouteTableType ( ) ; if ( ! DEFAULT_MOCK_PLACEMENT . getAvailabilityZone ( ) . equals ( currentRegion ) ) { routeTable . setVpcId ( currentRegion + "_" + item . getVpcId ( ) ) ; routeTable . setRouteTableId ( currentRegion + "_" + item . getRouteTableId ( ) ) ; } else { routeTable . setVpcId ( item . getVpcId ( ) ) ; routeTable . setRouteTableId ( item . getRouteTableId ( ) ) ; } RouteTableAssociationSetType associationSet = new RouteTableAssociationSetType ( ) ; routeTable . setAssociationSet ( associationSet ) ; RouteSetType routeSet = new RouteSetType ( ) ; routeTable . setRouteSet ( routeSet ) ; routeTableSet . getItem ( ) . add ( routeTable ) ; } ret . setRouteTableSet ( routeTableSet ) ; return ret ; }
Handles describeRouteTables request and returns response with a route table .