RemoteAccessVpn: fix regression preshared key is not sent to UI/clients

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit c71339569d9d3e8e710a4c2490a50ffa6eff4d7f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2015-04-23 11:22:11 +02:00
parent 496ffcad83
commit d81e831214
2 changed files with 9 additions and 0 deletions

View File

@ -41,6 +41,10 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE
@Param(description = "the range of ips to allocate to the clients")
private String ipRange;
@SerializedName("presharedkey")
@Param(description = "the ipsec preshared key")
private String presharedKey;
@SerializedName(ApiConstants.ACCOUNT)
@Param(description = "the account of the remote access vpn")
private String accountName;
@ -81,6 +85,10 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE
this.ipRange = ipRange;
}
public void setPresharedKey(String presharedKey) {
this.presharedKey = presharedKey;
}
@Override
public void setAccountName(String accountName) {
this.accountName = accountName;

View File

@ -1352,6 +1352,7 @@ public class ApiResponseHelper implements ResponseGenerator {
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());