URI bootImage = diskToSourceImage.get(input.disks().get(0).source());
/** * {@inheritDoc} */ @Override public String toString() { return string().toString(); }
diskURIToImage.getUnchecked(instance.get().disks().get(0).source());
diskURIToImage.getUnchecked(instance.get().disks().get(0).source());
diskURIToImage.getUnchecked(instance.get().disks().get(0).source());
diskToSourceImage.put(instance.get().disks().get(0).source(), template.getImage().getUri());
Map<URI, Optional<Image>> imageMap = ImmutableMap.of(instance.disks().get(0).source(), Optional.of(new ParseImageTest().expected()));
ImmutableList.of(AttachedDisk.create( // 0, // index
URI diskSource = input.disks().get(0).source(); Optional<Image> image = diskURIToImage.getUnchecked(diskSource);
Image image = diskURIToImage.getUnchecked(input.disks().get(0).source());
URI diskSource = input.disks().get(0).source(); Optional<Image> image = diskURIToImage.getUnchecked(diskSource);
public void testCreatePreemptibleNodeWithSsd() throws Exception { String group = this.group + "ssd"; try { TemplateOptions options = client.templateOptions(); options.as(GoogleComputeEngineTemplateOptions.class).bootDiskType("pd-ssd").preemptible(true); // create a node Set<? extends NodeMetadata> nodes = client.createNodesInGroup(group, 1, options); assertEquals(nodes.size(), 1, "One node should have been created"); // Verify the disk on the instance is an ssd. NodeMetadata node = Iterables.get(nodes, 0); GoogleComputeEngineApi api = client.getContext().unwrapApi(GoogleComputeEngineApi.class); Instance instance = api.instancesInZone(node.getLocation().getId()).get(node.getName()); Disk disk = api.disksInZone(node.getLocation().getId()).get(toName(instance.disks().get(0).source())); assertTrue(disk.type().toString().endsWith("pd-ssd")); assertTrue(instance.scheduling().preemptible()); } finally { client.destroyNodesMatching(inGroup(group)); } } /**
public static AttachedDisk ephemeralDiskAtIndex(Integer index) { return new AttachedDisk(index); } }
@Override public boolean apply(AttachedDisk disk) { return disk.type() == AttachedDisk.Type.PERSISTENT && ATTACH_DISK_DEVICE_NAME.equals(disk.deviceName()); } }));
public static AttachedDisk ephemeralDiskAtIndex(Integer index) { return new AttachedDisk(index); } }
@Override public boolean apply(AttachedDisk disk) { return disk.type() == AttachedDisk.Type.PERSISTENT && diskName.equals(disk.deviceName()) && disk.autoDelete() == autoDelete; } });
/** * {@inheritDoc} */ @Override public String toString() { return string().toString(); }