Skip to content

Commit cc5dea4

Browse files
author
Chiradeep Vittal
committed
Add RemoteAccessVpn service
1 parent 1216ffd commit cc5dea4

3 files changed

Lines changed: 43 additions & 8 deletions

File tree

‎api/src/com/cloud/network/RemoteAccessVpn.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
*/
1818
package com.cloud.network;
1919

20+
import com.cloud.acl.ControlledEntity;
21+
2022
/**
2123
* @author ahuang
2224
*
2325
*/
24-
public interface RemoteAccessVpn {
26+
public interface RemoteAccessVpn extends ControlledEntity {
2527
long getId();
26-
long getAccountId();
2728
String getAccountName();
2829
String getVpnServerAddress();
2930
void setVpnServerAddress(String vpnServerAddress);
@@ -41,6 +42,4 @@ public interface RemoteAccessVpn {
4142

4243
String getLocalIp();
4344

44-
long getDomainId();
45-
4645
}

‎api/src/com/cloud/network/VpnUser.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@
1717
*/
1818
package com.cloud.network;
1919

20-
public interface VpnUser {
21-
long getId();
20+
import com.cloud.acl.ControlledEntity;
2221

23-
long getAccountId();
22+
public interface VpnUser extends ControlledEntity{
23+
long getId();
2424

2525
String getAccountName();
2626

2727
String getUsername();
2828

2929
String getPassword();
3030

31-
long getDomainId();
3231
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright (C) 2010 Cloud.com. All rights reserved.
3+
*
4+
* This software is licensed under the GNU General Public License v3 or later.
5+
*
6+
* It is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or any later
9+
version.
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*
18+
*/
19+
package com.cloud.network.vpn;
20+
21+
import java.util.List;
22+
23+
import com.cloud.network.RemoteAccessVpn;
24+
import com.cloud.network.VpnUser;
25+
26+
27+
public interface RemoteAccessVpnService {
28+
29+
RemoteAccessVpn createRemoteAccessVpn(long zoneId, long ownerId, String publicIp, String ipRange);
30+
RemoteAccessVpn destroyRemoteAccessVpn(long zoneId, long ownerId);
31+
List<? extends RemoteAccessVpn> listRemoteAccessVpns(long vpnOwnerId, long zoneId, String publicIp);
32+
33+
VpnUser addVpnUser(long vpnOwnerId, String userName, String password);
34+
VpnUser removeVpnUser(long vpnOwnerId, String userName);
35+
List<? extends VpnUser> listVpnUsers(long vpnOwnerId, String userName);
36+
37+
}

0 commit comments

Comments
 (0)