Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D8A20200BD4 for ; Thu, 1 Dec 2016 15:49:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D7445160B0F; Thu, 1 Dec 2016 14:49:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2E068160B0B for ; Thu, 1 Dec 2016 15:49:57 +0100 (CET) Received: (qmail 29901 invoked by uid 500); 1 Dec 2016 14:49:54 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 29054 invoked by uid 99); 1 Dec 2016 14:49:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2016 14:49:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 628BDE09CD; Thu, 1 Dec 2016 14:49:53 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1579: CLOUDSTACK-9403 : Support for shared networks... Content-Type: text/plain Message-Id: <20161201144953.628BDE09CD@git1-us-west.apache.org> Date: Thu, 1 Dec 2016 14:49:53 +0000 (UTC) archived-at: Thu, 01 Dec 2016 14:49:58 -0000 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 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 missingServices = Sets.difference(REQUIRED_SERVICES, services); + final Sets.SetView unsupportedServices = Sets.intersection(UNSUPPORTED_SERVICES, services); + final Sets.SetView 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---