Display flag support for VpnConnection/VpnGateway/RemoteAccessVpn

This commit is contained in:
Alena Prokharchyk 2014-02-21 14:51:22 -08:00
parent 83bef78390
commit e2ec094722
22 changed files with 168 additions and 28 deletions

View File

@ -38,4 +38,6 @@ public interface RemoteAccessVpn extends ControlledEntity, InternalIdentity, Ide
Long getVpcId();
State getState();
boolean isDisplay();
}

View File

@ -42,4 +42,6 @@ public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdenti
public Date getRemoved();
public boolean isPassive();
boolean isDisplay();
}

View File

@ -1,3 +1,4 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
@ -15,17 +16,19 @@
// specific language governing permissions and limitations
// under the License.
package com.cloud.network;
import java.util.Date;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
public interface Site2SiteVpnGateway extends ControlledEntity, Identity, InternalIdentity {
public long getAddrId();
public long getVpcId();
public Date getRemoved();
boolean isDisplay();
}

View File

@ -31,7 +31,7 @@ import com.cloud.utils.Pair;
public interface RemoteAccessVpnService {
static final String RemoteAccessVpnClientIpRangeCK = "remote.access.vpn.client.iprange";
RemoteAccessVpn createRemoteAccessVpn(long vpnServerAddressId, String ipRange, boolean openFirewall) throws NetworkRuleConflictException;
RemoteAccessVpn createRemoteAccessVpn(long vpnServerAddressId, String ipRange, boolean openFirewall, Boolean forDisplay) throws NetworkRuleConflictException;
void destroyRemoteAccessVpnForIp(long vpnServerAddressId, Account caller) throws ResourceUnavailableException;
@ -55,6 +55,6 @@ public interface RemoteAccessVpnService {
RemoteAccessVpn getRemoteAccessVpnById(long vpnId);
RemoteAccessVpn updateRemoteAccessVpn(long id, String customId);
RemoteAccessVpn updateRemoteAccessVpn(long id, String customId, Boolean forDisplay);
}

View File

@ -64,7 +64,7 @@ public interface Site2SiteVpnService {
Site2SiteCustomerGateway updateCustomerGateway(UpdateVpnCustomerGatewayCmd updateVpnCustomerGatewayCmd);
Site2SiteVpnConnection updateVpnConnection(long id, String customId);
Site2SiteVpnConnection updateVpnConnection(long id, String customId, Boolean forDisplay);
Site2SiteVpnGateway updateVpnGateway(Long id, String customId);
Site2SiteVpnGateway updateVpnGateway(Long id, String customId, Boolean forDisplay);
}

View File

@ -16,8 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpn;
import org.apache.log4j.Logger;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@ -28,6 +27,7 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.cloudstack.api.response.IPAddressResponse;
import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
import org.apache.log4j.Logger;
import com.cloud.event.EventTypes;
import com.cloud.exception.InvalidParameterValueException;
@ -74,10 +74,14 @@ public class CreateRemoteAccessVpnCmd extends BaseAsyncCreateCmd {
description = "if true, firewall rule for source/end pubic port is automatically created; if false - firewall rule has to be created explicitely. Has value true by default")
private Boolean openFirewall;
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
public Long getPublicIpId() {
return publicIpId;
}
@ -139,7 +143,7 @@ public class CreateRemoteAccessVpnCmd extends BaseAsyncCreateCmd {
@Override
public void create() {
try {
RemoteAccessVpn vpn = _ravService.createRemoteAccessVpn(publicIpId, ipRange, getOpenFirewall());
RemoteAccessVpn vpn = _ravService.createRemoteAccessVpn(publicIpId, ipRange, getOpenFirewall(), getDisplay());
if (vpn != null) {
this.setEntityId(vpn.getServerAddressId());
// find uuid for server ip address
@ -191,4 +195,8 @@ public class CreateRemoteAccessVpnCmd extends BaseAsyncCreateCmd {
}
return ip;
}
public Boolean getDisplay() {
return display;
}
}

View File

@ -16,8 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpn;
import org.apache.log4j.Logger;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@ -28,6 +27,7 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
import org.apache.log4j.Logger;
import com.cloud.event.EventTypes;
import com.cloud.exception.NetworkRuleConflictException;
@ -62,6 +62,9 @@ public class CreateVpnConnectionCmd extends BaseAsyncCreateCmd {
@Parameter(name = ApiConstants.PASSIVE, type = CommandType.BOOLEAN, required = false, description = "connection is passive or not")
private Boolean passive;
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@ -81,6 +84,10 @@ public class CreateVpnConnectionCmd extends BaseAsyncCreateCmd {
return passive;
}
public Boolean getDisplay() {
return display;
}
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////

View File

@ -16,8 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpn;
import org.apache.log4j.Logger;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@ -26,6 +25,7 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
import org.apache.cloudstack.api.response.VpcResponse;
import org.apache.log4j.Logger;
import com.cloud.event.EventTypes;
import com.cloud.network.Site2SiteVpnGateway;
@ -47,6 +47,9 @@ public class CreateVpnGatewayCmd extends BaseAsyncCmd {
description = "public ip address id of the vpn gateway")
private Long vpcId;
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@ -55,6 +58,10 @@ public class CreateVpnGatewayCmd extends BaseAsyncCmd {
return vpcId;
}
public Boolean getDisplay() {
return display;
}
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////

View File

@ -16,6 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpn;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseAsyncCustomIdCmd;
@ -45,6 +46,9 @@ public class UpdateRemoteAccessVpnCmd extends BaseAsyncCustomIdCmd {
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, expose = false)
private Long ownerId;
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@ -58,6 +62,10 @@ public class UpdateRemoteAccessVpnCmd extends BaseAsyncCustomIdCmd {
return s_name;
}
public Boolean getDisplay() {
return display;
}
@Override
public long getEntityOwnerId() {
if (ownerId == null) {
@ -86,7 +94,7 @@ public class UpdateRemoteAccessVpnCmd extends BaseAsyncCustomIdCmd {
@Override
public void execute() {
RemoteAccessVpn result = _ravService.updateRemoteAccessVpn(id, this.getCustomId());
RemoteAccessVpn result = _ravService.updateRemoteAccessVpn(id, this.getCustomId(), getDisplay());
RemoteAccessVpnResponse response = _responseGenerator.createRemoteAccessVpnResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);

View File

@ -16,6 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpn;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseAsyncCustomIdCmd;
@ -39,12 +40,19 @@ public class UpdateVpnConnectionCmd extends BaseAsyncCustomIdCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "id of vpn connection")
private Long id;
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
public Long getId() {
return id;
}
public Boolean getDisplay() {
return display;
}
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////
@ -75,7 +83,7 @@ public class UpdateVpnConnectionCmd extends BaseAsyncCustomIdCmd {
@Override
public void execute() {
Site2SiteVpnConnection result = _s2sVpnService.updateVpnConnection(id, this.getCustomId());
Site2SiteVpnConnection result = _s2sVpnService.updateVpnConnection(id, this.getCustomId(), getDisplay());
Site2SiteVpnConnectionResponse response = _responseGenerator.createSite2SiteVpnConnectionResponse(result);
response.setResponseName(getCommandName());
setResponseObject(response);

View File

@ -16,6 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpn;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseAsyncCustomIdCmd;
@ -39,6 +40,9 @@ public class UpdateVpnGatewayCmd extends BaseAsyncCustomIdCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, required = true, description = "id of customer gateway")
private Long id;
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@ -46,6 +50,10 @@ public class UpdateVpnGatewayCmd extends BaseAsyncCustomIdCmd {
return id;
}
public Boolean getDisplay() {
return display;
}
@Override
public String getCommandName() {
return s_name;
@ -75,7 +83,7 @@ public class UpdateVpnGatewayCmd extends BaseAsyncCustomIdCmd {
/////////////////////////////////////////////////////
@Override
public void execute() {
Site2SiteVpnGateway result = _s2sVpnService.updateVpnGateway(id, this.getCustomId());
Site2SiteVpnGateway result = _s2sVpnService.updateVpnGateway(id, this.getCustomId(), getDisplay());
Site2SiteVpnGatewayResponse response = _responseGenerator.createSite2SiteVpnGatewayResponse(result);
response.setResponseName(getCommandName());
}

View File

@ -16,14 +16,14 @@
// under the License.
package org.apache.cloudstack.api.response;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import org.apache.cloudstack.api.EntityReference;
import com.cloud.network.RemoteAccessVpn;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
@EntityReference(value = RemoteAccessVpn.class)
@SuppressWarnings("unused")
@ -73,6 +73,10 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE
@Param(description = "the id of the remote access vpn")
private String id;
@SerializedName(ApiConstants.FOR_DISPLAY)
@Param(description = "is vpn for display to the regular user", since = "4.4", authorized = {RoleType.Admin})
private Boolean forDisplay;
public void setPublicIp(String publicIp) {
this.publicIp = publicIp;
}
@ -122,4 +126,7 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE
this.id = id;
}
public void setForDisplay(Boolean forDisplay) {
this.forDisplay = forDisplay;
}
}

View File

@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response;
import java.util.Date;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import org.apache.cloudstack.api.EntityReference;
@ -122,6 +123,10 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse implements Cont
@Param(description = "the date and time the host was removed")
private Date removed;
@SerializedName(ApiConstants.FOR_DISPLAY)
@Param(description = "is connection for display to the regular user", since = "4.4", authorized = {RoleType.Admin})
private Boolean forDisplay;
public void setId(String id) {
this.id = id;
}
@ -211,4 +216,8 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse implements Cont
this.domain = domainName;
}
public void setForDisplay(Boolean forDisplay) {
this.forDisplay = forDisplay;
}
}

View File

@ -18,14 +18,14 @@ package org.apache.cloudstack.api.response;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import org.apache.cloudstack.api.EntityReference;
import com.cloud.network.Site2SiteVpnGateway;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
@EntityReference(value = Site2SiteVpnGateway.class)
@SuppressWarnings("unused")
@ -66,6 +66,10 @@ public class Site2SiteVpnGatewayResponse extends BaseResponse implements Control
@Param(description = "the date and time the host was removed")
private Date removed;
@SerializedName(ApiConstants.FOR_DISPLAY)
@Param(description = "is vpn gateway for display to the regular user", since = "4.4", authorized = {RoleType.Admin})
private Boolean forDisplay;
public void setId(String id) {
this.id = id;
}
@ -107,4 +111,7 @@ public class Site2SiteVpnGatewayResponse extends BaseResponse implements Control
this.domain = domainName;
}
public void setForDisplay(Boolean forDisplay) {
this.forDisplay = forDisplay;
}
}

View File

@ -65,6 +65,9 @@ public class RemoteAccessVpnVO implements RemoteAccessVpn {
@Column(name = "vpc_id")
private Long vpcId;
@Column(name = "display", updatable = true, nullable = false)
protected boolean display = true;
public RemoteAccessVpnVO() {
this.uuid = UUID.randomUUID().toString();
}
@ -152,4 +155,13 @@ public class RemoteAccessVpnVO implements RemoteAccessVpn {
public void setUuid(String uuid) {
this.uuid = uuid;
}
public void setDisplay(boolean display) {
this.display = display;
}
@Override
public boolean isDisplay() {
return display;
}
}

View File

@ -69,6 +69,9 @@ public class Site2SiteVpnConnectionVO implements Site2SiteVpnConnection, Interna
@Column(name = "passive")
private boolean passive;
@Column(name = "display", updatable = true, nullable = false)
protected boolean display = true;
public Site2SiteVpnConnectionVO() {
}
@ -159,4 +162,13 @@ public class Site2SiteVpnConnectionVO implements Site2SiteVpnConnection, Interna
public void setUuid(String uuid) {
this.uuid = uuid;
}
public void setDisplay(boolean display) {
this.display = display;
}
@Override
public boolean isDisplay() {
return display;
}
}

View File

@ -55,6 +55,9 @@ public class Site2SiteVpnGatewayVO implements Site2SiteVpnGateway {
@Column(name = GenericDao.REMOVED_COLUMN)
private Date removed;
@Column(name = "display", updatable = true, nullable = false)
protected boolean display = true;
public Site2SiteVpnGatewayVO() {
}
@ -116,4 +119,13 @@ public class Site2SiteVpnGatewayVO implements Site2SiteVpnGateway {
public void setUuid(String uuid) {
this.uuid = uuid;
}
public void setDisplay(boolean display) {
this.display = display;
}
@Override
public boolean isDisplay() {
return display;
}
}

View File

@ -1263,11 +1263,10 @@ public class ApiResponseHelper implements ResponseGenerator {
}
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;
@ -3045,6 +3044,7 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setVpcId(vpc.getUuid());
}
response.setRemoved(result.getRemoved());
response.setForDisplay(result.isDisplay());
response.setObjectName("vpngateway");
populateAccount(response, result.getAccountId());
@ -3114,6 +3114,7 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setState(result.getState().toString());
response.setCreated(result.getCreated());
response.setRemoved(result.getRemoved());
response.setForDisplay(result.isDisplay());
response.setObjectName("vpnconnection");
return response;
}

View File

@ -136,7 +136,7 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
@Override
@DB
public RemoteAccessVpn createRemoteAccessVpn(final long publicIpId, String ipRange, boolean openFirewall) throws NetworkRuleConflictException {
public RemoteAccessVpn createRemoteAccessVpn(final long publicIpId, String ipRange, boolean openFirewall, final Boolean forDisplay) throws NetworkRuleConflictException {
CallContext ctx = CallContext.current();
final Account caller = ctx.getCallingAccount();
@ -246,6 +246,10 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
RemoteAccessVpnVO vpnVO =
new RemoteAccessVpnVO(ipAddr.getAccountId(), ipAddr.getDomainId(), ipAddr.getAssociatedWithNetworkId(), publicIpId, vpcId, range[0], newIpRange,
sharedSecret);
if (forDisplay != null) {
vpnVO.setDisplay(forDisplay);
}
return _remoteAccessVpnDao.persist(vpnVO);
}
});
@ -730,7 +734,7 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
@Override
@ActionEvent(eventType = EventTypes.EVENT_REMOTE_ACCESS_VPN_UPDATE, eventDescription = "updating remote access vpn", async = true)
public RemoteAccessVpn updateRemoteAccessVpn(long id, String customId) {
public RemoteAccessVpn updateRemoteAccessVpn(long id, String customId, Boolean forDisplay) {
final RemoteAccessVpnVO vpn = _remoteAccessVpnDao.findById(id);
if (vpn == null) {
throw new InvalidParameterValueException("Can't find remote access vpn by id " + id);
@ -740,6 +744,9 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
if (customId != null) {
vpn.setUuid(customId);
}
if (forDisplay != null) {
vpn.setDisplay(forDisplay);
}
_remoteAccessVpnDao.update(vpn.getId(), vpn);
return _remoteAccessVpnDao.findById(id);

View File

@ -142,6 +142,11 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
}
Site2SiteVpnGatewayVO gw = new Site2SiteVpnGatewayVO(owner.getAccountId(), owner.getDomainId(), ips.get(0).getId(), vpcId);
if (cmd.getDisplay() != null) {
gw.setDisplay(cmd.getDisplay());
}
_vpnGatewayDao.persist(gw);
return gw;
}
@ -299,6 +304,10 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
Site2SiteVpnConnectionVO conn = new Site2SiteVpnConnectionVO(owner.getAccountId(), owner.getDomainId(), vpnGatewayId, customerGatewayId, cmd.isPassive());
conn.setState(State.Pending);
if (cmd.getDisplay() != null) {
conn.setDisplay(cmd.getDisplay());
}
_vpnConnectionDao.persist(conn);
return conn;
}
@ -785,7 +794,7 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
@Override
@ActionEvent(eventType = EventTypes.EVENT_S2S_VPN_CONNECTION_UPDATE, eventDescription = "creating s2s vpn gateway", async = true)
public Site2SiteVpnConnection updateVpnConnection(long id, String customId) {
public Site2SiteVpnConnection updateVpnConnection(long id, String customId, Boolean forDisplay) {
Account caller = CallContext.current().getCallingAccount();
Site2SiteVpnConnectionVO conn = _vpnConnectionDao.findById(id);
if (conn == null) {
@ -797,13 +806,17 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
conn.setUuid(customId);
}
if (forDisplay != null) {
conn.setDisplay(forDisplay);
}
_vpnConnectionDao.update(id, conn);
return _vpnConnectionDao.findById(id);
}
@Override
@ActionEvent(eventType = EventTypes.EVENT_S2S_VPN_GATEWAY_UPDATE, eventDescription = "updating s2s vpn gateway", async = true)
public Site2SiteVpnGateway updateVpnGateway(Long id, String customId) {
public Site2SiteVpnGateway updateVpnGateway(Long id, String customId, Boolean forDisplay) {
Account caller = CallContext.current().getCallingAccount();
Site2SiteVpnGatewayVO vpnGateway = _vpnGatewayDao.findById(id);
@ -815,6 +828,11 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
if (customId != null) {
vpnGateway.setUuid(customId);
}
if (forDisplay != null) {
vpnGateway.setDisplay(forDisplay);
}
_vpnGatewayDao.update(id, vpnGateway);
return _vpnGatewayDao.findById(id);

View File

@ -259,13 +259,13 @@ public class MockSite2SiteVpnManagerImpl extends ManagerBase implements Site2Sit
}
@Override
public Site2SiteVpnConnection updateVpnConnection(long id, String customId) {
public Site2SiteVpnConnection updateVpnConnection(long id, String customId, Boolean forDisplay) {
// TODO Auto-generated method stub
return null;
}
@Override
public Site2SiteVpnGateway updateVpnGateway(Long id, String customId) {
public Site2SiteVpnGateway updateVpnGateway(Long id, String customId, Boolean forDisplay) {
// TODO Auto-generated method stub
return null;
}

View File

@ -536,6 +536,8 @@ ALTER TABLE `cloud`.`autoscale_vmgroups` ADD COLUMN `display` tinyint(1) NOT NUL
ALTER TABLE `cloud`.`autoscale_vmprofiles` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the entry can be displayed to the end user';
ALTER TABLE `cloud`.`network_acl_item` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the entry can be displayed to the end user';
ALTER TABLE `cloud`.`network_acl` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the entry can be displayed to the end user';
ALTER TABLE `cloud`.`remote_access_vpn` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the entry can be displayed to the end user';
ALTER TABLE `cloud`.`s2s_vpn_connection` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the entry can be displayed to the end user';
ALTER TABLE `cloud`.`s2s_vpn_gateway` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the entry can be displayed to the end user';