cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [1/2] git commit: updated refs/heads/4.4 to 49cf2ac
Date Tue, 16 Dec 2014 09:51:31 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 2f2ff4bfc -> 49cf2ac91


CLOUDSTACK-8073 load cidrs on create response


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

Branch: refs/heads/4.4
Commit: 02feb0180a55dd5fabca7aa37d72ef85619a5860
Parents: 2f2ff4b
Author: Daan Hoogland <daan@onecht.net>
Authored: Mon Dec 15 15:58:42 2014 +0100
Committer: Daan Hoogland <daan@onecht.net>
Committed: Mon Dec 15 15:58:42 2014 +0100

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiDBUtils.java        | 9 +++++++++
 server/src/com/cloud/api/ApiResponseHelper.java | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02feb018/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 90a09a0..4895d91 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -201,6 +201,7 @@ import com.cloud.network.security.SecurityGroupManager;
 import com.cloud.network.security.SecurityGroupVO;
 import com.cloud.network.security.dao.SecurityGroupDao;
 import com.cloud.network.vpc.NetworkACL;
+import com.cloud.network.vpc.NetworkACLItemCidrsDao;
 import com.cloud.network.vpc.StaticRouteVO;
 import com.cloud.network.vpc.VpcGatewayVO;
 import com.cloud.network.vpc.VpcManager;
@@ -357,6 +358,7 @@ public class ApiDBUtils {
     static ConfigurationDao s_configDao;
     static ConsoleProxyDao s_consoleProxyDao;
     static FirewallRulesCidrsDao s_firewallCidrsDao;
+    static NetworkACLItemCidrsDao s_networkACLItemCidrsDao;
     static VMInstanceDao s_vmDao;
     static ResourceLimitService s_resourceLimitMgr;
     static ProjectService s_projectMgr;
@@ -524,6 +526,8 @@ public class ApiDBUtils {
     @Inject
     private FirewallRulesCidrsDao firewallCidrsDao;
     @Inject
+    private NetworkACLItemCidrsDao networkACLItemCidrsDao;
+    @Inject
     private VMInstanceDao vmDao;
     @Inject
     private ResourceLimitService resourceLimitMgr;
@@ -692,6 +696,7 @@ public class ApiDBUtils {
         s_configDao = configDao;
         s_consoleProxyDao = consoleProxyDao;
         s_firewallCidrsDao = firewallCidrsDao;
+        s_networkACLItemCidrsDao = networkACLItemCidrsDao;
         s_vmDao = vmDao;
         s_resourceLimitMgr = resourceLimitMgr;
         s_projectMgr = projectMgr;
@@ -1241,6 +1246,10 @@ public class ApiDBUtils {
         return s_firewallCidrsDao.getSourceCidrs(id);
     }
 
+    public static List<String> findNetworkAclItemSourceCidrs(long id) {
+        return s_networkACLItemCidrsDao.getCidrs(id);
+    }
+
     public static Account getProjectOwner(long projectId) {
         return s_projectMgr.getProjectOwner(projectId);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02feb018/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 37cb155..df4cca8 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2349,7 +2349,8 @@ public class ApiResponseHelper implements ResponseGenerator {
             response.setEndPort(Integer.toString(aclItem.getSourcePortEnd()));
         }
 
-        response.setCidrList(StringUtils.join(aclItem.getSourceCidrList(), ","));
+        List<String> cidrs = ApiDBUtils.findNetworkAclItemSourceCidrs(aclItem.getId());
+        response.setCidrList(StringUtils.join(cidrs, ","));
 
         response.setTrafficType(aclItem.getTrafficType().toString());
 


Mime
View raw message