cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [1/2] git commit: updated refs/heads/4.3 to 78b9d5c
Date Wed, 01 Jan 2014 11:36:39 GMT
Updated Branches:
  refs/heads/4.3 0b643ddf0 -> 78b9d5cda
  refs/heads/master faa503d6f -> 79dc74dcb


CLOUDSTACK-5698: support network ACL list search by keyword


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

Branch: refs/heads/4.3
Commit: 78b9d5cda208f052d522c740871873ecd366cf2a
Parents: 0b643dd
Author: Kishan Kavala <kishan@cloud.com>
Authored: Wed Jan 1 16:51:53 2014 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Wed Jan 1 16:52:05 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/78b9d5cd/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
index 6677338..37f1c39 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
@@ -118,6 +118,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
         String name = cmd.getName();
         Long networkId = cmd.getNetworkId();
         Long vpcId = cmd.getVpcId();
+        String keyword = cmd.getKeyword();
         SearchBuilder<NetworkACLVO> sb = _networkACLDao.createSearchBuilder();
         sb.and("id", sb.entity().getId(), Op.EQ);
         sb.and("name", sb.entity().getName(), Op.EQ);
@@ -132,6 +133,14 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
         }
 
         SearchCriteria<NetworkACLVO> sc = sb.create();
+
+        if (keyword != null) {
+            SearchCriteria<NetworkACLVO> ssc = _networkACLDao.createSearchCriteria();
+            ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
+            ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%");
+            sc.addAnd("name", SearchCriteria.Op.SC, ssc);
+        }
+
         if(id != null){
             sc.setParameters("id", id);
         }


Mime
View raw message