Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E0EC1141B for ; Fri, 1 Aug 2014 23:24:24 +0000 (UTC) Received: (qmail 60909 invoked by uid 500); 1 Aug 2014 23:24:23 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 60879 invoked by uid 500); 1 Aug 2014 23:24:23 -0000 Mailing-List: contact commits-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 commits@cloudstack.apache.org Received: (qmail 60870 invoked by uid 99); 1 Aug 2014 23:24:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 23:24:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 855D39BEC79; Fri, 1 Aug 2014 23:24:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: commits@cloudstack.apache.org Message-Id: <64b9c32776ff4ab18724489ec7ddac8a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to b5db68e Date: Fri, 1 Aug 2014 23:24:23 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/master 685a58a84 -> b5db68e2d CLOUDSTACK-7226: in case lun number is not provided, addprimarystorage cmd should report error instead of NPE Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b5db68e2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b5db68e2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b5db68e2 Branch: refs/heads/master Commit: b5db68e2d1aa8e44b01a4298ffd2696987606afd Parents: 685a58a Author: Edison Su Authored: Fri Aug 1 16:23:30 2014 -0700 Committer: Edison Su Committed: Fri Aug 1 16:23:30 2014 -0700 ---------------------------------------------------------------------- .../CloudStackPrimaryDataStoreLifeCycleImpl.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b5db68e2/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java ---------------------------------------------------------------------- diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java index 49eb8ef..ca60bc1 100644 --- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java +++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java @@ -80,7 +80,6 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore private static final Logger s_logger = Logger.getLogger(CloudStackPrimaryDataStoreLifeCycleImpl.class); @Inject protected ResourceManager _resourceMgr; - protected List _discoverers; @Inject PrimaryDataStoreDao primaryDataStoreDao; @Inject @@ -260,19 +259,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore parameters.setPort(port); parameters.setPath(hostPath); } else { - for (StoragePoolDiscoverer discoverer : _discoverers) { - Map> pools; - try { - pools = discoverer.find(zoneId, podId, uri, details); - } catch (DiscoveryException e) { - throw new IllegalArgumentException("Not enough information for discovery " + uri, e); - } - if (pools != null) { - Map.Entry> entry = pools.entrySet().iterator().next(); - details = entry.getValue(); - break; - } - } + throw new IllegalArgumentException("iSCSI needs to have LUN number"); } } else if (scheme.equalsIgnoreCase("iso")) { if (port == -1) {