incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [31/34] git commit: refs/heads/ui-ntier2 - Summary: Remove unused createFileBasedStoragePool from LibvirtStorageAdaptor
Date Wed, 13 Mar 2013 20:21:34 GMT
Summary: Remove unused createFileBasedStoragePool from LibvirtStorageAdaptor

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363154115 -0600


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/1f28e644
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1f28e644
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1f28e644

Branch: refs/heads/ui-ntier2
Commit: 1f28e644a3e66bed8702fab5f09d6d319d8a8330
Parents: 6715f98
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Mar 12 23:55:15 2013 -0600
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Mar 12 23:55:15 2013 -0600

----------------------------------------------------------------------
 .../kvm/storage/LibvirtStorageAdaptor.java         |   52 ---------------
 1 files changed, 0 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1f28e644/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index d350ef9..070c132 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -293,58 +293,6 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
         return parser.parseStorageVolumeXML(volDefXML);
     }
 
-    public StoragePool createFileBasedStoragePool(Connect conn,
-            String localStoragePath, String uuid) {
-        if (!(_storageLayer.exists(localStoragePath) && _storageLayer
-                .isDirectory(localStoragePath))) {
-            return null;
-        }
-
-        File path = new File(localStoragePath);
-        if (!(path.canWrite() && path.canRead() && path.canExecute())) {
-            return null;
-        }
-
-        StoragePool pool = null;
-
-        try {
-            pool = conn.storagePoolLookupByUUIDString(uuid);
-        } catch (LibvirtException e) {
-
-        }
-
-        if (pool == null) {
-            LibvirtStoragePoolDef spd = new LibvirtStoragePoolDef(poolType.DIR,
-                    uuid, uuid, null, null, localStoragePath);
-            try {
-                pool = conn.storagePoolDefineXML(spd.toString(), 0);
-                pool.create(0);
-            } catch (LibvirtException e) {
-                if (pool != null) {
-                    try {
-                        pool.destroy();
-                        pool.undefine();
-                    } catch (LibvirtException e1) {
-                    }
-                    pool = null;
-                }
-                throw new CloudRuntimeException(e.toString());
-            }
-        }
-
-        try {
-            StoragePoolInfo spi = pool.getInfo();
-            if (spi.state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
-                pool.create(0);
-            }
-
-        } catch (LibvirtException e) {
-            throw new CloudRuntimeException(e.toString());
-        }
-
-        return pool;
-    }
-
     @Override
     public KVMStoragePool getStoragePool(String uuid) {
         StoragePool storage = null;


Mime
View raw message