use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class UpdateHostPasswordCmd method execute.
@Override
public void execute() {
_mgr.updateHostPassword(this);
_resourceService.updateHostPassword(this);
this.setResponseObject(new SuccessResponse(getCommandName()));
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class RestartNetworkCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException {
boolean result = _networkService.restartNetwork(this, getCleanup());
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to restart network");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class RevokeSecurityGroupEgressCmd method execute.
@Override
public void execute() {
boolean result = _securityGroupService.revokeSecurityGroupEgress(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to revoke security group egress rule");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DestroyConsoleProxyCmd method execute.
@Override
public void execute() {
boolean result = _consoleProxyService.destroyConsoleProxy(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to destroy console proxy");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DisassociateIPAddrCmd method execute.
@Override
public void execute() throws InsufficientAddressCapacityException {
UserContext.current().setEventDetails("Ip Id: " + getIpAddressId());
boolean result = _networkService.disassociateIpAddress(id);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to disassociate ip address");
}
}
Aggregations