use of com.cloud.network.router.VirtualRouter in project cosmic by MissionCriticalCloud.
the class DestroyRouterCmd method execute.
@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
final CallContext ctx = CallContext.current();
ctx.setEventDetails("Router Id: " + getId());
final VirtualRouter result = _routerService.destroyRouter(getId(), ctx.getCallingAccount(), ctx.getCallingUserId());
if (result != null) {
final DomainRouterResponse response = _responseGenerator.createDomainRouterResponse(result);
response.setResponseName(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy router");
}
}
use of com.cloud.network.router.VirtualRouter in project cosmic by MissionCriticalCloud.
the class RebootRouterCmd method execute.
@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
CallContext.current().setEventDetails("Router Id: " + getId());
final VirtualRouter result = _routerService.rebootRouter(getId(), true);
if (result != null) {
final DomainRouterResponse response = _responseGenerator.createDomainRouterResponse(result);
response.setResponseName("router");
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reboot router");
}
}
Aggregations