libcloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r905838 - in /incubator/libcloud/trunk: libcloud/drivers/vcloud.py test/test_vcloud.py
Date Tue, 02 Feb 2010 23:40:40 GMT
Author: pquerna
Date: Tue Feb  2 23:40:40 2010
New Revision: 905838

URL: http://svn.apache.org/viewvc?rev=905838&view=rev
Log:
The xmlns was changed in Terramark to be compliant with the current vCloud API spec. Fixes
LIBCLOUD-5.

Submitted by: Tom White <tom cloudera.com>

Modified:
    incubator/libcloud/trunk/libcloud/drivers/vcloud.py
    incubator/libcloud/trunk/test/test_vcloud.py

Modified: incubator/libcloud/trunk/libcloud/drivers/vcloud.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/vcloud.py?rev=905838&r1=905837&r2=905838&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/vcloud.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/vcloud.py Tue Feb  2 23:40:40 2010
@@ -78,7 +78,7 @@
             "InstantiateVAppTemplateParams", 
             {'name': self.name,
              'xml:lang': 'en',
-             'xmlns': "http://www.vmware.com/vcloud/v1",
+             'xmlns': "http://www.vmware.com/vcloud/v0.8",
              'xmlns:xsi': "http://www.w3.org/2001/XMLSchema-instance"}
         )
 
