You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/06/08 01:49:10 UTC

git commit: updated refs/heads/object_store to 83b080c

Updated Branches:
  refs/heads/object_store 1d6ed8ac2 -> 83b080c4b


Fix a path bug in s3ListTemplate and s3ListVolume, path should include
filename.

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

Branch: refs/heads/object_store
Commit: 83b080c4b3d6b643a180a59d6c47b90d0ad4f4c3
Parents: 1d6ed8a
Author: Min Chen <mi...@citrix.com>
Authored: Fri Jun 7 16:48:47 2013 -0700
Committer: Min Chen <mi...@citrix.com>
Committed: Fri Jun 7 16:48:47 2013 -0700

----------------------------------------------------------------------
 .../resource/NfsSecondaryStorageResource.java      |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83b080c4/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index ff20800..2fca6c0 100755
--- a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -1362,10 +1362,10 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
         Map<String, TemplateProp> tmpltInfos = new HashMap<String, TemplateProp>();
         for (S3ObjectSummary objectSummary : objectSummaries) {
             String key = objectSummary.getKey();
-            String installPath = StringUtils.substringBeforeLast(key, S3Utils.SEPARATOR);
+            //String installPath = StringUtils.substringBeforeLast(key, S3Utils.SEPARATOR);
             String uniqueName = this.determineS3TemplateNameFromKey(key);
             // TODO: isPublic value, where to get?
-            TemplateProp tInfo = new TemplateProp(uniqueName, installPath, objectSummary.getSize(), objectSummary.getSize(), true, false);
+            TemplateProp tInfo = new TemplateProp(uniqueName, key, objectSummary.getSize(), objectSummary.getSize(), true, false);
             tmpltInfos.put(uniqueName, tInfo);
         }
         return tmpltInfos;
@@ -1381,10 +1381,10 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
         Map<Long, TemplateProp> tmpltInfos = new HashMap<Long, TemplateProp>();
         for (S3ObjectSummary objectSummary : objectSummaries) {
             String key = objectSummary.getKey();
-            String installPath = StringUtils.substringBeforeLast(key, S3Utils.SEPARATOR);
+            //String installPath = StringUtils.substringBeforeLast(key, S3Utils.SEPARATOR);
             Long id = this.determineS3VolumeIdFromKey(key);
             // TODO: how to get volume template name
-            TemplateProp tInfo = new TemplateProp(id.toString(), installPath, objectSummary.getSize(), objectSummary.getSize(), true, false);
+            TemplateProp tInfo = new TemplateProp(id.toString(), key, objectSummary.getSize(), objectSummary.getSize(), true, false);
             tmpltInfos.put(id, tInfo);
         }
         return tmpltInfos;