libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1333307 [1/2] - in /libcloud/trunk: libcloud/compute/drivers/ test/compute/ test/compute/fixtures/vcloud_1_5/
Date Thu, 03 May 2012 04:50:16 GMT
Author: tomaz
Date: Thu May  3 04:50:15 2012
New Revision: 1333307

URL: http://svn.apache.org/viewvc?rev=1333307&view=rev
Log:
More improvements and additions to the vCloud driver. Contributed by Michal
Galet part of LIBCLOUD-183.

Added:
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6b.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vm_test.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_cpu.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_disks.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_memory.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_cpu.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_disks.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_memory.xml
Modified:
    libcloud/trunk/libcloud/compute/drivers/vcloud.py
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_org_96726c78_4ae3_402f_b08b_7a78c6903d2a.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6a.xml
    libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vdc_3d9ae28c_1de9_4307_8107_9356ff8ba6d0.xml
    libcloud/trunk/test/compute/test_vcloud.py

Modified: libcloud/trunk/libcloud/compute/drivers/vcloud.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/vcloud.py?rev=1333307&r1=1333306&r2=1333307&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/vcloud.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/vcloud.py Thu May  3 04:50:15 2012
@@ -15,9 +15,11 @@
 """
 VMware vCloud driver.
 """
+import copy
 import sys
 import re
 import base64
+import os
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlparse
 from libcloud.utils.py3 import b
@@ -31,7 +33,7 @@ from xml.etree.ElementTree import _Eleme
 from xml.parsers.expat import ExpatError
 
 from libcloud.common.base import XmlResponse, ConnectionUserAndKey
-from libcloud.common.types import InvalidCredsError
+from libcloud.common.types import InvalidCredsError, LibcloudError
 from libcloud.compute.providers import Provider
 from libcloud.compute.types import NodeState
 from libcloud.compute.base import Node, NodeDriver, NodeLocation
@@ -47,6 +49,14 @@ DEFAULT_TASK_COMPLETION_TIMEOUT = 600
 
 DEFAULT_API_VERSION = '0.8'
 
+"""
+Valid vCloud API v1.5 input values.
+"""
+VIRTUAL_CPU_VALS_1_5 = [i for i in range(1, 9)]
+VIRTUAL_MEMORY_VALS_1_5 = [2 ** i for i in range(2, 19)]
+FENCE_MODE_VALS_1_5 = ['bridged', 'isolated', 'natRouted']
+IP_MODE_VALS_1_5 = ['POOL', 'DHCP', 'MANUAL', 'NONE']
+
 
 def fixxpath(root, xpath):
     """ElementTree wants namespaces in its xpaths, so here we add them."""
@@ -67,6 +77,10 @@ class Vdc:
         self.name = name
         self.driver = driver
 
+    def __repr__(self):
+        return (('<Vdc: id=%s, name=%s, driver=%s  ...>')
+                % (self.id, self.name, self.driver.name))
+
 
 class InstantiateVAppXML(object):
 
@@ -326,6 +340,19 @@ class VCloudNodeDriver(NodeDriver):
             ]
         return self._vdcs
 
+    def _get_vdc(self, vdc_name):
+        vdc = None
+        if not vdc_name:
+            # Return the first organisation VDC found
+            vdc = self.vdcs[0]
+        else:
+            for v in self.vdcs:
+                if v.name == vdc_name:
+                    vdc = v
+            if vdc is None:
+                raise ValueError('%s virtual data centre could not be found', vdc_name)
+        return vdc
+
     @property
     def networks(self):
         networks = []
@@ -577,7 +604,7 @@ class VCloudNodeDriver(NodeDriver):
         @keyword    ex_network: link to a "Network" e.g., "https://services.vcloudexpress.terremark.com/api/v0.8/network/7"
         @type       ex_network: C{string}
 
-        @keyword    ex_vdc: link to a "VDC" e.g., "https://services.vcloudexpress.terremark.com/api/v0.8/vdc/1"
+        @keyword    ex_vdc: Name of organisation's virtual data center where vApp VMs will be deployed.
         @type       ex_vdc: C{string}
 
         @keyword    ex_cpus: number of virtual cpus (limit depends on provider)
@@ -618,10 +645,10 @@ class VCloudNodeDriver(NodeDriver):
             group=kwargs.get('ex_group', None)
         )
 