@@ -93,7 +93,7 @@
         prod_section = ET.SubElement(
             parent,
             "ProductSection",
-            {'xmlns:q1': "http://www.vmware.com/vcloud/v1",
+            {'xmlns:q1': "http://www.vmware.com/vcloud/v0.8",
              'xmlns:ovf': "http://schemas.dmtf.org/ovf/envelope/1"}
         )
 
@@ -121,7 +121,7 @@
         vh = ET.SubElement(
             parent,
             "VirtualHardwareSection",
-            {'xmlns:q1': "http://www.vmware.com/vcloud/v1"}
+            {'xmlns:q1': "http://www.vmware.com/vcloud/v0.8"}
         )
 
         self._add_cpu(vh)
@@ -286,20 +286,17 @@
 
     def _to_node(self, name, elm):
         state = self.NODE_STATE_MAP[elm.get('status')]
-        public_ips = [ip.text for ip in elm.findall(fixxpath(elm, 'NetworkConnectionSection/NetworkConnection/IPAddress'))]
+        public_ips = []
+        private_ips = []
 
         # Following code to find private IPs works for Terremark
-        sections = elm.findall('{http://schemas.dmtf.org/ovf/envelope/1}Section')
-        network_connection_section = None
-        for section in sections:
-          section_type = section.get('{http://www.w3.org/2001/XMLSchema-instance}type')
-          if section_type == 'q1:NetworkConnectionSectionType':
-            network_connection_section = section
-        
-        if network_connection_section:
-          private_ips = [ip.text for ip in network_connection_section.findall(fixxpath(elm,
'NetworkConnection/IpAddress'))]
-        else:
-          private_ips = []
+        connections = elm.findall('{http://schemas.dmtf.org/ovf/envelope/1}NetworkConnectionSection/{http://www.vmware.com/vcloud/v0.8}NetworkConnection')
+        for connection in connections:
+          ips = [ip.text for ip in connection.findall(fixxpath(elm, "IpAddress"))]
+          if connection.get('Network') == 'Internal':
+            private_ips.extend(ips)
+          else:
+            public_ips.extend(ips)
 
         node = Node(id=elm.get('href'),
                     name=name,

Modified: incubator/libcloud/trunk/test/test_vcloud.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_vcloud.py?rev=905838&r1=905837&r2=905838&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_vcloud.py (original)
+++ incubator/libcloud/trunk/test/test_vcloud.py Tue Feb  2 23:40:40 2010
@@ -81,14 +81,14 @@
 
     def _api_v0_8_login(self, method, url, body, headers):
         headers['set-cookie'] = 'vcloud-token=testtoken'
-        body = """<OrgList xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<OrgList xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Org href="https://services.vcloudexpress.terremark.com/api/v0.8/org/240" type="application/vnd.vmware.vcloud.org+xml"
name="a@example.com"/>
 </OrgList>
 """
         return (httplib.OK, body, headers, httplib.responses[httplib.OK])
 
     def _api_v0_8_org_240(self, method, url, body, headers):
-        body = """<Org href="https://services.vcloudexpress.terremark.com/api/v0.8/org/240"
name="a@example.com" xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Org href="https://services.vcloudexpress.terremark.com/api/v0.8/org/240"
name="a@example.com" xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224"
type="application/vnd.vmware.vcloud.vdc+xml" name="Miami Environment 1"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224/catalog"
type="application/vnd.vmware.vcloud.catalog+xml" name="Miami Environment 1 Catalog"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/tasksList/224"
type="application/vnd.vmware.vcloud.tasksList+xml" name="Miami Environment 1 Tasks List"/>
@@ -97,7 +97,7 @@
         return (httplib.OK, body, headers, httplib.responses[httplib.OK])
 
     def _api_v0_8_vdc_224(self, method, url, body, headers):
-        body = """<Vdc href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224"
type="application/vnd.vmware.vcloud.vdc+xml" name="Miami Environment 1" xmlns="http://www.vmware.com/vcloud/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Vdc href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224"
type="application/vnd.vmware.vcloud.vdc+xml" name="Miami Environment 1" xmlns="http://www.vmware.com/vcloud/v0.8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224/catalog"
type="application/vnd.vmware.vcloud.catalog+xml" name="Miami Environment 1"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224/publicIps"
type="application/xml" name="Public IPs"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224/internetServices"
type="application/xml" name="Internet Services"/>
@@ -113,7 +113,7 @@
         return (httplib.OK, body, headers, httplib.responses[httplib.OK])
 
     def _api_v0_8_vdc_224_catalog(self, method, url, body, headers):
-        body = """<Catalog href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224/catalog"
type="application/vnd.vmware.vcloud.catalog+xml" name="Miami Environment 1" xmlns="http://www.vmware.com/vcloud/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Catalog href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224/catalog"
type="application/vnd.vmware.vcloud.catalog+xml" name="Miami Environment 1" xmlns="http://www.vmware.com/vcloud/v0.8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <CatalogItems>
     <CatalogItem href="https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/5"
type="application/vnd.vmware.vcloud.catalogItem+xml" name="CentOS 5.3 (32-bit)"/>
   </CatalogItems>
@@ -122,7 +122,7 @@
         return (httplib.OK, body, headers, httplib.responses[httplib.OK])
 
     def _api_v0_8_catalogItem_5(self, method, url, body, headers):
-        body = """<CatalogItem href="https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/5"
type="application/vnd.vmware.vcloud.catalogItem+xml" name="CentOS 5.3 (32-bit)" xmlns="http://www.vmware.com/vcloud/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<CatalogItem href="https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/5"
type="application/vnd.vmware.vcloud.catalogItem+xml" name="CentOS 5.3 (32-bit)" xmlns="http://www.vmware.com/vcloud/v0.8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/5/options/compute"
type="application/xml" name="Compute Options"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/5/options/customization"
type="application/xml" name="Customization Options"/>
   <Entity href="https://services.vcloudexpress.terremark.com/api/v0.8/vAppTemplate/5"
type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="CentOS 5.3 (32-bit)"/>
@@ -132,14 +132,14 @@
         return (httplib.OK, body, headers, httplib.responses[httplib.OK])
       
     def _api_v0_8_vdc_224_action_instantiateVAppTemplate(self, method, url, body, headers):
-        body = """<VApp href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031"
type="application/vnd.vmware.vcloud.vApp+xml" name="testerpart2" status="0" size="10" xmlns="http://www.vmware.com/vcloud/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<VApp href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031"
type="application/vnd.vmware.vcloud.vApp+xml" name="testerpart2" status="0" size="10" xmlns="http://www.vmware.com/vcloud/v0.8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Link rel="up" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224"
type="application/vnd.vmware.vcloud.vdc+xml"/>
 </VApp>
 """
         return (httplib.OK, body, headers, httplib.responses[httplib.OK])
       
     def _api_v0_8_vapp_14031_action_deploy(self, method, url, body, headers):
-        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10496"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-13T23:58:22.893Z"
xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10496"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-13T23:58:22.893Z"
xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Owner href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224" type="application/vnd.vmware.vcloud.vdc+xml"
name="Miami Environment 1"/>
   <Result href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031" type="application/vnd.vmware.vcloud.vApp+xml"
name="testerpart2"/>
 </Task>
@@ -147,7 +147,7 @@
         return (httplib.ACCEPTED, body, headers, httplib.responses[httplib.ACCEPTED])
       
     def _api_v0_8_task_10496(self, method, url, body, headers):
-        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10496"
type="application/vnd.vmware.vcloud.task+xml" status="success" startTime="2009-11-13T23:58:22.893Z"
endTime="2009-11-14T00:01:02.507Z" xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10496"
type="application/vnd.vmware.vcloud.task+xml" status="success" startTime="2009-11-13T23:58:22.893Z"
endTime="2009-11-14T00:01:02.507Z" xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Owner href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224" type="application/vnd.vmware.vcloud.vdc+xml"
name="Miami Environment 1"/>
   <Result href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031" type="application/vnd.vmware.vcloud.vApp+xml"
name="testerpart2"/>
 </Task>
@@ -155,7 +155,7 @@
         return (httplib.ACCEPTED, body, headers, httplib.responses[httplib.ACCEPTED])
       
     def _api_v0_8_vapp_14031_power_action_powerOn(self, method, url, body, headers):
-        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10499"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-14T00:01:05.227Z"
xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10499"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-14T00:01:05.227Z"
xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Owner href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224" type="application/vnd.vmware.vcloud.vdc+xml"
name="Miami Environment 1"/>
   <Result href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031" type="application/vnd.vmware.vcloud.vApp+xml"
name="testerpart2"/>
 </Task>
@@ -165,22 +165,22 @@
       
     def _api_v0_8_vapp_14031(self, method, url, body, headers):
         if method == 'GET':
-            body = """<VApp href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031"
type="application/vnd.vmware.vcloud.vApp+xml" name="testerpart2" status="4" size="10485760"
xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+            body = """<VApp href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031"
type="application/vnd.vmware.vcloud.vApp+xml" name="testerpart2" status="4" size="10485760"
xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Link rel="up" href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224"
type="application/vnd.vmware.vcloud.vdc+xml"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031/options/compute"
type="application/xml" name="Compute Options"/>
   <Link rel="down" href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031/options/customization"
type="application/xml" name="Customization Options"/>
-  <Section xsi:type="q1:NetworkConnectionSectionType" xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:q1="http://www.vmware.com/vcloud/v1">
-    <q1:NetworkConnection Network="Internal">
-      <q1:IpAddress>10.112.78.69</q1:IpAddress>
-    </q1:NetworkConnection>
-  </Section>
+  <NetworkConnectionSection xmlns="http://schemas.dmtf.org/ovf/envelope/1">
+    <NetworkConnection Network="Internal" xmlns="http://www.vmware.com/vcloud/v0.8">
+      <IpAddress>10.112.78.69</IpAddress>
+    </NetworkConnection>
+  </NetworkConnectionSection>
   <OperatingSystemSection d2p1:id="25" xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:d2p1="http://schemas.dmtf.org/ovf/envelope/1">
     <Info>The kind of installed guest operating system</Info>
     <Description>Red Hat Enterprise Linux 5 (32-bit)</Description>
   </OperatingSystemSection>
-  <Section xsi:type="q2:VirtualHardwareSection_Type" xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:q2="http://www.vmware.com/vcloud/v1">
+  <VirtualHardwareSection xmlns="http://schemas.dmtf.org/ovf/envelope/1">
     <Info>Virtual Hardware</Info>
-    <q2:System>
+    <System>
       <AutomaticRecoveryAction xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"/>
       <AutomaticShutdownAction xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"/>
       <AutomaticStartupAction xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"/>
@@ -201,8 +201,8 @@
       <SwapFileDataRoot xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"/>
       <VirtualSystemIdentifier xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData">testerpart2</VirtualSystemIdentifier>
       <VirtualSystemType xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData">vmx-07</VirtualSystemType>
-    </q2:System>
-    <q2:Item>
+    </System>
+    <Item>
       <Address xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <AddressOnParent xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <AllocationUnits xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">hertz
* 10^6</AllocationUnits>
@@ -224,8 +224,8 @@
       <VirtualQuantity xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">2</VirtualQuantity>
       <VirtualQuantityUnits xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">count</VirtualQuantityUnits>
       <Weight xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
-    </q2:Item>
-    <q2:Item>
+    </Item>
+    <Item>
       <Address xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <AddressOnParent xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <AllocationUnits xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">byte
* 2^20</AllocationUnits>
@@ -247,8 +247,8 @@
       <VirtualQuantity xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">512</VirtualQuantity>
       <VirtualQuantityUnits xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">byte
* 2^20</VirtualQuantityUnits>
       <Weight xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
-    </q2:Item>
-    <q2:Item>
+    </Item>
+    <Item>
       <Address xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">0</Address>
       <AddressOnParent xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <AllocationUnits xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
@@ -270,8 +270,8 @@
       <VirtualQuantity xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <VirtualQuantityUnits xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <Weight xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
-    </q2:Item>
-    <q2:Item>
+    </Item>
+    <Item>
       <Address xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <AddressOnParent xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">0</AddressOnParent>
       <AllocationUnits xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
@@ -294,8 +294,8 @@
       <VirtualQuantity xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">10485760</VirtualQuantity>
       <VirtualQuantityUnits xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
       <Weight xsi:nil="true" xmlns="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"/>
-    </q2:Item>
-  </Section>
+    </Item>
+  </VirtualHardwareSection>
 </VApp>
 """
         elif method == 'DELETE':
@@ -303,7 +303,7 @@
         return (httplib.ACCEPTED, body, headers, httplib.responses[httplib.ACCEPTED])
 
     def _api_v0_8_vapp_14031_power_action_reset(self, method, url, body, headers):
-        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10555"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-14T00:54:50.417Z"
xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/10555"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-14T00:54:50.417Z"
xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Owner href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224" type="application/vnd.vmware.vcloud.vdc+xml"
name="Miami Environment 1"/>
   <Result href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031" type="application/vnd.vmware.vcloud.vApp+xml"
name="testerpart2"/>
 </Task>
@@ -311,7 +311,7 @@
         return (httplib.ACCEPTED, body, headers, httplib.responses[httplib.ACCEPTED])
 
     def _api_v0_8_vapp_14031_power_action_poweroff(self, method, url, body, headers):
-        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/11001"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-16T18:18:02.82Z"
xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/11001"
type="application/vnd.vmware.vcloud.task+xml" status="queued" startTime="2009-11-16T18:18:02.82Z"
xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Owner href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224" type="application/vnd.vmware.vcloud.vdc+xml"
name="Miami Environment 1"/>
   <Result href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031" type="application/vnd.vmware.vcloud.vApp+xml"
name="testerpart2"/>
 </Task>
@@ -319,7 +319,7 @@
         return (httplib.ACCEPTED, body, headers, httplib.responses[httplib.ACCEPTED])
 
     def _api_v0_8_task_11001(self, method, url, body, headers):
-        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/11001"
type="application/vnd.vmware.vcloud.task+xml" status="success" startTime="2009-11-16T18:18:02.82Z"
endTime="2009-11-16T18:18:17.567Z" xmlns="http://www.vmware.com/vcloud/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+        body = """<Task href="https://services.vcloudexpress.terremark.com/api/v0.8/task/11001"
type="application/vnd.vmware.vcloud.task+xml" status="success" startTime="2009-11-16T18:18:02.82Z"
endTime="2009-11-16T18:18:17.567Z" xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Owner href="https://services.vcloudexpress.terremark.com/api/v0.8/vdc/224" type="application/vnd.vmware.vcloud.vdc+xml"
name="Miami Environment 1"/>
   <Result href="https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031" type="application/vnd.vmware.vcloud.vApp+xml"
name="testerpart2"/>
 </Task>



Mime
View raw message