Search in sources :

Example 6 with DomainRouterResponse

use of com.cloud.api.response.DomainRouterResponse in project CloudStack-archive by CloudStack-extras.

the class UpgradeRouterCmd method execute.

@Override
public void execute() {
    VirtualRouter router = _routerService.upgradeRouter(this);
    if (router != null) {
        DomainRouterResponse routerResponse = _responseGenerator.createDomainRouterResponse(router);
        routerResponse.setResponseName(getCommandName());
        this.setResponseObject(routerResponse);
    } else {
        throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to upgrade router");
    }
}
Also used : ServerApiException(com.cloud.api.ServerApiException) DomainRouterResponse(com.cloud.api.response.DomainRouterResponse) VirtualRouter(com.cloud.network.router.VirtualRouter)

Aggregations

DomainRouterResponse (com.cloud.api.response.DomainRouterResponse)6 VirtualRouter (com.cloud.network.router.VirtualRouter)6 ServerApiException (com.cloud.api.ServerApiException)5 ListResponse (com.cloud.api.response.ListResponse)1 ArrayList (java.util.ArrayList)1