diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandler.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandler.java index 238d0b77f7..ae6c5d8cba 100644 --- a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandler.java +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandler.java @@ -96,7 +96,7 @@ public class TerremarkVAppHandler extends ParseSax.HandlerWithResult disks = Lists.newArrayList(vApp.getResourceAllocationByType() - .get(ResourceType.DISK_DRIVE)); - + List disks = Lists.newArrayList(vApp.getResourceAllocationByType().get( + ResourceType.DISK_DRIVE)); + // delete the second disk - task = tmClient.configureVApp(vApp, deleteDiskWithAddressOnParent(disks.get(1).getAddressOnParent())); + task = tmClient.configureVApp(vApp, deleteDiskWithAddressOnParent(disks.get(1) + .getAddressOnParent())); assert successTester.apply(task.getId()); @@ -420,7 +426,6 @@ public class TerremarkVCloudClientLiveTest extends VCloudClientLiveTest { } tmClient.deleteVApp(vApp.getId()); } - if (clone != null) { try { successTester.apply(tmClient.powerOffVApp(clone.getId()).getId()); diff --git a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandlerTest.java b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandlerTest.java index 1ae85c93e3..535f970503 100644 --- a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandlerTest.java +++ b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/xml/TerremarkVAppHandlerTest.java @@ -101,23 +101,23 @@ public class TerremarkVAppHandlerTest extends BaseHandlerTest { TerremarkVApp result = (TerremarkVApp) factory.create( injector.getInstance(TerremarkVAppHandler.class)).parse(is); - assertEquals(result.getId(), 16161 + ""); + assertEquals(result.getId(), 16238 + ""); assertEquals(result.getName(), "centos-53"); - assertEquals(result.getStatus(), VAppStatus.ON); + assertEquals(result.getStatus(), VAppStatus.OFF); assertEquals(result.getSize().longValue(), 10485760); assertEquals(result.getOperatingSystemDescription(), "Red Hat Enterprise Linux 5 (64-bit)"); assertEquals(result.getLocation(), URI - .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/16161")); + .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/16238")); assertEquals(result.getVDC(), new NamedResourceImpl("32", null, VCloudMediaType.VDC_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32"))); assertEquals(result.getSystem(), new TerremarkVirtualSystem(null, null, null, null, null, null, null, null, null, null, null, "Virtual Hardware Family", 0, null, null, null, null, null, "centos-53", "vmx-07")); - assertEquals(result.getNetworkToAddresses().get("Internal"), ImmutableList.of()); + assertEquals(result.getNetworkToAddresses().get("Internal"), ImmutableList.of(InetAddress.getByName("10.114.34.132"))); ResourceAllocation cpu = new ResourceAllocation(1, "1 virtual CPU(s)", "Number of Virtual CPUs", ResourceType.PROCESSOR, null, null, null, null, null, diff --git a/vcloud/terremark/src/test/resources/terremark/get_vapp.xml b/vcloud/terremark/src/test/resources/terremark/get_vapp.xml index 94ae694e89..3d2d51bc30 100644 --- a/vcloud/terremark/src/test/resources/terremark/get_vapp.xml +++ b/vcloud/terremark/src/test/resources/terremark/get_vapp.xml @@ -1,19 +1,21 @@ - + xmlns="http://www.vmware.com/vcloud/v0.8"> + 10.114.34.132 + diff --git a/vcloud/terremark/src/test/resources/terremark/get_vapp2disks.xml b/vcloud/terremark/src/test/resources/terremark/get_vapp2disks.xml index 0f12f0d81d..e57eeab4c1 100644 --- a/vcloud/terremark/src/test/resources/terremark/get_vapp2disks.xml +++ b/vcloud/terremark/src/test/resources/terremark/get_vapp2disks.xml @@ -11,11 +11,11 @@ -
- - 10.114.34.131 - + + 10.114.34.131 +