use of com.cloud.api.response.TrafficTypeImplementorResponse in project CloudStack-archive by CloudStack-extras.
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