use of org.apache.cloudstack.api.response.SuccessResponse in project cloudstack by apache.
the class DeleteVMGroupCmd method execute.
@Override
public void execute() {
boolean result = _userVmService.deleteVmGroup(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm group");
}
}
use of org.apache.cloudstack.api.response.SuccessResponse in project cloudstack by apache.
the class DeleteVMSnapshotCmd method execute.
@Override
public void execute() {
CallContext.current().setEventDetails("vmsnapshot id: " + this._uuidMgr.getUuid(VMSnapshot.class, getId()));
boolean result = _vmSnapshotService.deleteVMSnapshot(getId());
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm snapshot");
}
}
use of org.apache.cloudstack.api.response.SuccessResponse in project cloudstack by apache.
the class DeleteVpnGatewayCmd method execute.
@Override
public void execute() {
boolean result = false;
result = _s2sVpnService.deleteVpnGateway(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete customer VPN gateway");
}
}
use of org.apache.cloudstack.api.response.SuccessResponse in project cloudstack by apache.
the class RemoveResourceDetailCmd method execute.
@Override
public void execute() {
_resourceMetaDataService.deleteResourceMetaData(getResourceId(), getResourceType(), getKey());
this.setResponseObject(new SuccessResponse(getCommandName()));
}
use of org.apache.cloudstack.api.response.SuccessResponse in project cloudstack by apache.
the class DeleteIAMGroupCmd method execute.
@Override
public void execute() {
boolean result = _aclApiSrv.deleteIAMGroup(id);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete acl group");
}
}
Aggregations