public static CIMOperatingSystem toComputeOs(Vm vm) { return CIMOperatingSystem.toComputeOs(vm.getOperatingSystemSection()); }
public static CIMOperatingSystem toComputeOs(Vm vm) { return CIMOperatingSystem.toComputeOs(vm.getOperatingSystemSection()); }
public static CIMOperatingSystem toComputeOs(Vm vm) { return CIMOperatingSystem.toComputeOs(vm.getOperatingSystemSection()); }
public static CIMOperatingSystem toComputeOs(Envelope ovf) { return toComputeOs(ovf.getVirtualSystem().getOperatingSystemSection()); }
public static CIMOperatingSystem toComputeOs(Envelope ovf) { return toComputeOs(ovf.getVirtualSystem().getOperatingSystemSection()); }
public static CIMOperatingSystem toComputeOs(Envelope ovf) { return toComputeOs(ovf.getVirtualSystem().getOperatingSystemSection()); }
public static CIMOperatingSystem toComputeOs(Envelope ovf) { return toComputeOs(ovf.getVirtualSystem().getOperatingSystemSection()); }
@Override public Image apply(VAppTemplate from) { checkNotNull(from, "VAppTemplate"); Envelope ovf = templateToEnvelope.apply(from); ImageBuilder builder = new ImageBuilder(); builder.ids(from.getHref().toASCIIString()); builder.uri(from.getHref()); builder.name(from.getName()); Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC)); if (vdc != null) { builder.location(findLocationForResource.apply(vdc)); } 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()); builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf)); builder.status(toPortableImageStatus.get(from.getStatus())); return builder.build(); }
@Override public Image apply(VAppTemplate from) { checkNotNull(from, "VAppTemplate"); Envelope ovf = templateToEnvelope.apply(from); ImageBuilder builder = new ImageBuilder(); builder.ids(from.getHref().toASCIIString()); builder.uri(from.getHref()); builder.name(from.getName()); Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC)); if (vdc != null) { builder.location(findLocationForResource.apply(vdc)); } 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()); builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf)); builder.status(toPortableImageStatus.get(from.getStatus())); return builder.build(); }
@Override public Image apply(VAppTemplate from) { checkNotNull(from, "VAppTemplate"); Envelope ovf = templateToEnvelope.apply(from); ImageBuilder builder = new ImageBuilder(); builder.ids(from.getHref().toASCIIString()); builder.uri(from.getHref()); builder.name(from.getName()); 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()); builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf)); builder.status(toPortableImageStatus.get(from.getStatus())); return builder.build(); }
@Override public Image apply(VAppTemplate from) { checkNotNull(from, "VAppTemplate"); Envelope ovf = templateToEnvelope.apply(from); ImageBuilder builder = new ImageBuilder(); builder.ids(from.getHref().toASCIIString()); builder.uri(from.getHref()); builder.name(from.getName()); 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()); builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf)); builder.status(toPortableImageStatus.get(from.getStatus())); return builder.build(); }
@Override public Image apply(VAppTemplate from) { checkNotNull(from, "VAppTemplate"); Envelope ovf = templateToEnvelope.apply(from); ImageBuilder builder = new ImageBuilder(); builder.ids(from.getHref().toASCIIString()); builder.uri(from.getHref()); builder.name(from.getName()); 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()); builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf)); builder.status(toPortableImageStatus.get(from.getStatus())); return builder.build(); }