diff --git a/api/src/com/cloud/network/RemoteAccessVpn.java b/api/src/com/cloud/network/RemoteAccessVpn.java index a967e954695..bd180080005 100644 --- a/api/src/com/cloud/network/RemoteAccessVpn.java +++ b/api/src/com/cloud/network/RemoteAccessVpn.java @@ -17,13 +17,14 @@ */ package com.cloud.network; +import com.cloud.acl.ControlledEntity; + /** * @author ahuang * */ -public interface RemoteAccessVpn { +public interface RemoteAccessVpn extends ControlledEntity { long getId(); - long getAccountId(); String getAccountName(); String getVpnServerAddress(); void setVpnServerAddress(String vpnServerAddress); @@ -41,6 +42,4 @@ public interface RemoteAccessVpn { String getLocalIp(); - long getDomainId(); - } diff --git a/api/src/com/cloud/network/VpnUser.java b/api/src/com/cloud/network/VpnUser.java index 733719daac6..b91528d43a6 100644 --- a/api/src/com/cloud/network/VpnUser.java +++ b/api/src/com/cloud/network/VpnUser.java @@ -17,10 +17,10 @@ */ package com.cloud.network; -public interface VpnUser { - long getId(); +import com.cloud.acl.ControlledEntity; - long getAccountId(); +public interface VpnUser extends ControlledEntity{ + long getId(); String getAccountName(); @@ -28,5 +28,4 @@ public interface VpnUser { String getPassword(); - long getDomainId(); } diff --git a/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java b/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java new file mode 100644 index 00000000000..2bba080af87 --- /dev/null +++ b/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2010 Cloud.com. All rights reserved. + * + * This software is licensed under the GNU General Public License v3 or later. + * + * It is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or any later +version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +package com.cloud.network.vpn; + +import java.util.List; + +import com.cloud.network.RemoteAccessVpn; +import com.cloud.network.VpnUser; + + +public interface RemoteAccessVpnService { + + RemoteAccessVpn createRemoteAccessVpn(long zoneId, long ownerId, String publicIp, String ipRange); + RemoteAccessVpn destroyRemoteAccessVpn(long zoneId, long ownerId); + List listRemoteAccessVpns(long vpnOwnerId, long zoneId, String publicIp); + + VpnUser addVpnUser(long vpnOwnerId, String userName, String password); + VpnUser removeVpnUser(long vpnOwnerId, String userName); + List listVpnUsers(long vpnOwnerId, String userName); + +}