Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moving the description files so that they will not be in the image li…

…sting
  • Loading branch information...
commit cdf31de2d78dbc16a30d9e340e5ca7559deebb6b 1 parent 8a21ac3
@buzztroll buzztroll authored
View
29 service/client/java/source/src/org/globus/workspace/cloud/client/util/CumulusTask.java
@@ -607,6 +607,7 @@ public void uploadVM(
throws ExecutionProblem
{
S3Service s3Service = null;
+ boolean rw = true;
try
{
AccessControlList acl = null;
@@ -651,6 +652,7 @@ public void uploadVM(
if (pr != null) {
pr.println("Setting permissions for common use.");
}
+ rw = false;
acl = AccessControlList.REST_CANNED_PUBLIC_READ;
s3Object.setAcl(acl);
}
@@ -661,7 +663,8 @@ public void uploadVM(
if(description != null)
{
- String descObjName = key + this.descSuffix;
+ String descObjName = getDescriptionFileKey(vmName, rw);
+
S3Object descObj = new S3Object(descObjName, description);
if (acl != null)
{
@@ -992,22 +995,28 @@ public String getImagePath(
}
}
+ private String getDescriptionFileKey(String name, boolean rw)
+ {
+ String ID = "common";
+ if(rw)
+ {
+ ID = this.args.getXferCanonicalID();
+ }
+ String baseKey = this.args.getXferS3BaseKey() + this.descSuffix;
+ String key = baseKey + "/" + ID + "/" + name;
+
+ return key;
+ }
+
private String s3DownloadImageDescription(String name, boolean rw, S3Service s3Service)
throws ExecutionProblem
{
String description = null;
- String descriptionName = name + this.descSuffix;
try
{
- String baseBucketName = this.args.getS3Bucket();
- String ID = "common";
- if(rw)
- {
- ID = this.args.getXferCanonicalID();
- }
- String baseKey = this.args.getXferS3BaseKey();
- String key = baseKey + "/" + ID + "/" + descriptionName;
+ String baseBucketName = this.args.getS3Bucket();
+ String key = getDescriptionFileKey(name, rw);
s3Service = this.getService();
S3Object s3Object = s3Service.getObject(baseBucketName, key);
Please sign in to comment.
Something went wrong with that request. Please try again.