@Override public void execute() throws ResourceUnavailableException, ConcurrentOperationException{ CallContext.current().setEventDetails("Vm Id: "+this._uuidMgr.getUuid(VirtualMachine.class, getId())); UserVm result = _userVmService.destroyVm(this); UserVmResponse response = new UserVmResponse(); if (result != null) { List<UserVmResponse> responses = _responseGenerator.createUserVmResponse(ResponseView.Full, "virtualmachine", result); if (responses != null && !responses.isEmpty()) { response = responses.get(0); } response.setResponseName("virtualmachine"); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy vm"); } } }
@Override public void execute() throws ResourceUnavailableException, ConcurrentOperationException { CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId())); UserVm result = _userVmService.destroyVm(this); UserVmResponse response = new UserVmResponse(); if (result != null) { List<UserVmResponse> responses = _responseGenerator.createUserVmResponse(ResponseView.Restricted, "virtualmachine", result); if (responses != null && !responses.isEmpty()) { response = responses.get(0); } response.setResponseName("virtualmachine"); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy vm"); } } }
@Override public void execute() throws ResourceUnavailableException, ConcurrentOperationException { CallContext.current().setEventDetails("Vm Id: " + getId()); final UserVm result = _userVmService.destroyVm(this); UserVmResponse response = new UserVmResponse(); if (result != null) { final List<UserVmResponse> responses = _responseGenerator.createUserVmResponse(ResponseView.Full, "virtualmachine", result); if (responses != null && !responses.isEmpty()) { response = responses.get(0); } response.setResponseName("virtualmachine"); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy vm"); } } }
@Override public void execute() throws ResourceUnavailableException, ConcurrentOperationException { CallContext.current().setEventDetails("Vm Id: " + getId()); final UserVm result = _userVmService.destroyVm(this); UserVmResponse response = new UserVmResponse(); if (result != null) { final List<UserVmResponse> responses = _responseGenerator.createUserVmResponse(ResponseView.Restricted, "virtualmachine", result); if (responses != null && !responses.isEmpty()) { response = responses.get(0); } response.setResponseName("virtualmachine"); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy vm"); } }