jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Estévez <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] [JCLOUDS-1257] Initial support ManagedDataDisks (#372)
Date Mon, 20 Mar 2017 15:45:13 GMT
danielestevez commented on this pull request.



> +   public void deleteImageResourceDoesNotExist() {
+      assertNull(api().delete(imageName));
+   }
+
+   @Test(dependsOnMethods = "deleteImageResourceDoesNotExist")
+   public void CreateVirtualMachineImageFromExistingVM() {
+      String id = String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/myVM",
getSubscriptionId(), resourceGroupName);
+      ImageProperties properties = ImageProperties.builder()
+              .sourceVirtualMachine(ImageProperties.SourceVirtualMachine.create(id))
+              .build();
+      Image image = api().createOrUpdate(imageName, LOCATION, properties);
+      assertTrue(stateReached("Succeeded"), "start operation did not complete in the configured
timeout");
+      assertTrue(id.equals(image.properties().sourceVirtualMachine().id()));
+   }
+
+   @Test(dependsOnMethods = "CreateVirtualMachineImageFromExistingVM")

As i commented in devlist, we should also try to add thests for creating image from existing
disk, blob or snapshot. Maybe later  but good to have TODOs for it here

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/372#pullrequestreview-27881265
Mime
View raw message