use of com.cloud.network.Site2SiteVpnConnection in project cloudstack by apache.
the class ResetVpnConnectionCmd method execute.
@Override
public void execute() {
try {
Site2SiteVpnConnection result = _s2sVpnService.resetVpnConnection(this);
if (result != null) {
Site2SiteVpnConnectionResponse response = _responseGenerator.createSite2SiteVpnConnectionResponse(result);
response.setResponseName(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset site to site VPN connection");
}
} catch (ResourceUnavailableException ex) {
s_logger.warn("Exception: ", ex);
throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());
}
}
Aggregations