use of com.cloud.server.api.response.netapp.AssociateLunCmdResponse in project cloudstack by apache.
the class AssociateLunCmd method execute.
@Override
public void execute() {
try {
AssociateLunCmdResponse response = new AssociateLunCmdResponse();
String[] returnVals = null;
returnVals = netappMgr.associateLun(getGuestIQN(), getLunName());
response.setLun(returnVals[0]);
response.setIpAddress(returnVals[2]);
response.setTargetIQN(returnVals[1]);
response.setObjectName("lun");
response.setResponseName(getCommandName());
this.setResponseObject(response);
} catch (ServerException e) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString());
} catch (InvalidParameterValueException e) {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString());
}
}
Aggregations