mirror of https://github.com/apache/jclouds.git
Issue 710: public templates are now readable
This commit is contained in:
parent
3871255ccc
commit
c964b207a7
|
@ -81,7 +81,11 @@ public class HardwareForVAppTemplate implements Function<VAppTemplate, Hardware>
|
|||
}
|
||||
VirtualHardwareSection hardware = Iterables.get(ovf.getVirtualSystem().getVirtualHardwareSections(), 0);
|
||||
HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
|
||||
builder.location(findLocationForResource.apply(checkNotNull(from.getVDC(), "VDC")));
|
||||
if (from.getVDC() != null) {
|
||||
builder.location(findLocationForResource.apply(from.getVDC()));
|
||||
} else {
|
||||
// otherwise, it could be in a public catalog, which is not assigned to a VDC
|
||||
}
|
||||
builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
|
||||
ImagePredicates.idEquals(from.getHref().toASCIIString()));
|
||||
return builder.build();
|
||||
|
|
|
@ -53,7 +53,11 @@ public class ImageForVAppTemplate implements Function<VAppTemplate, Image> {
|
|||
builder.ids(from.getHref().toASCIIString());
|
||||
builder.uri(from.getHref());
|
||||
builder.name(from.getName());
|
||||
builder.location(findLocationForResource.apply(checkNotNull(from.getVDC(), "VDC")));
|
||||
if (from.getVDC() != null) {
|
||||
builder.location(findLocationForResource.apply(from.getVDC()));
|
||||
} else {
|
||||
// otherwise, it could be in a public catalog, which is not assigned to a VDC
|
||||
}
|
||||
builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
|
||||
Envelope ovf = client.getVAppTemplateClient().getOvfEnvelopeForVAppTemplate(from.getHref());
|
||||
builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf));
|
||||
|
|
Loading…
Reference in New Issue