cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [5/5] git commit: updated refs/heads/object_store to 99dcb23
Date Tue, 30 Apr 2013 02:38:14 GMT
fix build


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

Branch: refs/heads/object_store
Commit: 99dcb23b1c8bd3134d8b0bbbe9aa7c6acc44ada2
Parents: 2f68917
Author: Edison Su <sudison@gmail.com>
Authored: Mon Apr 29 19:37:47 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Mon Apr 29 19:37:47 2013 -0700

----------------------------------------------------------------------
 .../driver/CloudStackImageStoreDriverImpl.java     |    6 +++---
 .../datastore/driver/S3ImageStoreDriverImpl.java   |    7 ++-----
 .../driver/SwiftImageStoreDriverImpl.java          |    7 ++-----
 .../driver/SamplePrimaryDataStoreDriverImpl.java   |   10 +++++-----
 .../apache/cloudstack/storage/test/VolumeTest.java |    2 +-
 5 files changed, 13 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dcb23b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
index 277cbf9..8e1511c 100644
--- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
+++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
@@ -335,12 +335,12 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver
{
     	}
 
     	try {
-    		String secondaryStoragePoolUrl = secStore.getUri();
+    		/*String secondaryStoragePoolUrl = secStore.getUri();
     		Long dcId = snapshot.getDataCenterId();
     		Long accountId = snapshot.getAccountId();
     		Long volumeId = snapshot.getVolumeId();
 
-    		String backupOfSnapshot = snapshotObj.getBackupSnapshotId();
+    		String backupOfSnapshot = snapshotObj;
     		if (backupOfSnapshot == null) {
     			callback.complete(result);
     			return;
@@ -357,7 +357,7 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver
{
     			snapshotDao.update(snapshotObj.getId(), snapshot);
     		} else if (answer != null) {
     			result.setResult(answer.getDetails());
-    		}
+    		}*/
     	} catch (Exception e) {
     		s_logger.debug("failed to delete snapshot: " + snapshotObj.getId() + ": " + e.toString());
     		result.setResult(e.toString());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dcb23b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
index f3aefe0..384e7f0 100644
--- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
+++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
@@ -298,7 +298,7 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
             Long accountId = snapshot.getAccountId();
             Long volumeId = snapshot.getVolumeId();
 
-            String backupOfSnapshot = snapshotObj.getBackupSnapshotId();
+            String backupOfSnapshot = snapshotObj.getPath();
             if (backupOfSnapshot == null) {
                 callback.complete(result);
                 return;
@@ -310,10 +310,7 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
             EndPoint ep = _epSelector.select(secStore);
             Answer answer = ep.sendMessage(cmd);
 
-            if ((answer != null) && answer.getResult()) {
-                snapshot.setBackupSnapshotId(null);
-                snapshotDao.update(snapshotObj.getId(), snapshot);
-            } else if (answer != null) {
+            if (answer != null) {
                 result.setResult(answer.getDetails());
             }
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dcb23b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
index e8009fc..aa0f375 100644
--- a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
+++ b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
@@ -292,7 +292,7 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
             Long accountId = snapshot.getAccountId();
             Long volumeId = snapshot.getVolumeId();
 
-            String backupOfSnapshot = snapshotObj.getBackupSnapshotId();
+            String backupOfSnapshot = snapshotObj.getPath();
             if (backupOfSnapshot == null) {
                 callback.complete(result);
                 return;
@@ -304,10 +304,7 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
             EndPoint ep = _epSelector.select(secStore);
             Answer answer = ep.sendMessage(cmd);
 
-            if ((answer != null) && answer.getResult()) {
-                snapshot.setBackupSnapshotId(null);
-                snapshotDao.update(snapshotObj.getId(), snapshot);
-            } else if (answer != null) {
+            if (answer != null) {
                 result.setResult(answer.getDetails());
             }
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dcb23b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
index 73dfa80..a9226c7 100644
--- a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
+++ b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
@@ -90,7 +90,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     }
 
     public Void createAsyncCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl,
Answer> callback, CreateVolumeContext<CreateCmdResult> context) {
-        CreateCmdResult result = null;
+        /*CreateCmdResult result = null;
         CreateObjectAnswer volAnswer = (CreateObjectAnswer) callback.getResult();
         if (volAnswer.getResult()) {
             result = new CreateCmdResult(volAnswer.getPath(), volAnswer);
@@ -99,7 +99,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
             result.setResult(volAnswer.getDetails());
         }
 
-        context.getParentCallback().complete(result);
+        context.getParentCallback().complete(result);*/
         return null;
     }
 
@@ -177,7 +177,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     public void createAsync(DataObject vol,
             AsyncCompletionCallback<CreateCmdResult> callback) {
         EndPoint ep = selector.select(vol);
-        CreateObjectCommand createCmd = new CreateObjectCommand(vol.getUri());
+        CreateObjectCommand createCmd = new CreateObjectCommand(null);
 
         CreateVolumeContext<CreateCmdResult> context = new CreateVolumeContext<CreateCmdResult>(callback,
vol);
         AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> caller =
AsyncCallbackDispatcher.create(this);
@@ -197,10 +197,10 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
             if (obj.getPath() == null) {
                 //create an obj
                 EndPoint newEp = selector.select(object);
-                CreateObjectCommand createCmd = new CreateObjectCommand(uri);
+                CreateObjectCommand createCmd = new CreateObjectCommand(null);
                 CreateObjectAnswer answer = (CreateObjectAnswer)ep.sendMessage(createCmd);
                 if (answer.getResult()) {
-                    dataObjMgr.update(object, answer.getPath(), answer.getSize());
+                    //dataObjMgr.update(object, answer.getPath(), answer.getSize());
                 } else {
                     s_logger.debug("failed to create object" + answer.getDetails());
                     throw new CloudRuntimeException("failed to create object" + answer.getDetails());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99dcb23b/plugins/storage/volume/solidfire/test/org/apache/cloudstack/storage/test/VolumeTest.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/solidfire/test/org/apache/cloudstack/storage/test/VolumeTest.java
b/plugins/storage/volume/solidfire/test/org/apache/cloudstack/storage/test/VolumeTest.java
index 91bc7ea..5bc929d 100644
--- a/plugins/storage/volume/solidfire/test/org/apache/cloudstack/storage/test/VolumeTest.java
+++ b/plugins/storage/volume/solidfire/test/org/apache/cloudstack/storage/test/VolumeTest.java
@@ -109,7 +109,7 @@ public class VolumeTest {
 		results.add(host);
 		Mockito.when(hostDao.listAll()).thenReturn(results);
 		Mockito.when(hostDao.findHypervisorHostInCluster(Mockito.anyLong())).thenReturn(results);
-		CreateObjectAnswer createVolumeFromImageAnswer = new CreateObjectAnswer(null,UUID.randomUUID().toString(),
null);
+		//CreateObjectAnswer createVolumeFromImageAnswer = new CreateObjectAnswer(null,UUID.randomUUID().toString(),
null);
 
 
 


Mime
View raw message