Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66F7DD773 for ; Tue, 8 Jan 2013 00:41:30 +0000 (UTC) Received: (qmail 49171 invoked by uid 500); 8 Jan 2013 00:41:20 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 49086 invoked by uid 500); 8 Jan 2013 00:41:20 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 48189 invoked by uid 99); 8 Jan 2013 00:41:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2013 00:41:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1AAD511159; Tue, 8 Jan 2013 00:41:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [29/54] [abbrv] git commit: Summary: Make canHandle protected Message-Id: <20130108004119.1AAD511159@tyr.zones.apache.org> Date: Tue, 8 Jan 2013 00:41:19 +0000 (UTC) Summary: Make canHandle protected Change access to canHandle so it's easier to unittest. Make a note that answers can be null if the host is down, there should be a way to deal with this, but for now an NPE is an adequate indication that something is wrong. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/6cf0c568 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/6cf0c568 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/6cf0c568 Branch: refs/heads/ui-quick-view-v2 Commit: 6cf0c5683d518bd6dcd6c51bfa0290e96c6804f3 Parents: 9122809 Author: Hugo Trippaers Authored: Thu Jan 3 11:47:40 2013 +0100 Committer: Hugo Trippaers Committed: Thu Jan 3 11:56:26 2013 +0100 ---------------------------------------------------------------------- .../cloud/network/element/NiciraNvpElement.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6cf0c568/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java ---------------------------------------------------------------------- diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java index b1e9af2..0a7d042 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java +++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java @@ -173,7 +173,7 @@ public class NiciraNvpElement extends AdapterBase implements return Provider.NiciraNvp; } - private boolean canHandle(Network network, Service service) { + protected boolean canHandle(Network network, Service service) { s_logger.debug("Checking if NiciraNvpElement can handle service " + service.getName() + " on network " + network.getDisplayText()); if (network.getBroadcastDomainType() != BroadcastDomainType.Lswitch) { @@ -845,6 +845,7 @@ public class NiciraNvpElement extends AdapterBase implements ConfigurePublicIpsOnLogicalRouterCommand cmd = new ConfigurePublicIpsOnLogicalRouterCommand(routermapping.getLogicalRouterUuid(), niciraNvpHost.getDetail("l3gatewayserviceuuid"), cidrs); ConfigurePublicIpsOnLogicalRouterAnswer answer = (ConfigurePublicIpsOnLogicalRouterAnswer) _agentMgr.easySend(niciraNvpHost.getId(), cmd); + //FIXME answer can be null if the host is down return answer.getResult(); } else {