cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master to 4976a67
Date Thu, 08 Aug 2013 17:49:12 GMT
Updated Branches:
  refs/heads/master 35d20d163 -> 4976a67bf


CLOUDSTACK-4193: don't let privateGateway to be created with NULL networkId


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4976a67b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4976a67b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4976a67b

Branch: refs/heads/master
Commit: 4976a67bfc0fb5c110f831632d5e9721e1ead2e8
Parents: 35d20d1
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Aug 8 10:38:13 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Thu Aug 8 10:49:12 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/network/vpc/VpcGateway.java                | 2 +-
 engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java    | 6 +++---
 .../schema/src/com/cloud/network/vpc/dao/VpcGatewayDao.java  | 5 ++---
 .../src/com/cloud/network/vpc/dao/VpcGatewayDaoImpl.java     | 8 --------
 .../com/cloud/network/element/VpcVirtualRouterElement.java   | 1 -
 server/src/com/cloud/network/vpc/PrivateGatewayProfile.java  | 2 +-
 6 files changed, 7 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4976a67b/api/src/com/cloud/network/vpc/VpcGateway.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/vpc/VpcGateway.java b/api/src/com/cloud/network/vpc/VpcGateway.java
index 5d278e9..9652b4b 100644
--- a/api/src/com/cloud/network/vpc/VpcGateway.java
+++ b/api/src/com/cloud/network/vpc/VpcGateway.java
@@ -56,7 +56,7 @@ public interface VpcGateway extends Identity, ControlledEntity, InternalIdentity
     /**
      * @return
      */
-    Long getNetworkId();
+    long getNetworkId();
 
     /**
      * @return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4976a67b/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java b/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
index 7df2dfd..2c592cd 100644
--- a/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
+++ b/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
@@ -63,7 +63,7 @@ public class VpcGatewayVO implements VpcGateway {
     long zoneId;
     
     @Column(name="network_id")
-    Long networkId;
+    long networkId;
     
     @Column(name=GenericDao.CREATED_COLUMN)
     Date created;
@@ -110,7 +110,7 @@ public class VpcGatewayVO implements VpcGateway {
      * @param account_id
      * @param sourceNat
      */
-    public VpcGatewayVO(String ip4Address, Type type, Long vpcId, long zoneId, Long networkId,
String vlanTag, 
+    public VpcGatewayVO(String ip4Address, Type type, long vpcId, long zoneId, long networkId,
String vlanTag, 
             String gateway, String netmask, long accountId, long domainId, boolean sourceNat,
long networkACLId) {
         this.ip4Address = ip4Address;
         this.type = type;
@@ -160,7 +160,7 @@ public class VpcGatewayVO implements VpcGateway {
     }
 
     @Override
-    public Long getNetworkId() {
+    public long getNetworkId() {
         return networkId;
     }
     

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4976a67b/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDao.java b/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDao.java
index 42144b6..55fc2af 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDao.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDao.java
@@ -16,16 +16,15 @@
 // under the License.
 package com.cloud.network.vpc.dao;
 
+import java.util.List;
+
 import com.cloud.network.vpc.VpcGateway;
 import com.cloud.network.vpc.VpcGatewayVO;
 import com.cloud.utils.db.GenericDao;
 
-import java.util.List;
-
 
 public interface VpcGatewayDao extends GenericDao<VpcGatewayVO, Long>{
     VpcGatewayVO getPrivateGatewayForVpc(long vpcId);
-    VpcGatewayVO getVpnGatewayForVpc(long vpcId);
 
     Long getNetworkAclIdForPrivateIp(long vpcId, long networkId, String ipaddr);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4976a67b/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDaoImpl.java b/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDaoImpl.java
index a8cb2b3..13c37c4 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/VpcGatewayDaoImpl.java
@@ -55,14 +55,6 @@ public class VpcGatewayDaoImpl extends GenericDaoBase<VpcGatewayVO,
Long> implem
         return findOneBy(sc);
     }
 
-    @Override
-    public VpcGatewayVO getVpnGatewayForVpc(long vpcId) {
-        SearchCriteria<VpcGatewayVO> sc = AllFieldsSearch.create();
-        sc.setParameters("vpcId", vpcId);
-        sc.setParameters("type", VpcGateway.Type.Vpn);
-
-        return findOneBy(sc);
-    }
 
     @Override
     public Long getNetworkAclIdForPrivateIp (long vpcId, long networkId, String ipaddr) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4976a67b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/element/VpcVirtualRouterElement.java b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
index 979d8fe..500e13f 100644
--- a/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
+++ b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
@@ -448,7 +448,6 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements
Vpc
 
     @Override
     public boolean applyACLItemsToPrivateGw(PrivateGateway gateway,List<? extends NetworkACLItem>
rules) throws ResourceUnavailableException {
-        VpcGatewayVO vpcGatewayVo = _vpcGatewayDao.findById(gateway.getId());
         Network config = _networkDao.findById(gateway.getNetworkId());
         boolean isPrivateGateway = true;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4976a67b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
index d6480cd..74ce002 100644
--- a/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
+++ b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
@@ -57,7 +57,7 @@ public class PrivateGatewayProfile implements PrivateGateway {
     }
 
     @Override
-    public Long getNetworkId() {
+    public long getNetworkId() {
         return vpcGateway.getNetworkId();
     }
 


Mime
View raw message