Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62780467 --- 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) { + return true; + } + } else if (!vpcServices.isEmpty()) { --- End diff -- Since this condition and the previous both return ``true``, why not combine them?
--- 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. ---