"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "clc/modules/imaging-common/src/main/java/com/eucalyptus/imaging/manifest/DownloadManifestFactory.java" between
eucalyptus-4.4.1.tar.gz and eucalyptus-4.4.2.tar.gz

About: Eucalyptus (Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems) is an infrastructure for implementing "cloud computing" on clusters (compatible with Amazon’s EC2 interface, but designed to support multiple client-side interfaces).

DownloadManifestFactory.java  (eucalyptus-4.4.1):DownloadManifestFactory.java  (eucalyptus-4.4.2)
skipping to change at line 333 skipping to change at line 333
} }
for (int i = 0; i < parts.getLength(); i++) { for (int i = 0; i < parts.getLength(); i++) {
Node part = parts.item(i); Node part = parts.item(i);
String partIndex = part.getAttributes().getNamedItem("index") String partIndex = part.getAttributes().getNamedItem("index")
.getNodeValue(); .getNodeValue();
String partKey = ((Node) xpath.evaluate(baseManifest.getManifestType() String partKey = ((Node) xpath.evaluate(baseManifest.getManifestType()
.getPartUrlElement(), part, XPathConstants.NODE)).getTextContent(); .getPartUrlElement(), part, XPathConstants.NODE)).getTextContent();
String partDownloadUrl = partKey; String partDownloadUrl = partKey;
if (baseManifest.getManifestType().signPartUrl()) { if (baseManifest.getManifestType().signPartUrl()) {
final String bucket = baseManifest.getBaseBucket( );
final String prefix = baseManifest.getPrefix( );
final String key = prefix.isEmpty( ) ? partKey : prefix + "/" + partKe
y;
GeneratePresignedUrlRequest generatePresignedUrlRequest = new Generate PresignedUrlRequest( GeneratePresignedUrlRequest generatePresignedUrlRequest = new Generate PresignedUrlRequest(
baseManifest.getBaseBucket(), partKey, HttpMethod.GET); bucket, key, HttpMethod.GET);
generatePresignedUrlRequest.setExpiration(expiration); generatePresignedUrlRequest.setExpiration(expiration);
URL s = s3Client.generatePresignedUrl(generatePresignedUrlRequest); URL s = s3Client.generatePresignedUrl(generatePresignedUrlRequest);
partDownloadUrl = s.toString(); partDownloadUrl = s.toString();
} else { } else {
// validate url per EUCA-9144 // validate url per EUCA-9144
if (!urlValidator.isEucalyptusUrl(partDownloadUrl)) if (!urlValidator.isEucalyptusUrl(partDownloadUrl))
throw new DownloadManifestException( throw new DownloadManifestException(
"Some parts in the manifest are not stored in the OS. Its locati on is outside Eucalyptus:" "Some parts in the manifest are not stored in the OS. Its locati on is outside Eucalyptus:"
+ partDownloadUrl); + partDownloadUrl);
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)