Github user abhinandanprateek commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1371#discussion_r62835972
  
    --- Diff: 
engine/schema/src/com/cloud/network/vpc/dao/VpcServiceMapDaoImpl.java ---
    @@ -62,7 +62,31 @@ protected VpcServiceMapDaoImpl() {
     
         @Override
         public boolean areServicesSupportedInVpc(long vpcId, Service... 
services) {
    -        // TODO Auto-generated method stub
    +        SearchCriteria<VpcServiceMapVO> sc = 
MultipleServicesSearch.create();
    +        sc.setParameters("vpcId", vpcId);
    +
    +        if (services != null) {
    +            String[] servicesStr = new String[services.length];
    +
    +            int i = 0;
    +            for (Service service : services) {
    +                servicesStr[i] = service.getName();
    +                i++;
    +            }
    +
    +            sc.setParameters("service", (Object[])servicesStr);
    +        }
    +
    +        List<VpcServiceMapVO> vpcServices = listBy(sc);
    +
    +        if (services != null) {
    +            if (vpcServices.size() == services.length) {
    --- End diff --
    
    listBy is going to query the services that are send to the function. So if 
all the services queried for are present the dao should return that many rows.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to