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/4.4 to dceaa7c
Date Wed, 23 Apr 2014 01:09:35 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 eb877a093 -> dceaa7cce


Revert "Return isolation methods as a part of listPhysicalNetworks call"

This reverts commit eb877a093c7e7f0f28029aedf6bd3061867a01b3.


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

Branch: refs/heads/4.4
Commit: dceaa7cceff5c9c7db1b3df2ba6bad95e0f86edd
Parents: eb877a0
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Tue Apr 22 18:06:33 2014 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Tue Apr 22 18:06:33 2014 -0700

----------------------------------------------------------------------
 .../dao/PhysicalNetworkIsolationMethodDao.java  | 39 --------------------
 .../PhysicalNetworkIsolationMethodDaoImpl.java  |  7 ++--
 server/src/com/cloud/api/ApiDBUtils.java        | 10 -----
 server/src/com/cloud/api/ApiResponseHelper.java |  2 +-
 4 files changed, 4 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dceaa7cc/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDao.java
b/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDao.java
deleted file mode 100644
index a4e1bd5..0000000
--- a/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDao.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 Citrix Systems, Inc. Licensed under the
-// Apache License, Version 2.0 (the "License"); you may not use this
-// file except in compliance with the License.  Citrix Systems, Inc.
-// reserves all rights not expressly granted by the License.
-// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Automatically generated by addcopyright.py at 04/03/2012
-package com.cloud.network.dao;
-
-import java.util.List;
-
-import com.cloud.utils.db.GenericDao;
-
-public interface PhysicalNetworkIsolationMethodDao extends GenericDao<PhysicalNetworkIsolationMethodVO,
Long>{
-
-    /**
-     * @param physicalNetworkId
-     * @return
-     */
-    List<String> getAllIsolationMethod(long physicalNetworkId);
-
-    /**
-     * @param physicalNetworkId
-     * @return
-     */
-    String getIsolationMethod(long physicalNetworkId);
-
-    /**
-     * @param physicalNetworkId
-     * @return
-     */
-    int clearIsolationMethods(long physicalNetworkId);
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dceaa7cc/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDaoImpl.java
b/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDaoImpl.java
index a22548a..11b4399 100644
--- a/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/PhysicalNetworkIsolationMethodDaoImpl.java
@@ -20,6 +20,7 @@ import java.util.List;
 
 import org.springframework.stereotype.Component;
 
+import com.cloud.utils.db.GenericDao;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.GenericSearchBuilder;
 import com.cloud.utils.db.SearchBuilder;
@@ -27,7 +28,8 @@ import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
 
 @Component
-public class PhysicalNetworkIsolationMethodDaoImpl extends GenericDaoBase<PhysicalNetworkIsolationMethodVO,
Long> implements PhysicalNetworkIsolationMethodDao {
+public class PhysicalNetworkIsolationMethodDaoImpl extends GenericDaoBase<PhysicalNetworkIsolationMethodVO,
Long> implements
+        GenericDao<PhysicalNetworkIsolationMethodVO, Long> {
     private final GenericSearchBuilder<PhysicalNetworkIsolationMethodVO, String> IsolationMethodSearch;
     private final SearchBuilder<PhysicalNetworkIsolationMethodVO> AllFieldsSearch;
 
@@ -45,7 +47,6 @@ public class PhysicalNetworkIsolationMethodDaoImpl extends GenericDaoBase<Physic
         AllFieldsSearch.done();
     }
 
-    @Override
     public List<String> getAllIsolationMethod(long physicalNetworkId) {
         SearchCriteria<String> sc = IsolationMethodSearch.create();
         sc.setParameters("physicalNetworkId", physicalNetworkId);
@@ -53,7 +54,6 @@ public class PhysicalNetworkIsolationMethodDaoImpl extends GenericDaoBase<Physic
         return customSearch(sc, null);
     }
 
-    @Override
     public String getIsolationMethod(long physicalNetworkId) {
         SearchCriteria<String> sc = IsolationMethodSearch.create();
         sc.setParameters("physicalNetworkId", physicalNetworkId);
@@ -61,7 +61,6 @@ public class PhysicalNetworkIsolationMethodDaoImpl extends GenericDaoBase<Physic
         return customSearch(sc, null).get(0);
     }
 
-    @Override
     public int clearIsolationMethods(long physicalNetworkId) {
         SearchCriteria<PhysicalNetworkIsolationMethodVO> sc = AllFieldsSearch.create();
         sc.setParameters("physicalNetworkId", physicalNetworkId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dceaa7cc/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index ca25d66..2da107f 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -181,7 +181,6 @@ import com.cloud.network.dao.NetworkRuleConfigDao;
 import com.cloud.network.dao.NetworkRuleConfigVO;
 import com.cloud.network.dao.NetworkVO;
 import com.cloud.network.dao.PhysicalNetworkDao;
-import com.cloud.network.dao.PhysicalNetworkIsolationMethodDao;
 import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
 import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
 import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
@@ -410,7 +409,6 @@ public class ApiDBUtils {
     static ResourceMetaDataService s_resourceDetailsService;
     static HostGpuGroupsDao s_hostGpuGroupsDao;
     static VGPUTypesDao s_vgpuTypesDao;
-    static PhysicalNetworkIsolationMethodDao s_pNtwkIsolatinoMethodsDao;
 
     @Inject
     private ManagementServer ms;
@@ -633,8 +631,6 @@ public class ApiDBUtils {
     private HostGpuGroupsDao hostGpuGroupsDao;
     @Inject
     private VGPUTypesDao vgpuTypesDao;
-    @Inject
-    private PhysicalNetworkIsolationMethodDao pNtwkIsolatinoMethodsDao;
 
     @PostConstruct
     void init() {
@@ -749,7 +745,6 @@ public class ApiDBUtils {
         s_resourceDetailsService = resourceDetailsService;
         s_hostGpuGroupsDao = hostGpuGroupsDao;
         s_vgpuTypesDao = vgpuTypesDao;
-        s_pNtwkIsolatinoMethodsDao = pNtwkIsolatinoMethodsDao;
     }
 
     // ///////////////////////////////////////////////////////////
@@ -1840,9 +1835,4 @@ public class ApiDBUtils {
     public static List<ResourceTagJoinVO> listResourceTagViewByResourceUUID(String
resourceUUID, ResourceObjectType resourceType) {
         return s_tagJoinDao.listBy(resourceUUID, resourceType);
     }
-
-    public static List<String> getIsolationMethodsForPhysicalNtwk(long pNtwkId) {
-        return s_pNtwkIsolatinoMethodsDao.getAllIsolationMethod(pNtwkId);
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dceaa7cc/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 74ccf29..1155d1f 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2465,7 +2465,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         if (result.getBroadcastDomainRange() != null) {
             response.setBroadcastDomainRange(result.getBroadcastDomainRange().toString());
         }
-        response.setIsolationMethods(ApiDBUtils.getIsolationMethodsForPhysicalNtwk(result.getId()));
+        response.setIsolationMethods(result.getIsolationMethods());
         response.setTags(result.getTags());
         if (result.getState() != null) {
             response.setState(result.getState().toString());


Mime
View raw message