use of org.apache.cloudstack.api.response.TrafficTypeImplementorResponse in project cloudstack by apache.
the class ListTrafficTypeImplementorsCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
List<Pair<TrafficType, String>> results = _networkService.listTrafficTypeImplementor(this);
ListResponse<TrafficTypeImplementorResponse> response = new ListResponse<TrafficTypeImplementorResponse>();
List<TrafficTypeImplementorResponse> responses = new ArrayList<TrafficTypeImplementorResponse>();
for (Pair<TrafficType, String> r : results) {
TrafficTypeImplementorResponse p = new TrafficTypeImplementorResponse();
p.setTrafficType(r.first().toString());
p.setImplementor(r.second());
p.setObjectName("traffictypeimplementorresponse");
responses.add(p);
}
response.setResponses(responses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations