return vpnResponse;
}
@Override
public RemoteAccessVpnResponse createRemoteAccessVpnResponse(RemoteAccessVpn vpn) {
RemoteAccessVpnResponse vpnResponse = new RemoteAccessVpnResponse();
IpAddress ip = ApiDBUtils.findIpAddressById(vpn.getServerAddressId());
if (ip != null) {
vpnResponse.setPublicIpId(ip.getUuid());
vpnResponse.setPublicIp(ip.getAddress().addr());
}
vpnResponse.setIpRange(vpn.getIpRange());
vpnResponse.setPresharedKey(vpn.getIpsecPresharedKey());
populateOwner(vpnResponse, vpn);
vpnResponse.setState(vpn.getState().toString());
vpnResponse.setId(vpn.getUuid());
vpnResponse.setForDisplay(vpn.isDisplay());
vpnResponse.setObjectName("remoteaccessvpn");
return vpnResponse;
}