public void testRegisterISO() throws Exception { Optional<OSType> guestOSTypeOptional = Iterables.tryFind(client.getGuestOSClient().listOSTypes(), Predicates.notNull()); Optional<Zone> zoneOptional = Iterables.tryFind(client.getZoneClient().listZones(available(true)), Predicates.notNull()); if(guestOSTypeOptional.isPresent() && zoneOptional.isPresent()) { String osTypeId = guestOSTypeOptional.get().getId(); String zoneId = zoneOptional.get().getId(); ISO iso = client.getISOClient().registerISO(isoName, "", url, zoneId, RegisterISOOptions.Builder.isPublic(true).osTypeId(osTypeId)); assertNotNull(iso); assertNotNull(iso.getId()); assertEquals(iso.getName(), isoName); } else { String skipMessage = String.format("Cannot register the iso with url: %s", url); if(zoneOptional.isPresent()) skipMessage += " without a valid zone"; else skipMessage += " without a valid guest OS type"; throw new SkipException(skipMessage); } }
public void testRegisterISO() throws Exception { Optional<OSType> guestOSTypeOptional = Iterables.tryFind(client.getGuestOSApi().listOSTypes(), Predicates.notNull()); Optional<Zone> zoneOptional = Iterables.tryFind(client.getZoneApi().listZones(available(true)), Predicates.notNull()); if (guestOSTypeOptional.isPresent() && zoneOptional.isPresent()) { String osTypeId = guestOSTypeOptional.get().getId(); String zoneId = zoneOptional.get().getId(); ISO iso = client.getISOApi().registerISO(isoName, "", url, zoneId, RegisterISOOptions.Builder.isPublic(true).osTypeId(osTypeId)); assertNotNull(iso); assertNotNull(iso.getId()); assertEquals(iso.getName(), isoName); } else { String skipMessage = String.format("Cannot register the iso with url: %s", url); if (zoneOptional.isPresent()) skipMessage += " without a valid zone"; else skipMessage += " without a valid guest OS type"; throw new SkipException(skipMessage); } }
.jobId(in.getJobId()) .jobStatus(in.getJobStatus()) .name(in.getName()) .osTypeId(in.getOsTypeId()) .osTypeName(in.getOsTypeName())
.jobId(in.getJobId()) .jobStatus(in.getJobStatus()) .name(in.getName()) .osTypeId(in.getOsTypeId()) .osTypeName(in.getOsTypeName())
.jobId(in.getJobId()) .jobStatus(in.getJobStatus()) .name(in.getName()) .osTypeId(in.getOsTypeId()) .osTypeName(in.getOsTypeName())