use of org.apache.cloudstack.api.response.IsolationMethodResponse in project cloudstack by apache.
the class ListNetworkIsolationMethodsCmd method execute.
@Override
public void execute() {
Networks.IsolationType[] methods = _ntwkModel.listNetworkIsolationMethods();
ListResponse<IsolationMethodResponse> response = new ListResponse<IsolationMethodResponse>();
List<IsolationMethodResponse> isolationResponses = new ArrayList<IsolationMethodResponse>();
if (methods != null) {
for (Networks.IsolationType method : methods) {
IsolationMethodResponse isolationMethod = _responseGenerator.createIsolationMethodResponse(method);
isolationResponses.add(isolationMethod);
}
}
response.setResponses(isolationResponses, isolationResponses.size());
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
use of org.apache.cloudstack.api.response.IsolationMethodResponse in project cloudstack by apache.
the class ApiResponseHelper method createIsolationMethodResponse.
@Override
public IsolationMethodResponse createIsolationMethodResponse(IsolationType method) {
IsolationMethodResponse response = new IsolationMethodResponse();
response.setIsolationMethodName(method.toString());
response.setObjectName("isolationmethod");
return response;
}
Aggregations