Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1579#discussion_r90451818 --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java --- @@ -387,41 +400,39 @@ public boolean canEnableIndividualServices() { @Override public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException { - if (!canHandle(network, Service.Connectivity)) { - return false; - } - - return true; + return canHandle(network, Service.Connectivity); } @Override public boolean verifyServicesCombination(Set<Service> services) { - // This element can only function in a NuageVsp based - // SDN network, so Connectivity needs to be present here - if (!services.contains(Service.Connectivity)) { - s_logger.warn("Unable to support services combination without Connectivity service provided by Nuage VSP."); - return false; + final Sets.SetView<Service> missingServices = Sets.difference(REQUIRED_SERVICES, services); + final Sets.SetView<Service> unsupportedServices = Sets.intersection(UNSUPPORTED_SERVICES, services); + final Sets.SetView<Service> wantedServices = Sets.intersection(NUAGE_ONLY_SERVICES, new HashSet<>()); + + if (!missingServices.isEmpty()) { + throw new UnsupportedServiceException("Provider " + Provider.NuageVsp + " requires services: " + missingServices); } - if (!services.contains(Service.SourceNat)) { - s_logger.warn("Unable to support services combination without SourceNat service provided by Nuage VSP."); + if (!unsupportedServices.isEmpty()) { + // NuageVsp doesn't implement any of these services. + // So if these services are requested, we can't handle it. + s_logger.debug("Unable to support services combination. The services " + unsupportedServices + " are not supported by Nuage VSP."); --- End diff -- Should this message logged as at `WARN` instead of `DEBUG`?
--- 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. ---