+        vdc = self._get_vdc(kwargs.get('ex_vdc', None))
         # Instantiate VM and get identifier.
         res = self.connection.request(
-            '%s/action/instantiateVAppTemplate'
-                % kwargs.get('vdc', self.vdcs[0].id),
+            '%s/action/instantiateVAppTemplate' % vdc.id,
             data=instantiate_xml.tostring(),
             method='POST',
             headers={
@@ -712,7 +739,7 @@ class VCloud_1_5_Connection(VCloudConnec
 
             # Get the URL of the Organization
             body = ET.XML(resp.read())
-            org_name = body.get('org')
+            self.org_name = body.get('org')
             org_list_url = get_url_path(
                 next((link for link in body.findall(fixxpath(body, 'Link'))
                     if link.get('type') == 'application/vnd.vmware.vcloud.orgList+xml')).get('href')
@@ -723,7 +750,7 @@ class VCloud_1_5_Connection(VCloudConnec
             body = ET.XML(conn.getresponse().read())
             self.driver.org = get_url_path(
                 next((org for org in body.findall(fixxpath(body, 'Org'))
-                    if org.get('name') == org_name)).get('href')
+                    if org.get('name') == self.org_name)).get('href')
             )
 
     def add_default_headers(self, headers):
@@ -733,10 +760,12 @@ class VCloud_1_5_Connection(VCloudConnec
 
 
 class Instantiate_1_5_VAppXML(object):
-    def __init__(self, name, template, network):
+    def __init__(self, name, template, network, vm_network=None, vm_fence=None):
         self.name = name
         self.template = template
         self.network = network
+        self.vm_network = vm_network
+        self.vm_fence = vm_fence
         self._build_xmltree()
 
     def tostring(self):
@@ -773,10 +802,19 @@ class Instantiate_1_5_VAppXML(object):
         )
 
     def _add_network_association(self, parent):
-        parent.set('networkName', self.network.get('name'))
+        if self.vm_network is None:
+            # Don't set a custom vApp VM network name
+            parent.set('networkName', self.network.get('name'))
+        else:
+            # Set a custom vApp VM network name
+            parent.set('networkName', self.vm_network)
         configuration = ET.SubElement(parent, 'Configuration')
         ET.SubElement(configuration, 'ParentNetwork', {'href': self.network.get('href')})
-        configuration.append(self.network.find(fixxpath(self.network, 'Configuration/FenceMode')))
+        if self.vm_fence is None:
+            fencemode = self.network.find(fixxpath(self.network, 'Configuration/FenceMode')).text
+        else:
+            fencemode = self.vm_fence
+        ET.SubElement(configuration, 'FenceMode').text = fencemode
 
 
 class VCloud_1_5_NodeDriver(VCloudNodeDriver):
@@ -917,67 +955,109 @@ class VCloud_1_5_NodeDriver(VCloudNodeDr
         @type       image:  L{NodeImage} or L{Node}
 
         Non-standard optional keyword arguments:
-        @keyword    ex_network: link to a "Network" e.g., "https://services.vcloudexpress.terremark.com/api/network/7"
+        @keyword    ex_network: Organisation's network name for attaching vApp VMs to.
         @type       ex_network: C{string}
 
-        @keyword    ex_vdc: link to a "VDC" e.g., "https://services.vcloudexpress.terremark.com/api/vdc/1"
+        @keyword    ex_vdc: Name of organisation's virtual data center where vApp VMs will be deployed.
         @type       ex_vdc: C{string}
 
         @keyword    ex_vm_names: list of names to be used as a VM and computer name. The name must be max. 15 characters
-                                 long and follow the host name requirements
+                                 long and follow the host name requirements.
         @type       ex_vm_names: C{list} of L{string}
 
+        @keyword    ex_vm_cpu: number of virtual CPUs/cores to allocate for each vApp VM.
+        @type       ex_vm_cpu: C{number}
+
+        @keyword    ex_vm_memory: amount of memory in MB to allocate for each vApp VM.
+        @type       ex_vm_memory: C{number}
+
+        @keyword    ex_vm_script: full path to file containing guest customisation script for each vApp VM.
+                                  Useful for creating users & pushing out public SSH keys etc.
+        @type       ex_vm_script: C{string}
+
+        @keyword    ex_vm_network: Override default vApp VM network name. Useful for when you've imported an OVF
+                                   originating from outside of the vCloud.
+        @type       ex_vm_network: C{string}
+
+        @keyword    ex_vm_fence: Fence mode for connecting the vApp VM network (ex_vm_network) to the parent
+                                 organisation network (ex_network).
+        @type       ex_vm_fence: C{string}
+
+        @keyword    ex_vm_ipmode: IP address allocation mode for all vApp VM network connections.
+        @type       ex_vm_ipmode: C{string}
+
+        @keyword    ex_deploy: set to False if the node shouldn't be deployed (started) after creation
+        @type       ex_deploy: C{bool}
         """
         name = kwargs['name']
         image = kwargs['image']
         size = kwargs.get('size', None)
         ex_vm_names = kwargs.get('ex_vm_names')
+        ex_vm_cpu = kwargs.get('ex_vm_cpu')
+        ex_vm_memory = kwargs.get('ex_vm_memory')
+        ex_vm_script = kwargs.get('ex_vm_script')
+        ex_vm_fence = kwargs.get('ex_vm_fence', None)
+        ex_network = kwargs.get('ex_network', None)
+        ex_vm_network = kwargs.get('ex_vm_network', None)
+        ex_vm_ipmode = kwargs.get('ex_vm_ipmode', None)
+        ex_deploy = kwargs.get('ex_deploy', True)
+        ex_vdc = kwargs.get('ex_vdc', None)
 
         self._validate_vm_names(ex_vm_names)
+        self._validate_vm_cpu(ex_vm_cpu)
+        self._validate_vm_memory(ex_vm_memory)
+        self._validate_vm_fence(ex_vm_fence)
+        self._validate_vm_ipmode(ex_vm_ipmode)
+        ex_vm_script = self._validate_vm_script(ex_vm_script)
 
         # Some providers don't require a network link
-        network_href = kwargs.get('ex_network', None)
-        if network_href:
+        if ex_network:
+            network_href = self._get_network_href(ex_network)
             network_elem = self.connection.request(network_href).object
         else:
             network_elem = None
 
-        vdc = kwargs.get('ex_vdc', self.vdcs[0])
-        if not vdc:
-            vdc = self.vdcs[0]
+        vdc = self._get_vdc(ex_vdc)
 
         if self._is_node(image):
             vapp_name, vapp_href = self._clone_node(name, image, vdc)
         else:
-            vapp_name, vapp_href = self._instantiate_node(name, image, network_elem, vdc)
+            vapp_name, vapp_href = self._instantiate_node(name, image, network_elem,
+                                                          vdc, ex_vm_network, ex_vm_fence)
 
         self._change_vm_names(vapp_href, ex_vm_names)
+        self._change_vm_cpu(vapp_href, ex_vm_cpu)
+        self._change_vm_memory(vapp_href, ex_vm_memory)
+        self._change_vm_script(vapp_href, ex_vm_script)
+        self._change_vm_ipmode(vapp_href, ex_vm_ipmode)
 
         # Power on the VM.
-        # Retry 3 times: when instantiating large number of VMs at the same time some may fail on resource allocation
-        retry = 3
-        while True:
-            try:
-                res = self.connection.request('%s/power/action/powerOn' % vapp_href,
-                                              method='POST')
-                self._wait_for_task_completion(res.object.get('href'))
-                break
-            except Exception:
-                if retry <= 0:
-                    raise
-                retry -= 1
-                time.sleep(10)
+        if ex_deploy:
+            # Retry 3 times: when instantiating large number of VMs at the same time some may fail on resource allocation
+            retry = 3
+            while True:
+                try:
+                    res = self.connection.request('%s/power/action/powerOn' % vapp_href,
+                                                  method='POST')
+                    self._wait_for_task_completion(res.object.get('href'))
+                    break
+                except Exception:
+                    if retry <= 0:
+                        raise
+                    retry -= 1
+                    time.sleep(10)
 
         res = self.connection.request(vapp_href)
         node = self._to_node(res.object)
-
         return node
 
-    def _instantiate_node(self, name, image, network_elem, vdc):
+    def _instantiate_node(self, name, image, network_elem, vdc, vm_network, vm_fence):
         instantiate_xml = Instantiate_1_5_VAppXML(
             name=name,
             template=image.id,
-            network=network_elem
+            network=network_elem,
+            vm_network=vm_network,
+            vm_fence=vm_fence
         )
 
         # Instantiate VM and get identifier.
@@ -1057,6 +1137,58 @@ class VCloud_1_5_NodeDriver(VCloudNodeDr
 
         return vapp_name, vapp_href
 
+    def ex_set_vm_cpu(self, vapp_or_vm_id, vm_cpu):
+        """
+        Sets the number of virtual CPUs for the specified VM or VMs under the vApp. If the vapp_or_vm_id param
+        represents a link to an vApp all VMs that are attached to this vApp will be modified.
+
+        Please ensure that hot-adding a virtual CPU is enabled for the powered on virtual machines.
+        Otherwise use this method on undeployed vApp.
+
+        @keyword    vapp_or_vm_id: vApp or VM ID that will be modified. If a vApp ID is used here all attached VMs
+                                   will be modified
+        @type       vapp_or_vm_id: C{string}
+
+        @keyword    vm_cpu: number of virtual CPUs/cores to allocate for specified VMs
+        @type       vm_cpu: C{number}
+        """
+        self._validate_vm_cpu(vm_cpu)
+        self._change_vm_cpu(vapp_or_vm_id, vm_cpu)
+
+    def ex_set_vm_memory(self, vapp_or_vm_id, vm_memory):
+        """
+        Sets the virtual memory in MB to allocate for the specified VM or VMs under the vApp.
+        If the vapp_or_vm_id param represents a link to an vApp all VMs that are attached to
+        this vApp will be modified.
+
+        Please ensure that hot-change of virtual memory is enabled for the powered on virtual machines.
+        Otherwise use this method on undeployed vApp.
+
+        @keyword    vapp_or_vm_id: vApp or VM ID that will be modified. If a vApp ID is used here all attached VMs
+                                   will be modified
+        @type       vapp_or_vm_id: C{string}
+
+        @keyword    vm_memory: virtual memory in MB to allocate for the specified VM or VMs
+        @type       vm_memory: C{number}
+        """
+        self._validate_vm_memory(vm_memory)
+        self._change_vm_memory(vapp_or_vm_id, vm_memory)
+
+    def ex_add_vm_disk(self, vapp_or_vm_id, vm_disk_size):
+        """
+        Adds a virtual disk to the specified VM or VMs under the vApp. If the vapp_or_vm_id param
+        represents a link to an vApp all VMs that are attached to this vApp will be modified.
+
+        @keyword    vapp_or_vm_id: vApp or VM ID that will be modified. If a vApp ID is used here all attached VMs
+                                   will be modified
+        @type       vapp_or_vm_id: C{string}
+
+        @keyword    vm_disk_size: the disk capacity in GB that will be added to the specified VM or VMs
+        @type       vm_disk_size: C{number}
+        """
+        self._validate_vm_disk_size(vm_disk_size)
+        self._add_vm_disk(vapp_or_vm_id, vm_disk_size)
+
     @staticmethod
     def _validate_vm_names(names):
         if names is None:
@@ -1068,13 +1200,64 @@ class VCloud_1_5_NodeDriver(VCloudNodeDr
             if not hname_re.match(name):
                 raise ValueError('The VM name "' + name + '" can not be used. "' + name + '" is not a valid computer name for the VM.')
 
-    def _change_vm_names(self, vapp_href, vm_names):
-        if vm_names is None:
+    @staticmethod
+    def _validate_vm_memory(vm_memory):
+        if vm_memory is None:
             return
+        elif vm_memory not in VIRTUAL_MEMORY_VALS_1_5:
+            raise ValueError('%s is not a valid vApp VM memory value' % vm_memory)
 
-        res = self.connection.request(vapp_href)
-        vms = res.object.findall(fixxpath(res.object, "Children/Vm"))
+    @staticmethod
+    def _validate_vm_cpu(vm_cpu):
+        if vm_cpu is None:
+            return
+        elif vm_cpu not in VIRTUAL_CPU_VALS_1_5:
+            raise ValueError('%s is not a valid vApp VM CPU value' % vm_cpu)
+
+    @staticmethod
+    def _validate_vm_disk_size(vm_disk):
+        if vm_disk is None:
+            return
+        elif int(vm_disk) < 0:
+            raise ValueError('%s is not a valid vApp VM disk space value', vm_disk)
+
+    @staticmethod
+    def _validate_vm_script(vm_script):
+        if vm_script is None:
+            return
+        # Try to locate the script file
+        if not os.path.isabs(vm_script):
+            vm_script = os.path.expanduser(vm_script)
+            vm_script = os.path.abspath(vm_script)
+        if not os.path.isfile(vm_script):
+            raise LibcloudError("%s the VM script file does not exist" % vm_script)
+        try:
+            open(vm_script).read()
+        except:
+            raise
+        return vm_script
+
+    @staticmethod
+    def _validate_vm_fence(vm_fence):
+        if vm_fence is None:
+            return
+        elif vm_fence not in FENCE_MODE_VALS_1_5:
+            raise ValueError('%s is not a valid fencing mode value' % vm_fence)
+
+    @staticmethod
+    def _validate_vm_ipmode(vm_ipmode):
+        if vm_ipmode is None:
+            return
+        elif vm_ipmode == 'MANUAL':
+            raise NotImplementedError('MANUAL IP mode: The interface for supplying IPAddress does not exist yet')
+        elif vm_ipmode not in IP_MODE_VALS_1_5:
+            raise ValueError('%s is not a valid IP address allocation mode value' % vm_ipmode)
+
+    def _change_vm_names(self, vapp_or_vm_id, vm_names):
+        if vm_names is None:
+            return
 
+        vms = self._get_vm_elements(vapp_or_vm_id)
         for i, vm in enumerate(vms):
             if len(vm_names) <= i:
                 return
@@ -1106,5 +1289,212 @@ class VCloud_1_5_NodeDriver(VCloudNodeDr
             )
             self._wait_for_task_completion(res.object.get('href'))
 
+    def _change_vm_cpu(self, vapp_or_vm_id, vm_cpu):
+        if vm_cpu is None:
+            return
+
+        vms = self._get_vm_elements(vapp_or_vm_id)
+        for vm in vms:
+            # Get virtualHardwareSection/cpu section
+            res = self.connection.request('%s/virtualHardwareSection/cpu' % get_url_path(vm.get('href')))
+
+            # Update VirtualQuantity field
+            res.object.find(
+                '{http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData}VirtualQuantity'
+            ).text = str(vm_cpu)
+            res = self.connection.request('%s/virtualHardwareSection/cpu' % get_url_path(vm.get('href')),
+                                          data=ET.tostring(res.object),
+                                          method='PUT',
+                                          headers={'Content-Type': 'application/vnd.vmware.vcloud.rasdItem+xml'}
+            )
+            self._wait_for_task_completion(res.object.get('href'))
+
+    def _change_vm_memory(self, vapp_or_vm_id, vm_memory):
+        if vm_memory is None:
+            return
+
+        vms = self._get_vm_elements(vapp_or_vm_id)
+        for vm in vms:
+            # Get virtualHardwareSection/memory section
+            res = self.connection.request('%s/virtualHardwareSection/memory' % get_url_path(vm.get('href')))
+
+            # Update VirtualQuantity field
+            res.object.find(
+                '{http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData}VirtualQuantity'
+            ).text = str(vm_memory)
+            res = self.connection.request('%s/virtualHardwareSection/memory' % get_url_path(vm.get('href')),
+                                          data=ET.tostring(res.object),
+                                          method='PUT',
+                                          headers={'Content-Type': 'application/vnd.vmware.vcloud.rasdItem+xml'}
+            )
+            self._wait_for_task_completion(res.object.get('href'))
+
+    def _add_vm_disk(self, vapp_or_vm_id, vm_disk):
+        if vm_disk is None:
+            return
+
+        rasd_ns = '{http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData}'
+
+        vms = self._get_vm_elements(vapp_or_vm_id)
+        for vm in vms:
+            # Get virtualHardwareSection/disks section
+            res = self.connection.request('%s/virtualHardwareSection/disks' % vm.get('href'))
+
+            existing_ids = []
+            new_disk = None
+            for item in res.object.findall(fixxpath(res.object, 'Item')):
+                # Clean Items from unnecessary stuff
+                for elem in item:
+                    if elem.tag == '%sInstanceID' % rasd_ns:
+                        existing_ids.append(int(elem.text))
+                    if elem.tag in ['%sAddressOnParent' % rasd_ns, '%sParent' % rasd_ns]:
+                        item.remove(elem)
+                if item.find('%sHostResource' % rasd_ns) is not None:
+                    new_disk = item
+
+            new_disk = copy.deepcopy(new_disk)
+            disk_id = max(existing_ids) + 1
+            new_disk.find('%sInstanceID' % rasd_ns).text = str(disk_id)
+            new_disk.find('%sElementName' % rasd_ns).text = 'Hard Disk ' + str(disk_id)
+            new_disk.find('%sHostResource' % rasd_ns).set(fixxpath(new_disk, 'capacity'), str(int(vm_disk) * 1024))
+            res.object.append(new_disk)
+
+            res = self.connection.request('%s/virtualHardwareSection/disks' % vm.get('href'),
+                                          data=ET.tostring(res.object),
+                                          method='PUT',
+                                          headers={'Content-Type': 'application/vnd.vmware.vcloud.rasditemslist+xml'}
+            )
+            self._wait_for_task_completion(res.object.get('href'))
+
+    def _change_vm_script(self, vapp_or_vm_id, vm_script):
+        if vm_script is None:
+            return
+
+        vms = self._get_vm_elements(vapp_or_vm_id)
+        try:
+            script = open(vm_script).read()
+        except:
+            return
+
+        # ElementTree escapes script characters automatically. Escape requirements:
+        # http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/GuestCustomizationSectionType.html
+        for vm in vms:
+            # Get GuestCustomizationSection
+            res = self.connection.request('%s/guestCustomizationSection' % get_url_path(vm.get('href')))
+
+            # Attempt to update any existing CustomizationScript element
+            try:
+                res.object.find(fixxpath(res.object, 'CustomizationScript')).text = script
+            except:
+                # CustomizationScript section does not exist, insert it just before ComputerName
+                for i, e in enumerate(res.object):
+                    if e.tag == '{http://www.vmware.com/vcloud/v1.5}ComputerName':
+                        break
+                e = ET.Element('{http://www.vmware.com/vcloud/v1.5}CustomizationScript')
+                e.text = script
+                res.object.insert(i, e)
+
+            # Remove AdminPassword from customization section due to an API quirk
+            admin_pass = res.object.find(fixxpath(res.object, 'AdminPassword'))
+            if admin_pass is not None:
+                res.object.remove(admin_pass)
+
+            # Update VM's GuestCustomizationSection
+            res = self.connection.request('%s/guestCustomizationSection' % get_url_path(vm.get('href')),
+                                          data=ET.tostring(res.object),
+                                          method='PUT',
+                                          headers={'Content-Type':
+                                                   'application/vnd.vmware.vcloud.guestCustomizationSection+xml'
+                                          }
+            )
+            self._wait_for_task_completion(res.object.get('href'))
+
+    def _change_vm_ipmode(self, vapp_or_vm_id, vm_ipmode):
+        if vm_ipmode is None:
+            return
+
+        vms = self._get_vm_elements(vapp_or_vm_id)
+
+        for vm in vms:
+            res = self.connection.request('%s/networkConnectionSection' % get_url_path(vm.get('href')))
+            net_conns = res.object.findall(fixxpath(res.object, 'NetworkConnection'))
+            for c in net_conns:
+                c.find(fixxpath(c, 'IpAddressAllocationMode')).text = vm_ipmode
+
+            res = self.connection.request('%s/networkConnectionSection' % get_url_path(vm.get('href')),
+                                          data=ET.tostring(res.object),
+                                          method='PUT',
+                                          headers={'Content-Type':
+                                                   'application/vnd.vmware.vcloud.networkConnectionSection+xml'}
+            )
+            self._wait_for_task_completion(res.object.get('href'))
+
+    def _get_network_href(self, network_name):
+        network_href = None
+
+        # Find the organisation's network href
+        res = self.connection.request(self.org)
+        links = res.object.findall(fixxpath(res.object, 'Link'))
+        for l in links:
+            if  l.attrib['type'] == 'application/vnd.vmware.vcloud.orgNetwork+xml'\
+            and l.attrib['name'] == network_name:
+                network_href = l.attrib['href']
+
+        if network_href is None:
+            raise ValueError('%s is not a valid organisation network name' % network_name)
+        else:
+            return network_href
+
+    def _get_vm_elements(self, vapp_or_vm_id):
+        res = self.connection.request(vapp_or_vm_id)
+        if res.object.tag.endswith('VApp'):
+            vms = res.object.findall(fixxpath(res.object, 'Children/Vm'))
+        elif res.object.tag.endswith('Vm'):
+            vms = [res.object]
+        else:
+            raise ValueError('Specified ID value is not a valid VApp or Vm identifier.')
+        return vms
+
     def _is_node(self, node_or_image):
         return isinstance(node_or_image, Node)
+
+    def _to_node(self, node_elm):
+
+        # Parse VMs as extra field
+        vms = []
+        for vm_elem in node_elm.findall(fixxpath(node_elm, 'Children/Vm')):
+            public_ips = []
+            private_ips = []
+            for connection in vm_elem.findall(fixxpath(vm_elem, 'NetworkConnectionSection/NetworkConnection')):
+                ip = connection.find(fixxpath(connection, "IpAddress"))
+                if ip is not None:
+                    private_ips.append(ip.text)
+                external_ip = connection.find(fixxpath(connection, "ExternalIpAddress"))
+                if external_ip is not None:
+                    public_ips.append(external_ip.text)
+                elif ip is not None:
+                    public_ips.append(ip.text)
+            vm = {
+                'id': vm_elem.get('href'),
+                'name': vm_elem.get('name'),
+                'state': self.NODE_STATE_MAP[vm_elem.get('status')],
+                'public_ips': public_ips,
+                'private_ips': private_ips
+            }
+            vms.append(vm)
+
+        # Take the node IP addresses from all VMs
+        public_ips = []
+        private_ips = []
+        for vm in vms:
+            public_ips.extend(vm['public_ips'])
+            private_ips.extend(vm['private_ips'])
+
+        node = Node(id=node_elm.get('href'),
+                    name=node_elm.get('name'),
+                    state=self.NODE_STATE_MAP[node_elm.get('status')],
+                    public_ips=public_ips,
+                    private_ips=private_ips,
+                    driver=self.connection.driver,
+                    extra={'vms': vms})
+        return node

Modified: libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_org_96726c78_4ae3_402f_b08b_7a78c6903d2a.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_org_96726c78_4ae3_402f_b08b_7a78c6903d2a.xml?rev=1333307&r1=1333306&r2=1333307&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_org_96726c78_4ae3_402f_b08b_7a78c6903d2a.xml (original)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_org_96726c78_4ae3_402f_b08b_7a78c6903d2a.xml Thu May  3 04:50:15 2012
@@ -1,5 +1,5 @@
 <Org name="MyOrg" id="urn:vcloud:org:96726c78-4ae3-402f-b08b-7a78c6903d2a" type="application/vnd.vmware.vcloud.org+xml" href="https://vm-vcloud/api/org/96726c78-4ae3-402f-b08b-7a78c6903d2a" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://65.41.64.27/api/v1.5/schema/master.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-   <Link rel="down" type="application/vnd.vmware.vcloud.vdc+xml" name="MyOrg" href="https://vm-vcloud/api/vdc/3d9ae28c-1de9-4307-8107-9356ff8ba6d0"/>
+   <Link rel="down" type="application/vnd.vmware.vcloud.vdc+xml" name="MyVdc" href="https://vm-vcloud/api/vdc/3d9ae28c-1de9-4307-8107-9356ff8ba6d0"/>
    <Link rel="down" type="application/vnd.vmware.vcloud.tasksList+xml" href="https://vm-vcloud/api/tasksList/96726c78-4ae3-402f-b08b-7a78c6903d2a"/>
    <Link rel="down" type="application/vnd.vmware.vcloud.catalog+xml" name="NS-Dev" href="https://vm-vcloud/api/catalog/cddb3cb2-3394-4b14-b831-11fbc4028da4"/>
    <Link rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml" href="https://vm-vcloud/api/org/96726c78-4ae3-402f-b08b-7a78c6903d2a/catalog/cddb3cb2-3394-4b14-b831-11fbc4028da4/controlAccess/"/>

Modified: libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6a.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6a.xml?rev=1333307&r1=1333306&r2=1333307&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6a.xml (original)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6a.xml Thu May  3 04:50:15 2012
@@ -111,7 +111,7 @@
    </Owner>
    <InMaintenanceMode>false</InMaintenanceMode>
    <Children>
-      <Vm needsCustomization="false" deployed="true" status="4" name="mgalet-test2" id="urn:vcloud:vm:dd75d1d3-5b7b-48f0-aff3-69622ab7e045" type="application/vnd.vmware.vcloud.vm+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045">
+      <Vm needsCustomization="false" deployed="true" status="4" name="testVm" id="urn:vcloud:vm:dd75d1d3-5b7b-48f0-aff3-69622ab7e045" type="application/vnd.vmware.vcloud.vm+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045">
          <Link rel="power:powerOff" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/powerOff"/>
          <Link rel="power:reboot" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/reboot"/>
          <Link rel="power:reset" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/reset"/>

Added: libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6b.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6b.xml?rev=1333307&view=auto
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6b.xml (added)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vapp_8c57a5b6_e61b_48ca_8a78_3b70ee65ef6b.xml Thu May  3 04:50:15 2012
@@ -0,0 +1,295 @@
+<VApp deployed="true" status="4" name="testNode2" id="urn:vcloud:vapp:8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a" type="application/vnd.vmware.vcloud.vApp+xml"
+      href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6b" xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://schemas.dmtf.org/ovf/environment/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8027_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://65.41.64.27/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSyst
 emSettingData" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+   <Link rel="power:powerOff" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/power/action/powerOff"/>
+   <Link rel="power:reboot" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/power/action/reboot"/>
+   <Link rel="power:reset" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/power/action/reset"/>
+   <Link rel="power:shutdown" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/power/action/shutdown"/>
+   <Link rel="power:suspend" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/power/action/suspend"/>
+   <Link rel="deploy" type="application/vnd.vmware.vcloud.deployVAppParams+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/action/deploy"/>
+   <Link rel="undeploy" type="application/vnd.vmware.vcloud.undeployVAppParams+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/action/undeploy"/>
+   <Link rel="down" type="application/vnd.vmware.vcloud.vAppNetwork+xml" name="vCloud - Default" href="https://vm-vcloud/api/network/da178ef6-b21b-4f19-816e-798a294d2b22"/>
+   <Link rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/controlAccess/"/>
+   <Link rel="controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/action/controlAccess"/>
+   <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="https://vm-vcloud/api/vdc/3d9ae28c-1de9-4307-8107-9356ff8ba6d0"/>
+   <Link rel="edit" type="application/vnd.vmware.vcloud.vApp+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a"/>
+   <Link rel="down" type="application/vnd.vmware.vcloud.owner+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/owner"/>
+   <Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/metadata"/>
+   <Description/>
+   <LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/leaseSettingsSection/" ovf:required="false">
+      <ovf:Info>Lease settings section</ovf:Info>
+      <Link rel="edit" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/leaseSettingsSection/"/>
+      <DeploymentLeaseInSeconds>0</DeploymentLeaseInSeconds>
+      <StorageLeaseInSeconds>0</StorageLeaseInSeconds>
+   </LeaseSettingsSection>
+   <ovf:StartupSection vcloud:href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/startupSection/" vcloud:type="application/vnd.vmware.vcloud.startupSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
+      <ovf:Info>VApp startup section</ovf:Info>
+      <ovf:Item ovf:stopDelay="0" ovf:stopAction="powerOff" ovf:startDelay="0" ovf:startAction="powerOn" ovf:order="0" ovf:id="mgalet-test2"/>
+      <Link rel="edit" type="application/vnd.vmware.vcloud.startupSection+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/startupSection/"/>
+   </ovf:StartupSection>
+   <ovf:NetworkSection vcloud:href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/networkSection/" vcloud:type="application/vnd.vmware.vcloud.networkSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
+      <ovf:Info>The list of logical networks</ovf:Info>
+      <ovf:Network ovf:name="vCloud - Default">
+         <ovf:Description/>
+      </ovf:Network>
+   </ovf:NetworkSection>
+   <NetworkConfigSection type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/networkConfigSection/" ovf:required="false">
+      <ovf:Info>The configuration parameters for logical networks</ovf:Info>
+      <Link rel="edit" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a/networkConfigSection/"/>
+      <NetworkConfig networkName="vCloud - Default">
+         <Link rel="repair" href="https://vm-vcloud/api/admin/network/da178ef6-b21b-4f19-816e-798a294d2b22/action/reset"/>
+         <Description/>
+         <Configuration>
+            <IpScope>
+               <IsInherited>true</IsInherited>
+               <Gateway>65.41.64.1</Gateway>
+               <Netmask>255.255.252.0</Netmask>
+               <Dns1>65.41.42.113</Dns1>
+               <Dns2>65.41.42.114</Dns2>
+               <DnsSuffix>vm.myorg.com</DnsSuffix>
+               <IpRanges>
+                  <IpRange>
+                     <StartAddress>65.41.67.1</StartAddress>
+                     <EndAddress>65.41.67.254</EndAddress>
+                  </IpRange>
+               </IpRanges>
+            </IpScope>
+            <ParentNetwork type="application/vnd.vmware.vcloud.network+xml" name="vCloud - Default" href="https://vm-vcloud/api/network/dca8b667-6c8f-4c3e-be57-7a9425dba4f4"/>
+            <FenceMode>bridged</FenceMode>
+            <RetainNetInfoAcrossDeployments>false</RetainNetInfoAcrossDeployments>
+            <Features>
+               <DhcpService>
+                  <IsEnabled>false</IsEnabled>
+                  <DefaultLeaseTime>3600</DefaultLeaseTime>
+                  <MaxLeaseTime>7200</MaxLeaseTime>
+                  <IpRange>
+                     <StartAddress>65.41.64.2</StartAddress>
+                     <EndAddress>65.41.67.0</EndAddress>
+                  </IpRange>
+               </DhcpService>
+               <FirewallService>
+                  <IsEnabled>true</IsEnabled>
+                  <DefaultAction>drop</DefaultAction>
+                  <LogDefaultAction>false</LogDefaultAction>
+                  <FirewallRule>
+                     <IsEnabled>true</IsEnabled>
+                     <Description>Allow all outgoing traffic</Description>
+                     <Policy>allow</Policy>
+                     <Protocols>
+                        <Any>true</Any>
+                     </Protocols>
+                     <Port>-1</Port>
+                     <DestinationIp>Any</DestinationIp>
+                     <SourcePort>-1</SourcePort>
+                     <SourceIp>Any</SourceIp>
+                     <Direction>out</Direction>
+                     <EnableLogging>false</EnableLogging>
+                  </FirewallRule>
+               </FirewallService>
+               <NatService>
+                  <IsEnabled>true</IsEnabled>
+                  <NatType>ipTranslation</NatType>
+                  <Policy>allowTraffic</Policy>
+                  <NatRule>
+                     <OneToOneVmRule>
+                        <MappingMode>automatic</MappingMode>
+                        <VAppScopedVmId>ScrumVM_Master</VAppScopedVmId>
+                        <VmNicId>0</VmNicId>
+                     </OneToOneVmRule>
+                  </NatRule>
+               </NatService>
+               <StaticRoutingService>
+                  <IsEnabled>false</IsEnabled>
+               </StaticRoutingService>
+            </Features>
+            <SyslogServerSettings/>
+         </Configuration>
+         <IsDeployed>true</IsDeployed>
+      </NetworkConfig>
+   </NetworkConfigSection>
+   <Owner type="application/vnd.vmware.vcloud.owner+xml">
+      <User type="application/vnd.vmware.admin.user+xml" name="mgalet" href="https://vm-vcloud/api/admin/user/a0d29e8e-2b32-4739-ab7d-6a3e795be4db"/>
+   </Owner>
+   <InMaintenanceMode>false</InMaintenanceMode>
+   <Children>
+      <Vm needsCustomization="false" deployed="true" status="4" name="testVm2" id="urn:vcloud:vm:dd75d1d3-5b7b-48f0-aff3-69622ab7e045" type="application/vnd.vmware.vcloud.vm+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e046">
+         <Link rel="power:powerOff" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/powerOff"/>
+         <Link rel="power:reboot" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/reboot"/>
+         <Link rel="power:reset" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/reset"/>
+         <Link rel="power:shutdown" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/shutdown"/>
+         <Link rel="power:suspend" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/power/action/suspend"/>
+         <Link rel="undeploy" type="application/vnd.vmware.vcloud.undeployVAppParams+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/action/undeploy"/>
+         <Link rel="edit" type="application/vnd.vmware.vcloud.vm+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045"/>
+         <Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/metadata"/>
+         <Link rel="screen:thumbnail" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/screen"/>
+         <Link rel="screen:acquireTicket" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/screen/action/acquireTicket"/>
+         <Link rel="media:insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/media/action/insertMedia"/>
+         <Link rel="media:ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/media/action/ejectMedia"/>
+         <Link rel="installVmwareTools" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/action/installVMwareTools"/>
+         <Link rel="up" type="application/vnd.vmware.vcloud.vApp+xml" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a"/>
+         <Description/>
+         <ovf:VirtualHardwareSection ovf:transport="" vcloud:href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
+            <ovf:Info>Virtual hardware requirements</ovf:Info>
+            <ovf:System>
+               <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
+               <vssd:InstanceID>0</vssd:InstanceID>
+               <vssd:VirtualSystemIdentifier>mgalet-test2</vssd:VirtualSystemIdentifier>
+               <vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
+            </ovf:System>
+            <ovf:Item>
+               <rasd:Address>00:50:56:01:00:99</rasd:Address>
+               <rasd:AddressOnParent>0</rasd:AddressOnParent>
+               <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
+               <rasd:Connection vcloud:ipAddress="65.41.67.2" vcloud:primaryNetworkConnection="true" vcloud:ipAddressingMode="POOL">vCloud - Default</rasd:Connection>
+               <rasd:Description>PCNet32 ethernet adapter</rasd:Description>
+               <rasd:ElementName>Network adapter 0</rasd:ElementName>
+               <rasd:InstanceID>1</rasd:InstanceID>
+               <rasd:ResourceSubType>PCNet32</rasd:ResourceSubType>
+               <rasd:ResourceType>10</rasd:ResourceType>
+            </ovf:Item>
+            <ovf:Item>
+               <rasd:Address>0</rasd:Address>
+               <rasd:Description>SCSI Controller</rasd:Description>
+               <rasd:ElementName>SCSI Controller 0</rasd:ElementName>
+               <rasd:InstanceID>2</rasd:InstanceID>
+               <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
+               <rasd:ResourceType>6</rasd:ResourceType>
+            </ovf:Item>
+            <ovf:Item>
+               <rasd:AddressOnParent>0</rasd:AddressOnParent>
+               <rasd:Description>Hard disk</rasd:Description>
+               <rasd:ElementName>Hard disk 1</rasd:ElementName>
+               <rasd:HostResource vcloud:capacity="61440" vcloud:busSubType="lsilogic" vcloud:busType="6"/>
+               <rasd:InstanceID>2000</rasd:InstanceID>
+               <rasd:Parent>2</rasd:Parent>
+               <rasd:ResourceType>17</rasd:ResourceType>
+            </ovf:Item>
+            <ovf:Item>
+               <rasd:Address>0</rasd:Address>
+               <rasd:Description>IDE Controller</rasd:Description>
+               <rasd:ElementName>IDE Controller 0</rasd:ElementName>
+               <rasd:InstanceID>3</rasd:InstanceID>
+               <rasd:ResourceType>5</rasd:ResourceType>
+            </ovf:Item>
+            <ovf:Item>
+               <rasd:AddressOnParent>0</rasd:AddressOnParent>
+               <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
+               <rasd:Description>CD/DVD Drive</rasd:Description>
+               <rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
+               <rasd:HostResource/>
+               <rasd:InstanceID>3002</rasd:InstanceID>
+               <rasd:Parent>3</rasd:Parent>
+               <rasd:ResourceType>15</rasd:ResourceType>
+            </ovf:Item>
+            <ovf:Item>
+               <rasd:AddressOnParent>0</rasd:AddressOnParent>
+               <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
+               <rasd:Description>Floppy Drive</rasd:Description>
+               <rasd:ElementName>Floppy Drive 1</rasd:ElementName>
+               <rasd:HostResource/>
+               <rasd:InstanceID>8000</rasd:InstanceID>
+               <rasd:ResourceType>14</rasd:ResourceType>
+            </ovf:Item>
+            <ovf:Item vcloud:href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
+               <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
+               <rasd:Description>Number of Virtual CPUs</rasd:Description>
+               <rasd:ElementName>2 virtual CPU(s)</rasd:ElementName>
+               <rasd:InstanceID>4</rasd:InstanceID>
+               <rasd:Reservation>0</rasd:Reservation>
+               <rasd:ResourceType>3</rasd:ResourceType>
+               <rasd:VirtualQuantity>2</rasd:VirtualQuantity>
+               <rasd:Weight>0</rasd:Weight>
+               <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/cpu"/>
+            </ovf:Item>
+            <ovf:Item vcloud:href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
+               <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
+               <rasd:Description>Memory Size</rasd:Description>
+               <rasd:ElementName>4096 MB of memory</rasd:ElementName>
+               <rasd:InstanceID>5</rasd:InstanceID>
+               <rasd:Reservation>0</rasd:Reservation>
+               <rasd:ResourceType>4</rasd:ResourceType>
+               <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
+               <rasd:Weight>0</rasd:Weight>
+               <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/memory"/>
+            </ovf:Item>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/"/>
+            <Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/cpu"/>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/cpu"/>
+            <Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/memory"/>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/memory"/>
+            <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/disks"/>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/disks"/>
+            <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/media"/>
+            <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/networkCards"/>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/networkCards"/>
+            <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/serialPorts"/>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/virtualHardwareSection/serialPorts"/>
+         </ovf:VirtualHardwareSection>
+         <ovf:OperatingSystemSection ovf:id="80" vcloud:href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/operatingSystemSection/" vcloud:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="rhel5_64Guest" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:vmw="http://www.vmware.com/schema/ovf">
+            <ovf:Info>Specifies the operating system installed</ovf:Info>
+            <ovf:Description>Red Hat Enterprise Linux 5 (64-bit)</ovf:Description>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.operatingSystemSection+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/operatingSystemSection/"/>
+         </ovf:OperatingSystemSection>
+          <NetworkConnectionSection type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/networkConnectionSection/" ovf:required="false">
+              <ovf:Info>Specifies the available VM network connections</ovf:Info>
+              <PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
+              <NetworkConnection network="mgalet-test-network" needsCustomization="true">
+                  <NetworkConnectionIndex>0</NetworkConnectionIndex>
+                  <IpAddress>192.168.0.100</IpAddress>
+                  <ExternalIpAddress>192.168.0.103</ExternalIpAddress>
+                  <IsConnected>true</IsConnected>
+                  <MACAddress>00:50:56:01:00:d9</MACAddress>
+                  <IpAddressAllocationMode>POOL</IpAddressAllocationMode>
+              </NetworkConnection>
+          </NetworkConnectionSection>
+          <GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/guestCustomizationSection/" ovf:required="false">
+            <ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
+            <Enabled>true</Enabled>
+            <ChangeSid>false</ChangeSid>
+            <VirtualMachineId>dd75d1d3-5b7b-48f0-aff3-69622ab7e045</VirtualMachineId>
+            <JoinDomainEnabled>false</JoinDomainEnabled>
+            <UseOrgSettings>false</UseOrgSettings>
+            <AdminPasswordEnabled>true</AdminPasswordEnabled>
+            <AdminPasswordAuto>true</AdminPasswordAuto>
+            <AdminPassword>sN#9QH9#</AdminPassword>
+            <ResetPasswordRequired>false</ResetPasswordRequired>
+            <ComputerName>mgalet-test2</ComputerName>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/guestCustomizationSection/"/>
+         </GuestCustomizationSection>
+         <RuntimeInfoSection vcloud:href="https://vm-vcloud/api/vApp/vm-dd75d1d3-5b7b-48f0-aff3-69622ab7e045/runtimeInfoSection" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
+            <ovf:Info>Specifies Runtime info</ovf:Info>
+            <VMWareTools version="8290"/>
+         </RuntimeInfoSection>
+         <VAppScopedLocalId>ScrumVM_Master</VAppScopedLocalId>
+         <ovfenv:Environment ovfenv:id="" ns8:vCenterId="vm-139" xmlns:ns8="http://www.vmware.com/schema/ovfenv">
+            <ovfenv:PlatformSection>
+               <ovfenv:Kind>VMware ESXi</ovfenv:Kind>
+               <ovfenv:Version>5.0.0</ovfenv:Version>
+               <ovfenv:Vendor>VMware, Inc.</ovfenv:Vendor>
+               <ovfenv:Locale>en</ovfenv:Locale>
+            </ovfenv:PlatformSection>
+            <ovfenv:PropertySection>
+               <ovfenv:Property ovfenv:value="None" ovfenv:key="vCloud_UseSysPrep"/>
+               <ovfenv:Property ovfenv:value="sN#9QH9#" ovfenv:key="vCloud_adminPassword"/>
+               <ovfenv:Property ovfenv:value="1" ovfenv:key="vCloud_bitMask"/>
+               <ovfenv:Property ovfenv:value="static" ovfenv:key="vCloud_bootproto_0"/>
+               <ovfenv:Property ovfenv:value="mgalet-test2" ovfenv:key="vCloud_computerName"/>
+               <ovfenv:Property ovfenv:value="65.41.42.113" ovfenv:key="vCloud_dns1_0"/>
+               <ovfenv:Property ovfenv:value="65.41.42.114" ovfenv:key="vCloud_dns2_0"/>
+               <ovfenv:Property ovfenv:value="65.41.64.1" ovfenv:key="vCloud_gateway_0"/>
+               <ovfenv:Property ovfenv:value="65.41.67.2" ovfenv:key="vCloud_ip_0"/>
+               <ovfenv:Property ovfenv:value="00:50:56:01:00:99" ovfenv:key="vCloud_macaddr_0"/>
+               <ovfenv:Property ovfenv:value="83467e6d-0af8-4af5-8b15-b8d107b16f0d" ovfenv:key="vCloud_markerid"/>
+               <ovfenv:Property ovfenv:value="255.255.252.0" ovfenv:key="vCloud_netmask_0"/>
+               <ovfenv:Property ovfenv:value="1" ovfenv:key="vCloud_numnics"/>
+               <ovfenv:Property ovfenv:value="0" ovfenv:key="vCloud_primaryNic"/>
+               <ovfenv:Property ovfenv:value="117274554" ovfenv:key="vCloud_reconfigToken"/>
+               <ovfenv:Property ovfenv:value="0" ovfenv:key="vCloud_resetPassword"/>
+               <ovfenv:Property ovfenv:value="vm.myorg.com" ovfenv:key="vCloud_suffix_0"/>
+            </ovfenv:PropertySection>
+            <ve:EthernetAdapterSection xmlns:ve="http://www.vmware.com/schema/ovfenv" xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:oe="http://schemas.dmtf.org/ovf/environment/1">
+               <ve:Adapter ve:mac="00:50:56:01:00:99" ve:network="VM Network" ve:unitNumber="7"/>
+            </ve:EthernetAdapterSection>
+         </ovfenv:Environment>
+      </Vm>
+   </Children>
+</VApp>
\ No newline at end of file

Added: libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vm_test.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vm_test.xml?rev=1333307&view=auto
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vm_test.xml (added)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vApp_vm_test.xml Thu May  3 04:50:15 2012
@@ -0,0 +1,218 @@
+<Vm needsCustomization="false" deployed="true" status="4" name="testVm" id="urn:vcloud:vm:cbfe57d5-7362-482b-b313-e5b5bcff3309" type="application/vnd.vmware.vcloud.vm+xml" href="https://vm-vcloud/api/vApp/vm-test" xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://schemas.dmtf.org/ovf/environment/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8027_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://65.12.64.27/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/w
 scim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <Link rel="power:powerOff" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/power/action/powerOff"/>
+    <Link rel="power:reboot" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/power/action/reboot"/>
+    <Link rel="power:reset" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/power/action/reset"/>
+    <Link rel="power:shutdown" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/power/action/shutdown"/>
+    <Link rel="power:suspend" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/power/action/suspend"/>
+    <Link rel="undeploy" type="application/vnd.vmware.vcloud.undeployVAppParams+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/action/undeploy"/>
+    <Link rel="edit" type="application/vnd.vmware.vcloud.vm+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309"/>
+    <Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/metadata"/>
+    <Link rel="screen:thumbnail" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/screen"/>
+    <Link rel="screen:acquireTicket" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/screen/action/acquireTicket"/>
+    <Link rel="media:insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/media/action/insertMedia"/>
+    <Link rel="media:ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/media/action/ejectMedia"/>
+    <Link rel="installVmwareTools" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/action/installVMwareTools"/>
+    <Link rel="up" type="application/vnd.vmware.vcloud.vApp+xml" href="https://vm-vcloud/api/vApp/vapp-80786752-9d91-4c97-912c-e8532c726905"/>
+    <Description/>
+    <Tasks>
+        <Task status="error" startTime="2012-04-22T09:06:59.386-04:00" operationName="vappUpdateVm" operation="Updated Virtual Machine ScrumVM_Master(cbfe57d5-7362-482b-b313-e5b5bcff3309)" expiryTime="2012-07-21T09:06:59.386-04:00" endTime="2012-04-22T09:07:01.077-04:00" name="task" id="urn:vcloud:task:024bfef6-5aed-4d9b-b982-1be264043882" type="application/vnd.vmware.vcloud.task+xml" href="https://vm-vcloud/api/task/024bfef6-5aed-4d9b-b982-1be264043882">
+            <Owner type="application/vnd.vmware.vcloud.vm+xml" name="ScrumVM_Master" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309"/>
+            <Error minorErrorCode="VIM_INVALID_DISK_PARAMETERS" message="Invalid hard disk parameters specified. The following parameters are invalid or conflict with other configured devices in the virtual machine:    Adaptor Type: SCSILSILOGIC, Bus Number: 0, Unit Number: 0" majorErrorCode="400"/>
+            <User type="application/vnd.vmware.admin.user+xml" name="labmanapi" href="https://vm-vcloud/api/admin/user/46f62cc3-65e0-4417-967a-a538ec6caea3"/>
+            <Organization type="application/vnd.vmware.vcloud.org+xml" name="NetSuite" href="https://vm-vcloud/api/org/96726c78-4ae3-402f-b08b-7a78c6903d2a"/>
+        </Task>
+    </Tasks>
+    <ovf:VirtualHardwareSection ovf:transport="" vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
+        <ovf:Info>Virtual hardware requirements</ovf:Info>
+        <ovf:System>
+            <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
+            <vssd:InstanceID>0</vssd:InstanceID>
+            <vssd:VirtualSystemIdentifier>ScrumVM_Master</vssd:VirtualSystemIdentifier>
+            <vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
+        </ovf:System>
+        <ovf:Item>
+            <rasd:Address>00:50:56:01:00:d9</rasd:Address>
+            <rasd:AddressOnParent>0</rasd:AddressOnParent>
+            <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
+            <rasd:Connection vcloud:ipAddress="65.33.65.9" vcloud:primaryNetworkConnection="true" vcloud:ipAddressingMode="POOL">vCloud - Default</rasd:Connection>
+            <rasd:Description>PCNet32 ethernet adapter</rasd:Description>
+            <rasd:ElementName>Network adapter 0</rasd:ElementName>
+            <rasd:InstanceID>1</rasd:InstanceID>
+            <rasd:ResourceSubType>PCNet32</rasd:ResourceSubType>
+            <rasd:ResourceType>10</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:Address>0</rasd:Address>
+            <rasd:Description>SCSI Controller</rasd:Description>
+            <rasd:ElementName>SCSI Controller 0</rasd:ElementName>
+            <rasd:InstanceID>2</rasd:InstanceID>
+            <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
+            <rasd:ResourceType>6</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:AddressOnParent>0</rasd:AddressOnParent>
+            <rasd:Description>Hard disk</rasd:Description>
+            <rasd:ElementName>Hard disk 1</rasd:ElementName>
+            <rasd:HostResource vcloud:capacity="61440" vcloud:busSubType="lsilogic" vcloud:busType="6"/>
+            <rasd:InstanceID>2000</rasd:InstanceID>
+            <rasd:Parent>2</rasd:Parent>
+            <rasd:ResourceType>17</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:AddressOnParent>1</rasd:AddressOnParent>
+            <rasd:Description>Hard disk</rasd:Description>
+            <rasd:ElementName>Hard disk 2</rasd:ElementName>
+            <rasd:HostResource vcloud:capacity="16384" vcloud:busSubType="lsilogic" vcloud:busType="6"/>
+            <rasd:InstanceID>2001</rasd:InstanceID>
+            <rasd:Parent>2</rasd:Parent>
+            <rasd:ResourceType>17</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:AddressOnParent>2</rasd:AddressOnParent>
+            <rasd:Description>Hard disk</rasd:Description>
+            <rasd:ElementName>Hard disk 3</rasd:ElementName>
+            <rasd:HostResource vcloud:capacity="16384" vcloud:busSubType="lsilogic" vcloud:busType="6"/>
+            <rasd:InstanceID>2002</rasd:InstanceID>
+            <rasd:Parent>2</rasd:Parent>
+            <rasd:ResourceType>17</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:AddressOnParent>3</rasd:AddressOnParent>
+            <rasd:Description>Hard disk</rasd:Description>
+            <rasd:ElementName>Hard disk 4</rasd:ElementName>
+            <rasd:HostResource vcloud:capacity="30720" vcloud:busSubType="lsilogic" vcloud:busType="6"/>
+            <rasd:InstanceID>2003</rasd:InstanceID>
+            <rasd:Parent>2</rasd:Parent>
+            <rasd:ResourceType>17</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:Address>0</rasd:Address>
+            <rasd:Description>IDE Controller</rasd:Description>
+            <rasd:ElementName>IDE Controller 0</rasd:ElementName>
+            <rasd:InstanceID>3</rasd:InstanceID>
+            <rasd:ResourceType>5</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:AddressOnParent>0</rasd:AddressOnParent>
+            <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
+            <rasd:Description>CD/DVD Drive</rasd:Description>
+            <rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
+            <rasd:HostResource/>
+            <rasd:InstanceID>3002</rasd:InstanceID>
+            <rasd:Parent>3</rasd:Parent>
+            <rasd:ResourceType>15</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item>
+            <rasd:AddressOnParent>0</rasd:AddressOnParent>
+            <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
+            <rasd:Description>Floppy Drive</rasd:Description>
+            <rasd:ElementName>Floppy Drive 1</rasd:ElementName>
+            <rasd:HostResource/>
+            <rasd:InstanceID>8000</rasd:InstanceID>
+            <rasd:ResourceType>14</rasd:ResourceType>
+        </ovf:Item>
+        <ovf:Item vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
+            <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
+            <rasd:Description>Number of Virtual CPUs</rasd:Description>
+            <rasd:ElementName>2 virtual CPU(s)</rasd:ElementName>
+            <rasd:InstanceID>4</rasd:InstanceID>
+            <rasd:Reservation>0</rasd:Reservation>
+            <rasd:ResourceType>3</rasd:ResourceType>
+            <rasd:VirtualQuantity>2</rasd:VirtualQuantity>
+            <rasd:Weight>0</rasd:Weight>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/cpu"/>
+        </ovf:Item>
+        <ovf:Item vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
+            <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
+            <rasd:Description>Memory Size</rasd:Description>
+            <rasd:ElementName>4096 MB of memory</rasd:ElementName>
+            <rasd:InstanceID>5</rasd:InstanceID>
+            <rasd:Reservation>0</rasd:Reservation>
+            <rasd:ResourceType>4</rasd:ResourceType>
+            <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
+            <rasd:Weight>0</rasd:Weight>
+            <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/memory"/>
+        </ovf:Item>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/"/>
+        <Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/cpu"/>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/cpu"/>
+        <Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/memory"/>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/memory"/>
+        <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/disks"/>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/disks"/>
+        <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/media"/>
+        <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/networkCards"/>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/networkCards"/>
+        <Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/serialPorts"/>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/serialPorts"/>
+    </ovf:VirtualHardwareSection>
+    <ovf:OperatingSystemSection ovf:id="80" vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/operatingSystemSection/" vcloud:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="rhel5_64Guest" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:vmw="http://www.vmware.com/schema/ovf">
+        <ovf:Info>Specifies the operating system installed</ovf:Info>
+        <ovf:Description>Red Hat Enterprise Linux 5 (64-bit)</ovf:Description>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.operatingSystemSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/operatingSystemSection/"/>
+    </ovf:OperatingSystemSection>
+    <NetworkConnectionSection type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/networkConnectionSection/" ovf:required="false">
+        <ovf:Info>Specifies the available VM network connections</ovf:Info>
+        <PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
+        <NetworkConnection network="vCloud - Default" needsCustomization="false">
+            <NetworkConnectionIndex>0</NetworkConnectionIndex>
+            <IpAddress>65.33.65.9</IpAddress>
+            <IsConnected>true</IsConnected>
+            <MACAddress>00:50:56:01:00:d9</MACAddress>
+            <IpAddressAllocationMode>POOL</IpAddressAllocationMode>
+        </NetworkConnection>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/networkConnectionSection/"/>
+    </NetworkConnectionSection>
+    <GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/guestCustomizationSection/" ovf:required="false">
+        <ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
+        <Enabled>true</Enabled>
+        <ChangeSid>false</ChangeSid>
+        <VirtualMachineId>cbfe57d5-7362-482b-b313-e5b5bcff3309</VirtualMachineId>
+        <JoinDomainEnabled>false</JoinDomainEnabled>
+        <UseOrgSettings>false</UseOrgSettings>
+        <AdminPasswordEnabled>true</AdminPasswordEnabled>
+        <AdminPasswordAuto>true</AdminPasswordAuto>
+        <AdminPassword>jW!4$$2i</AdminPassword>
+        <ResetPasswordRequired>false</ResetPasswordRequired>
+        <CustomizationScript>#/bin/sh
+            /usr/local/sbin/ns-guest-customization.sh "$@"</CustomizationScript>
+        <ComputerName>ScrumVMMast-001</ComputerName>
+        <Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/guestCustomizationSection/"/>
+    </GuestCustomizationSection>
+    <RuntimeInfoSection vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/runtimeInfoSection" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
+        <ovf:Info>Specifies Runtime info</ovf:Info>
+        <VMWareTools version="8290"/>
+    </RuntimeInfoSection>
+    <VAppScopedLocalId>ScrumVM_Master</VAppScopedLocalId>
+    <ovfenv:Environment ovfenv:id="" ns8:vCenterId="vm-24174" xmlns:ns8="http://www.vmware.com/schema/ovfenv">
+        <ovfenv:PlatformSection>
+            <ovfenv:Kind>VMware ESXi</ovfenv:Kind>
+            <ovfenv:Version>5.0.0</ovfenv:Version>
+            <ovfenv:Vendor>VMware, Inc.</ovfenv:Vendor>
+            <ovfenv:Locale>en</ovfenv:Locale>
+        </ovfenv:PlatformSection>
+        <ovfenv:PropertySection>
+            <ovfenv:Property ovfenv:value="Iy9iaW4vc2gNCi91c3IvbG9jYWwvc2Jpbi9ucy1ndWVzdC1jdXN0b21pemF0aW9uLnNoICIkQCI=" ovfenv:key="vCloud_CustomizationInfo"/>
+            <ovfenv:Property ovfenv:value="None" ovfenv:key="vCloud_UseSysPrep"/>
+            <ovfenv:Property ovfenv:value="jW!4$$2i" ovfenv:key="vCloud_adminPassword"/>
+            <ovfenv:Property ovfenv:value="1" ovfenv:key="vCloud_bitMask"/>
+            <ovfenv:Property ovfenv:value="static" ovfenv:key="vCloud_bootproto_0"/>
+            <ovfenv:Property ovfenv:value="ScrumVMMast-001" ovfenv:key="vCloud_computerName"/>
+            <ovfenv:Property ovfenv:value="65.33.42.113" ovfenv:key="vCloud_dns1_0"/>
+            <ovfenv:Property ovfenv:value="65.33.42.114" ovfenv:key="vCloud_dns2_0"/>
+            <ovfenv:Property ovfenv:value="65.33.64.1" ovfenv:key="vCloud_gateway_0"/>
+            <ovfenv:Property ovfenv:value="65.33.65.9" ovfenv:key="vCloud_ip_0"/>
+            <ovfenv:Property ovfenv:value="00:50:56:01:00:d9" ovfenv:key="vCloud_macaddr_0"/>
+            <ovfenv:Property ovfenv:value="2f565fb1-f51d-4c12-a52f-353bb8a2c6cf" ovfenv:key="vCloud_markerid"/>
+            <ovfenv:Property ovfenv:value="255.255.252.0" ovfenv:key="vCloud_netmask_0"/>
+            <ovfenv:Property ovfenv:value="1" ovfenv:key="vCloud_numnics"/>
+            <ovfenv:Property ovfenv:value="0" ovfenv:key="vCloud_primaryNic"/>
+            <ovfenv:Property ovfenv:value="437009973" ovfenv:key="vCloud_reconfigToken"/>
+            <ovfenv:Property ovfenv:value="0" ovfenv:key="vCloud_resetPassword"/>
+            <ovfenv:Property ovfenv:value="vm.netsuite.com" ovfenv:key="vCloud_suffix_0"/>
+        </ovfenv:PropertySection>
+        <ve:EthernetAdapterSection xmlns:ve="http://www.vmware.com/schema/ovfenv" xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:oe="http://schemas.dmtf.org/ovf/environment/1">
+            <ve:Adapter ve:mac="00:50:56:01:00:d9" ve:network="VM Network" ve:unitNumber="7"/>
+        </ve:EthernetAdapterSection>
+    </ovfenv:Environment>
+</Vm>
\ No newline at end of file

Modified: libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vdc_3d9ae28c_1de9_4307_8107_9356ff8ba6d0.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vdc_3d9ae28c_1de9_4307_8107_9356ff8ba6d0.xml?rev=1333307&r1=1333306&r2=1333307&view=diff
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vdc_3d9ae28c_1de9_4307_8107_9356ff8ba6d0.xml (original)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/api_vdc_3d9ae28c_1de9_4307_8107_9356ff8ba6d0.xml Thu May  3 04:50:15 2012
@@ -35,7 +35,8 @@
    </ComputeCapacity>
    <ResourceEntities>
       <ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="testNode" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6a"/>
-       <ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="deleted-test" href="https://vm-vcloud/api/vApp/vapp-access-to-resource-forbidden"/>
+      <ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="testNode2" href="https://vm-vcloud/api/vApp/vapp-8c57a5b6-e61b-48ca-8a78-3b70ee65ef6b"/>
+      <ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="deleted-test" href="https://vm-vcloud/api/vApp/vapp-access-to-resource-forbidden"/>
       <ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="VMTemplate_Master" href="https://vm-vcloud/api/vAppTemplate/vappTemplate-ac1bc027-bf8c-4050-8643-4971f691c158"/>
    </ResourceEntities>
    <AvailableNetworks>

Added: libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_cpu.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_cpu.xml?rev=1333307&view=auto
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_cpu.xml (added)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_cpu.xml Thu May  3 04:50:15 2012
@@ -0,0 +1,11 @@
+<Item vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://65.33.64.27/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
+    <rasd:Description>Number of Virtual CPUs</rasd:Description>
+    <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
+    <rasd:InstanceID>4</rasd:InstanceID>
+    <rasd:Reservation>0</rasd:Reservation>
+    <rasd:ResourceType>3</rasd:ResourceType>
+    <rasd:VirtualQuantity>1</rasd:VirtualQuantity>
+    <rasd:Weight>0</rasd:Weight>
+    <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/cpu"/>
+</Item>
\ No newline at end of file

Added: libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_disks.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_disks.xml?rev=1333307&view=auto
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_disks.xml (added)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_disks.xml Thu May  3 04:50:15 2012
@@ -0,0 +1,54 @@
+<RasdItemsList type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-test/virtualHardwareSection/disks" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://63.22.64.27/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vm-vcloud/api/vApp/vm-test/virtualHardwareSection/disks"/>
+    <Item>
+        <rasd:Address>0</rasd:Address>
+        <rasd:Description>SCSI Controller</rasd:Description>
+        <rasd:ElementName>SCSI Controller 0</rasd:ElementName>
+        <rasd:InstanceID>2</rasd:InstanceID>
+        <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
+        <rasd:ResourceType>6</rasd:ResourceType>
+    </Item>
+    <Item>
+        <rasd:AddressOnParent>0</rasd:AddressOnParent>
+        <rasd:Description>Hard disk</rasd:Description>
+        <rasd:ElementName>Hard disk 1</rasd:ElementName>
+        <rasd:HostResource vcloud:capacity="61440" vcloud:busSubType="lsilogic" vcloud:busType="6" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"/>
+        <rasd:InstanceID>2000</rasd:InstanceID>
+        <rasd:Parent>2</rasd:Parent>
+        <rasd:ResourceType>17</rasd:ResourceType>
+    </Item>
+    <Item>
+        <rasd:AddressOnParent>1</rasd:AddressOnParent>
+        <rasd:Description>Hard disk</rasd:Description>
+        <rasd:ElementName>Hard disk 2</rasd:ElementName>
+        <rasd:HostResource vcloud:capacity="16384" vcloud:busSubType="lsilogic" vcloud:busType="6" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"/>
+        <rasd:InstanceID>2001</rasd:InstanceID>
+        <rasd:Parent>2</rasd:Parent>
+        <rasd:ResourceType>17</rasd:ResourceType>
+    </Item>
+    <Item>
+        <rasd:AddressOnParent>2</rasd:AddressOnParent>
+        <rasd:Description>Hard disk</rasd:Description>
+        <rasd:ElementName>Hard disk 3</rasd:ElementName>
+        <rasd:HostResource vcloud:capacity="16384" vcloud:busSubType="lsilogic" vcloud:busType="6" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"/>
+        <rasd:InstanceID>2002</rasd:InstanceID>
+        <rasd:Parent>2</rasd:Parent>
+        <rasd:ResourceType>17</rasd:ResourceType>
+    </Item>
+    <Item>
+        <rasd:AddressOnParent>3</rasd:AddressOnParent>
+        <rasd:Description>Hard disk</rasd:Description>
+        <rasd:ElementName>Hard disk 4</rasd:ElementName>
+        <rasd:HostResource vcloud:capacity="30720" vcloud:busSubType="lsilogic" vcloud:busType="6" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"/>
+        <rasd:InstanceID>2003</rasd:InstanceID>
+        <rasd:Parent>2</rasd:Parent>
+        <rasd:ResourceType>17</rasd:ResourceType>
+    </Item>
+    <Item>
+        <rasd:Address>0</rasd:Address>
+        <rasd:Description>IDE Controller</rasd:Description>
+        <rasd:ElementName>IDE Controller 0</rasd:ElementName>
+        <rasd:InstanceID>3</rasd:InstanceID>
+        <rasd:ResourceType>5</rasd:ResourceType>
+    </Item>
+</RasdItemsList>
\ No newline at end of file

Added: libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_memory.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_memory.xml?rev=1333307&view=auto
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_memory.xml (added)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/get_api_vApp_vm_test_virtualHardwareSection_memory.xml Thu May  3 04:50:15 2012
@@ -0,0 +1,11 @@
+<Item vcloud:href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://66.33.64.27/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
+    <rasd:Description>Memory Size</rasd:Description>
+    <rasd:ElementName>4096 MB of memory</rasd:ElementName>
+    <rasd:InstanceID>5</rasd:InstanceID>
+    <rasd:Reservation>0</rasd:Reservation>
+    <rasd:ResourceType>4</rasd:ResourceType>
+    <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
+    <rasd:Weight>0</rasd:Weight>
+    <Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309/virtualHardwareSection/memory"/>
+</Item>
\ No newline at end of file

Added: libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_cpu.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_cpu.xml?rev=1333307&view=auto
==============================================================================
--- libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_cpu.xml (added)
+++ libcloud/trunk/test/compute/fixtures/vcloud_1_5/put_api_vApp_vm_test_virtualHardwareSection_cpu.xml Thu May  3 04:50:15 2012
@@ -0,0 +1,6 @@
+<Task status="running" startTime="2012-04-22T10:02:55.085-04:00" operationName="vappUpdateVm" operation="Updating Virtual Machine testVm (cbfe57d5-7362-482b-b313-e5b5bcff3309)" expiryTime="2012-07-21T10:02:55.085-04:00" name="task" id="urn:vcloud:task:38547d96-2a98-443e-8e4a-6765415e6c2c" type="application/vnd.vmware.vcloud.task+xml" href="https://vm-vcloud/api/task/b034df55-fe81-4798-bc81-1f0fd0ead450" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://65.33.64.27/api/v1.5/schema/master.xsd" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <Link rel="task:cancel" href="https://vm-vcloud/api/task/38547d96-2a98-443e-8e4a-6765415e6c2c/action/cancel"/>
+    <Owner type="application/vnd.vmware.vcloud.vm+xml" name="ScrumVM_Master" href="https://vm-vcloud/api/vApp/vm-cbfe57d5-7362-482b-b313-e5b5bcff3309"/>
+    <User type="application/vnd.vmware.admin.user+xml" name="labmanapi" href="https://vm-vcloud/api/admin/user/46f62cc3-65e0-4417-967a-a538ec6caea3"/>
+    <Organization type="application/vnd.vmware.vcloud.org+xml" name="NetSuite" href="https://vm-vcloud/api/org/96726c78-4ae3-402f-b08b-7a78c6903d2a"/>
+</Task>
\ No newline at end of file



Mime
View raw message