cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/master to b5db68e
Date Fri, 01 Aug 2014 23:24:23 GMT
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 <sudison@gmail.com>
Authored: Fri Aug 1 16:23:30 2014 -0700
Committer: Edison Su <sudison@gmail.com>
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<StoragePoolDiscoverer> _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<? extends StoragePool, Map<String, String>> 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<? extends StoragePool, Map<String, String>>
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) {


Mime
View raw message