libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1438331 [2/2] - in /libcloud/trunk: ./ libcloud/common/ libcloud/compute/ libcloud/compute/drivers/ libcloud/test/compute/ libcloud/test/compute/fixtures/abiquo/
Date Fri, 25 Jan 2013 05:48:37 GMT
Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualAppliance>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml" rel="edit"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/ips" type="application/vnd.abiquo.ip+xml" rel="ips"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/price" type="text/plain" rel="price"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/state" type="application/vnd.abiquo.virtualappliancestate+xml" rel="state"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" rel="virtualmachines"/>
+    <error>0</error>
+    <highDisponibility>0</highDisponibility>
+    <id>6</id>
+    <name>libcloud</name>
+    <nodeconnections>&lt;connections/&gt;</nodeconnections>
+    <publicApp>0</publicApp>
+    <state>DEPLOYED</state>
+</virtualAppliance>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<acceptedrequest>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/1da8c8b6-86f6-49ef-9d29-57dcc73b875a" rel="status"/>
+    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
+</acceptedrequest>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/1da8c8b6-86f6-49ef-9d29-57dcc73b875a" rel="self"/>
+    <jobs>
+        <job>
+            <description>Undeploy task's power off on virtual machine with id 3</description>
+            <id>1da8c8b6-86f6-49ef-9d29-57dcc73b875a.103a1a6b-4de2-48d8-9a38-8698561020b8</id>
+            <parentTaskId>1da8c8b6-86f6-49ef-9d29-57dcc73b875a</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1358012669</timestamp>
+            <type>POWER_OFF</type>
+        </job>
+        <job>
+            <description>Undeploy task's deconfigure on virtual machine with id 3</description>
+            <id>1da8c8b6-86f6-49ef-9d29-57dcc73b875a.e4250ca9-505d-4640-9ad2-fb101f9e9978</id>
+            <parentTaskId>1da8c8b6-86f6-49ef-9d29-57dcc73b875a</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1358012669</timestamp>
+            <type>DECONFIGURE</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>FINISHED_SUCCESSFULLY</state>
+    <taskId>1da8c8b6-86f6-49ef-9d29-57dcc73b875a</taskId>
+    <timestamp>1358012669</timestamp>
+    <type>UNDEPLOY</type>
+    <userId>admin</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task_failed.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task_failed.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task_failed.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_undeploy_task_failed.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/1da8c8b6-86f6-49ef-9d29-57dcc73b875a" rel="self"/>
+    <jobs>
+        <job>
+            <description>Undeploy task's power off on virtual machine with id 3</description>
+            <id>1da8c8b6-86f6-49ef-9d29-57dcc73b875a.103a1a6b-4de2-48d8-9a38-8698561020b8</id>
+            <parentTaskId>1da8c8b6-86f6-49ef-9d29-57dcc73b875a</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1358012669</timestamp>
+            <type>POWER_OFF</type>
+        </job>
+        <job>
+            <description>Undeploy task's deconfigure on virtual machine with id 3</description>
+            <id>1da8c8b6-86f6-49ef-9d29-57dcc73b875a.e4250ca9-505d-4640-9ad2-fb101f9e9978</id>
+            <parentTaskId>1da8c8b6-86f6-49ef-9d29-57dcc73b875a</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1358012669</timestamp>
+            <type>DECONFIGURE</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>FINISHED_UNSUCCESSFULLY</state>
+    <taskId>1da8c8b6-86f6-49ef-9d29-57dcc73b875a</taskId>
+    <timestamp>1358012669</timestamp>
+    <type>UNDEPLOY</type>
+    <userId>admin</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualmachinewithnode>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" rel="configurations"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="edit"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/instance" type="application/vnd.abiquo.acceptedrequest+xml" rel="instance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations/2" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" rel="network_configuration"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics" type="application/vnd.abiquo.nics+xml" rel="nics"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2/ips/64" type="application/vnd.abiquo.ip+xml" rel="privateip"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/reset" type="application/vnd.abiquo.acceptedrequest+xml" rel="reset"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/state" type="application/vnd.abiquo.virtualmachinestate+xml" rel="state"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" type="application/vnd.abiquo.tasks+xml" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/users/2" type="application/vnd.abiquo.user+xml" rel="user"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml; version=2.0" rel="virtualappliance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/11" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+    <cpu>1</cpu><hdInBytes>27262976</hdInBytes><highDisponibility>0</highDisponibility><id>3</id><idState>1</idState><idType>1</idType><name>ABQ_914f8125-33d3-4fe3-a162-5d6f5bf32614</name><ram>128</ram><state>NOT_ALLOCATED</state><uuid>914f8125-33d3-4fe3-a162-5d6f5bf32614</uuid><vdrpPort>5901</vdrpPort><nodeId>3</nodeId><nodeName>node-name</nodeName><x>0</x><y>0</y><vdrpIp>80.12.23.43</vdrpIp></virtualmachinewithnode>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_allocated.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_allocated.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_allocated.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_allocated.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualmachinewithnode>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" rel="configurations"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="edit"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/instance" type="application/vnd.abiquo.acceptedrequest+xml" rel="instance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations/2" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" rel="network_configuration"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics" type="application/vnd.abiquo.nics+xml" rel="nics"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2/ips/64" type="application/vnd.abiquo.ip+xml" rel="privateip"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/reset" type="application/vnd.abiquo.acceptedrequest+xml" rel="reset"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/state" type="application/vnd.abiquo.virtualmachinestate+xml" rel="state"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" type="application/vnd.abiquo.tasks+xml" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/users/2" type="application/vnd.abiquo.user+xml" rel="user"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml; version=2.0" rel="virtualappliance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/11" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+    <cpu>1</cpu><hdInBytes>27262976</hdInBytes><highDisponibility>0</highDisponibility><id>3</id><idState>1</idState><idType>1</idType><name>ABQ_914f8125-33d3-4fe3-a162-5d6f5bf32614</name><ram>128</ram><state>ALLOCATED</state><uuid>914f8125-33d3-4fe3-a162-5d6f5bf32614</uuid><vdrpPort>5901</vdrpPort><nodeId>3</nodeId><nodeName>node-name</nodeName><x>0</x><y>0</y><vdrpIp>80.12.23.43</vdrpIp></virtualmachinewithnode>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<acceptedrequest>
+<link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/b44fe278-6b0f-4dfb-be81-7c03006a93cb" rel="status"/><message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message></acceptedrequest>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/b44fe278-6b0f-4dfb-be81-7c03006a93cb" rel="self"/>
+    <jobs>
+        <job>
+            <description>Deploy task's configure on virtual machine with id 3</description>
+            <id>b44fe278-6b0f-4dfb-be81-7c03006a93cb.a04623bd-7b2c-4c23-9441-aeaa39dd4893</id>
+            <parentTaskId>b44fe278-6b0f-4dfb-be81-7c03006a93cb</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1357872859</timestamp>
+            <type>CONFIGURE</type>
+        </job>
+        <job>
+            <description>Deploy task's power on on virtual machine with id 3</description>
+            <id>b44fe278-6b0f-4dfb-be81-7c03006a93cb.2fdee19a-4fad-4040-bc94-7acfd6fedc48</id>
+            <parentTaskId>b44fe278-6b0f-4dfb-be81-7c03006a93cb</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1357872859</timestamp>
+            <type>POWER_ON</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>FINISHED_SUCCESSFULLY</state>
+    <taskId>b44fe278-6b0f-4dfb-be81-7c03006a93cb</taskId>
+    <timestamp>1357872859</timestamp>
+    <type>DEPLOY</type>
+    <userId>user</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task_failed.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task_failed.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task_failed.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deploy_task_failed.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/b44fe278-6b0f-4dfb-be81-7c03006a93cb" rel="self"/>
+    <jobs>
+        <job>
+            <description>Deploy task's configure on virtual machine with id 3</description>
+            <id>b44fe278-6b0f-4dfb-be81-7c03006a93cb.a04623bd-7b2c-4c23-9441-aeaa39dd4893</id>
+            <parentTaskId>b44fe278-6b0f-4dfb-be81-7c03006a93cb</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1357872859</timestamp>
+            <type>CONFIGURE</type>
+        </job>
+        <job>
+            <description>Deploy task's power on on virtual machine with id 3</description>
+            <id>b44fe278-6b0f-4dfb-be81-7c03006a93cb.2fdee19a-4fad-4040-bc94-7acfd6fedc48</id>
+            <parentTaskId>b44fe278-6b0f-4dfb-be81-7c03006a93cb</parentTaskId>
+            <rollbackState>UNKNOWN</rollbackState>
+            <state>DONE</state>
+            <timestamp>1357872859</timestamp>
+            <type>POWER_ON</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>ABORTED</state>
+    <taskId>b44fe278-6b0f-4dfb-be81-7c03006a93cb</taskId>
+    <timestamp>1357872859</timestamp>
+    <type>DEPLOY</type>
+    <userId>user</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deployed.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deployed.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deployed.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_deployed.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualmachinewithnode>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" rel="configurations"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="edit"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/instance" type="application/vnd.abiquo.acceptedrequest+xml" rel="instance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations/2" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" rel="network_configuration"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics" type="application/vnd.abiquo.nics+xml" rel="nics"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2/ips/64" type="application/vnd.abiquo.ip+xml" rel="privateip"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/reset" type="application/vnd.abiquo.acceptedrequest+xml" rel="reset"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/state" type="application/vnd.abiquo.virtualmachinestate+xml" rel="state"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" type="application/vnd.abiquo.tasks+xml" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/users/2" type="application/vnd.abiquo.user+xml" rel="user"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml; version=2.0" rel="virtualappliance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/11" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+    <cpu>1</cpu><hdInBytes>27262976</hdInBytes><highDisponibility>0</highDisponibility><id>3</id><idState>1</idState><idType>1</idType><name>ABQ_914f8125-33d3-4fe3-a162-5d6f5bf32614</name><ram>128</ram><state>ON</state><uuid>914f8125-33d3-4fe3-a162-5d6f5bf32614</uuid><vdrpPort>5901</vdrpPort><nodeId>3</nodeId><nodeName>node-name</nodeName><x>0</x><y>0</y><vdrpIp>80.12.23.43</vdrpIp></virtualmachinewithnode>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_nics.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_nics.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_nics.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_nics.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<nics>
+    <nic>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics/64" type="application/vnd.abiquo.nic+xml" rel="edit"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2/ips/64" type="application/vnd.abiquo.ip+xml" rel="privateip"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2" type="application/vnd.abiquo.vlan+xml" rel="privatenetwork" title="default_private_network"/>
+    <id>64</id><ip>192.168.0.2</ip><mac>52:54:00:b7:f7:85</mac><sequence>0</sequence></nic>
+    <nic>
+        <link href="http://10.60.12.7:80/api/cloud/datacenters/4/networks/4" type="application/vnd.abiquo.vlan+xml" rel="publicnetwork" title="public_network"/>
+    <id>364</id><ip>34.34.34.5</ip><mac>52:54:00:b7:f7:88</mac><sequence>0</sequence></nic>
+</nics>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<acceptedrequest>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/a8c9818e-f389-45b7-be2c-3db3a9689940" rel="status"/>
+    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
+</acceptedrequest>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset_task.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset_task.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset_task.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_reset_task.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/a8c9818e-f389-45b7-be2c-3db3a9689940" rel="self"/>
+    <jobs>
+        <job>
+            <description>Reset task's reset on virtual machine with id 3</description>
+            <id>a8c9818e-f389-45b7-be2c-3db3a9689940.5f42a7fc-82f3-4121-be26-da62eb8b9b92</id>
+            <parentTaskId>a8c9818e-f389-45b7-be2c-3db3a9689940</parentTaskId>
+            <rollbackState>ROLLBACK_DONE</rollbackState>
+            <state>FAILED</state>
+            <timestamp>1357873142</timestamp>
+            <type>RESET</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>FINISHED_SUCCESSFULLY</state>
+    <taskId>a8c9818e-f389-45b7-be2c-3db3a9689940</taskId>
+    <timestamp>1357873142</timestamp>
+    <type>RESET</type>
+    <userId>user</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<acceptedrequest>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/a8c9818e-f389-45b7-be2c-3db3a9689940" rel="status"/>
+    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
+</acceptedrequest>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/a8c9818e-f389-45b7-be2c-3db3a9689940" rel="self"/>
+    <jobs>
+        <job>
+            <description>Reset task's reset on virtual machine with id 3</description>
+            <id>a8c9818e-f389-45b7-be2c-3db3a9689940.5f42a7fc-82f3-4121-be26-da62eb8b9b92</id>
+            <parentTaskId>a8c9818e-f389-45b7-be2c-3db3a9689940</parentTaskId>
+            <rollbackState>ROLLBACK_DONE</rollbackState>
+            <state>FAILED</state>
+            <timestamp>1357873142</timestamp>
+            <type>RESET</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>FINISHED_SUCCESSFULLY</state>
+    <taskId>a8c9818e-f389-45b7-be2c-3db3a9689940</taskId>
+    <timestamp>1357873142</timestamp>
+    <type>RESET</type>
+    <userId>user</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task_failed.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task_failed.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task_failed.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_3_undeploy_task_failed.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<task>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="parent"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks/a8c9818e-f389-45b7-be2c-3db3a9689940" rel="self"/>
+    <jobs>
+        <job>
+            <description>Reset task's reset on virtual machine with id 3</description>
+            <id>a8c9818e-f389-45b7-be2c-3db3a9689940.5f42a7fc-82f3-4121-be26-da62eb8b9b92</id>
+            <parentTaskId>a8c9818e-f389-45b7-be2c-3db3a9689940</parentTaskId>
+            <rollbackState>ROLLBACK_DONE</rollbackState>
+            <state>FAILED</state>
+            <timestamp>1357873142</timestamp>
+            <type>RESET</type>
+        </job>
+    </jobs>
+    <ownerId>3</ownerId>
+    <state>FINISHED_UNSUCCESSFULLY</state>
+    <taskId>a8c9818e-f389-45b7-be2c-3db3a9689940</taskId>
+    <timestamp>1357873142</timestamp>
+    <type>RESET</type>
+    <userId>user</userId>
+</task>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_creation_ok.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_creation_ok.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_creation_ok.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vm_creation_ok.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualMachine>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/><link href="http://10.60.12.7:80/api/admin/enterprises/1/users/2" type="application/vnd.abiquo.user+xml" rel="user"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml; version=2.0" rel="virtualappliance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" rel="configurations"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations/2" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" rel="network_configuration"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics" type="application/vnd.abiquo.nics+xml" rel="nics"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/ips" type="application/vnd.abiquo.ips+xml" rel="ips"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/state" type="application/vnd.abiquo.virtualmachinestate+xml" rel="state"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/reset" type="application/vnd.abiquo.acceptedrequest+xml" rel="reset"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/instance" type="application/vnd.abiquo.acceptedrequest+xml" rel="instance"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" type="application/vnd.abiquo.tasks+xml" rel="tasks"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="edit"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/11" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
+<cpu>1</cpu><hdInBytes>27262976</hdInBytes><highDisponibility>0</highDisponibility><id>3</id><idState>1</idState><idType>1</idType><name>ABQ_914f8125-33d3-4fe3-a162-5d6f5bf32614</name><ram>128</ram><state>NOT_ALLOCATED</state><uuid>914f8125-33d3-4fe3-a162-5d6f5bf32614</uuid><vdrpPort>0</vdrpPort></virtualMachine>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualmachineswithnode>
+    <virtualmachinewithnode>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" rel="configurations"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="edit"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/instance" type="application/vnd.abiquo.acceptedrequest+xml" rel="instance"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations/2" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" rel="network_configuration"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics" type="application/vnd.abiquo.nics+xml" rel="nics"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/reset" type="application/vnd.abiquo.acceptedrequest+xml" rel="reset"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/state" type="application/vnd.abiquo.virtualmachinestate+xml" rel="state"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" type="application/vnd.abiquo.tasks+xml" rel="tasks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="tasks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1/users/2" type="application/vnd.abiquo.user+xml" rel="user"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml; version=2.0" rel="virtualappliance"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/11" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+    <cpu>1</cpu><hdInBytes>27262976</hdInBytes><highDisponibility>0</highDisponibility><id>3</id><idState>1</idState><idType>1</idType><name>ABQ_914f8125-33d3-4fe3-a162-5d6f5bf32614</name><ram>128</ram><state>NOT_ALLOCATED</state><uuid>914f8125-33d3-4fe3-a162-5d6f5bf32614</uuid><vdrpPort>0</vdrpPort><nodeId>3</nodeId><nodeName>node-name</nodeName><x>0</x><y>0</y></virtualmachinewithnode>
+</virtualmachineswithnode>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms_allocated.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms_allocated.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms_allocated.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_6_vms_allocated.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualmachineswithnode>
+    <virtualmachinewithnode>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" rel="configurations"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="edit"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/instance" type="application/vnd.abiquo.acceptedrequest+xml" rel="instance"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/configurations/2" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" rel="network_configuration"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/network/nics" type="application/vnd.abiquo.nics+xml" rel="nics"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/reset" type="application/vnd.abiquo.acceptedrequest+xml" rel="reset"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/state" type="application/vnd.abiquo.virtualmachinestate+xml" rel="state"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" type="application/vnd.abiquo.tasks+xml" rel="tasks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/tasks" rel="tasks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1/users/2" type="application/vnd.abiquo.user+xml" rel="user"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml; version=2.0" rel="virtualappliance"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/11" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines/3/storage/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+    <cpu>1</cpu><hdInBytes>27262976</hdInBytes><highDisponibility>0</highDisponibility><id>3</id><idState>1</idState><idType>1</idType><name>ABQ_914f8125-33d3-4fe3-a162-5d6f5bf32614</name><ram>128</ram><state>ALLOCATED</state><uuid>914f8125-33d3-4fe3-a162-5d6f5bf32614</uuid><vdrpPort>0</vdrpPort><nodeId>3</nodeId><nodeName>node-name</nodeName><x>0</x><y>0</y></virtualmachinewithnode>
+</virtualmachineswithnode>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_creation_ok.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_creation_ok.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_creation_ok.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapp_creation_ok.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualAppliance>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5" type="application/vnd.abiquo.virtualappliance+xml" rel="edit"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter"/>
+    <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" rel="virtualmachines"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/state" type="application/vnd.abiquo.virtualappliancestate+xml" rel="state"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/ips" type="application/vnd.abiquo.ip+xml" rel="ips"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/price" type="text/plain" rel="price"/>
+    <error>0</error>
+    <highDisponibility>0</highDisponibility>
+    <id>5</id>
+    <name>libcloud_test_group</name>
+    <publicApp>0</publicApp>
+    <state>NOT_DEPLOYED</state>
+</virtualAppliance>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapps.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapps.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapps.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdc_4_vapps.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualAppliances>
+    <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances" rel="first"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances?startwith=0" rel="last"/>
+    <totalSize>2</totalSize>
+    <virtualAppliance>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6" type="application/vnd.abiquo.virtualappliance+xml" rel="edit"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/ips" type="application/vnd.abiquo.ip+xml" rel="ips"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/price" type="text/plain" rel="price"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/state" type="application/vnd.abiquo.virtualappliancestate+xml" rel="state"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/6/virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" rel="virtualmachines"/>
+    <error>0</error><highDisponibility>0</highDisponibility><id>6</id><name>libcloud</name><publicApp>0</publicApp><state>DEPLOYED</state></virtualAppliance>
+    <virtualAppliance>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/deploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="deploy"/><link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5" type="application/vnd.abiquo.virtualappliance+xml" rel="edit"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/ips" type="application/vnd.abiquo.ip+xml" rel="ips"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/price" type="text/plain" rel="price"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/state" type="application/vnd.abiquo.virtualappliancestate+xml" rel="state"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/action/undeploy" type="application/vnd.abiquo.acceptedrequest+xml" rel="undeploy"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances/5/virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" rel="virtualmachines"/>
+    <error>0</error><highDisponibility>0</highDisponibility><id>5</id><name>libcloud_test_group</name><publicApp>0</publicApp><state>NOT_DEPLOYED</state></virtualAppliance>
+</virtualAppliances>

Added: libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdcs.xml
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdcs.xml?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdcs.xml (added)
+++ libcloud/trunk/libcloud/test/compute/fixtures/abiquo/vdcs.xml Fri Jan 25 05:48:36 2013
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<virtualDatacenters>
+    <virtualDatacenter>
+        <link href="http://10.60.12.7:80/api/admin/datacenters/2" type="application/vnd.abiquo.datacenter+xml" rel="datacenter"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2" type="application/vnd.abiquo.vlan+xml" rel="defaultnetwork"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/action/dhcpinfo" type="text/plain" rel="dhcpinfo"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/disks" type="application/vnd.abiquo.harddisks+xml" rel="disks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="edit"/>
+        <link href="http://10.60.12.7:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/action/ips" type="application/vnd.abiquo.ip+xml" rel="ips"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks" type="application/vnd.abiquo.vlans+xml" rel="privatenetworks"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/publicips/purchased" type="application/vnd.abiquo.ips+xml" rel="purchased"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/volumes/action/statefulcandidates" type="application/vnd.abiquo.iscsivolumes+xml" rel="statefulcandidates"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/tiers" type="application/vnd.abiquo.tiers+xml" rel="tiers"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/publicips/topurchase" type="application/vnd.abiquo.ips+xml" rel="topurchase"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" rel="virtualappliances"/>
+        <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/volumes" type="application/vnd.abiquo.iscsivolumes+xml" rel="volumes"/>
+        <cpuHard>0</cpuHard>
+        <cpuSoft>0</cpuSoft>
+        <hdHard>0</hdHard>
+        <hdSoft>0</hdSoft>
+        <publicIpsHard>0</publicIpsHard>
+        <publicIpsSoft>0</publicIpsSoft>
+        <ramHard>0</ramHard>
+        <ramSoft>0</ramSoft>
+        <storageHard>0</storageHard>
+        <storageSoft>0</storageSoft>
+        <vlansHard>0</vlansHard>
+        <vlansSoft>0</vlansSoft>
+        <hypervisorType>KVM</hypervisorType>
+        <id>4</id>
+        <name>vdc_kvm</name>
+        <network>
+            <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter"/>
+            <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2" type="application/vnd.abiquo.vlan+xml" rel="edit"/>
+            <link href="http://10.60.12.7:80/api/cloud/virtualdatacenters/4/privatenetworks/2/ips" type="application/vnd.abiquo.ip+xml" rel="ips"/>
+            <address>192.168.0.0</address>
+            <dhcpOptions/>
+            <gateway>192.168.0.1</gateway>
+            <id>2</id>
+            <mask>24</mask>
+            <name>default_private_network</name>
+            <primaryDNS></primaryDNS>
+            <secondaryDNS></secondaryDNS>
+            <sufixDNS></sufixDNS>
+            <type>INTERNAL</type>
+        </network>
+    </virtualDatacenter>
+</virtualDatacenters>

Added: libcloud/trunk/libcloud/test/compute/test_abiquo.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/test_abiquo.py?rev=1438331&view=auto
==============================================================================
--- libcloud/trunk/libcloud/test/compute/test_abiquo.py (added)
+++ libcloud/trunk/libcloud/test/compute/test_abiquo.py Fri Jan 25 05:48:36 2013
@@ -0,0 +1,446 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""
+Abiquo Test Suite
+"""
+import unittest
+import sys
+
+from xml.etree import ElementTree as ET
+
+from libcloud.utils.py3 import httplib
+
+from libcloud.compute.drivers.abiquo import AbiquoNodeDriver
+from libcloud.common.abiquo import ForbiddenError
+from libcloud.common.types import InvalidCredsError, LibcloudError
+from libcloud.compute.base import NodeLocation, NodeImage
+from libcloud.test.compute import TestCaseMixin
+from libcloud.test import MockHttpTestCase
+from libcloud.test.file_fixtures import ComputeFileFixtures
+
+
+class AbiquoNodeDriverTest(unittest.TestCase, TestCaseMixin):
+    """
+    Abiquo Node Driver test suite
+    """
+    def setUp(self):
+        """
+        Set up the driver with the main user
+        """
+        AbiquoNodeDriver.connectionCls.conn_classes = (AbiquoMockHttp, None)
+        self.driver = AbiquoNodeDriver('son', 'goku',
+                                       'http://dummy.host.com/api')
+
+    def test_unauthorized_controlled(self):
+        """
+        Test the Unauthorized Exception is Controlled.
+
+        Test, through the 'login' method, that a '401 Unauthorized'
+        raises a 'InvalidCredsError' instead of the 'MalformedUrlException'
+        """
+        self.assertRaises(InvalidCredsError, AbiquoNodeDriver, 'son',
+                          'goten', 'http://dummy.host.com/api')
+
+    def test_forbidden_controlled(self):
+        """
+        Test the Forbidden Exception is Controlled.
+
+        Test, through the 'list_images' method, that a '403 Forbidden'
+        raises an 'ForbidenError' instead of the 'MalformedUrlException'
+        """
+        AbiquoNodeDriver.connectionCls.conn_classes = (AbiquoMockHttp, None)
+        conn = AbiquoNodeDriver('son', 'gohan', 'http://dummy.host.com/api')
+        self.assertRaises(ForbiddenError, conn.list_images)
+
+    def test_handle_other_errors_such_as_not_found(self):
+        """
+        Test common 'logical' exceptions are controlled.
+
+        Test that common exception (normally 404-Not Found and 409-Conflict),
+        that return an XMLResponse with the explanation of the errors are
+        controlled.
+        """
+        self.driver = AbiquoNodeDriver('go', 'trunks',
+                                       'http://dummy.host.com/api')
+        self.assertRaises(LibcloudError, self.driver.list_images)
+
+    def test_ex_create_and_delete_empty_group(self):
+        """
+        Test the creation and deletion of an empty group.
+        """
+        group = self.driver.ex_create_group('libcloud_test_group')
+        group.destroy()
+
+    def test_create_node_no_image_raise_exception(self):
+        """
+        Test 'create_node' without image.
+
+        Test the 'create_node' function without 'image' parameter raises
+        an Exception
+        """
+        self.assertRaises(LibcloudError, self.driver.create_node)
+
+    def test_create_node_specify_location(self):
+        """
+        Test you can create a node specifying the location.
+        """
+        image = self.driver.list_images()[0]
+        location = self.driver.list_locations()[0]
+        self.driver.create_node(image=image, location=location)
+
+    def test_create_node_specify_wrong_location(self):
+        """
+        Test you can not create a node with wrong location.
+        """
+        image = self.driver.list_images()[0]
+        location = NodeLocation(435, 'fake-location', 'Spain', self.driver)
+        self.assertRaises(LibcloudError, self.driver.create_node, image=image,
+                          location=location)
+
+    def test_create_node_specify_wrong_image(self):
+        """
+        Test image compatibility.
+
+        Some locations only can handle a group of images, not all of them.
+        Test you can not create a node with incompatible image-location.
+        """
+        # Create fake NodeImage
+        image = NodeImage(3234, 'dummy-image', self.driver)
+        location = self.driver.list_locations()[0]
+        # With this image, it should raise an Exception
+        self.assertRaises(LibcloudError, self.driver.create_node, image=image,
+                          location=location)
+
+    def test_create_node_specify_group_name(self):
+        """
+        Test 'create_node' into a concrete group.
+        """
+        image = self.driver.list_images()[0]
+        self.driver.create_node(image=image, group_name='new_group_name')
+
+    def test_create_group_location_does_not_exist(self):
+        """
+        Test 'create_node' with an unexistent location.
+
+        Defines a 'fake' location and tries to create a node into it.
+        """
+        location = NodeLocation(435, 'fake-location', 'Spain', self.driver)
+        # With this location, it should raise an Exception
+        self.assertRaises(LibcloudError, self.driver.ex_create_group,
+                          name='new_group_name',
+                          location=location)
+
+    def test_destroy_node_response(self):
+        """
+        'destroy_node' basic test.
+
+        Override the destroy to return a different node available
+        to be undeployed. (by default it returns an already undeployed node,
+        for test creation).
+        """
+        self.driver = AbiquoNodeDriver('go', 'trunks',
+                                       'http://dummy.host.com/api')
+        node = self.driver.list_nodes()[0]
+        ret = self.driver.destroy_node(node)
+        self.assertTrue(ret)
+
+    def test_destroy_node_response_failed(self):
+        """
+        'destroy_node' asynchronous error.
+
+        Test that the driver handles correctly when, for some reason,
+        the 'destroy' job fails.
+        """
+        self.driver = AbiquoNodeDriver('muten', 'roshi',
+                                       'http://dummy.host.com/api')
+        node = self.driver.list_nodes()[0]
+        ret = self.driver.destroy_node(node)
+        self.assertFalse(ret)
+
+    def test_destroy_node_allocation_state(self):
+        """
+        Test the 'destroy_node' invalid state.
+
+        Try to destroy a node when the node is not running.
+        """
+        self.driver = AbiquoNodeDriver('ve', 'geta',
+                                       'http://dummy.host.com/api')
+        # Override the destroy to return a different node available to be
+        # undeployed
+        node = self.driver.list_nodes()[0]
+        # The mock class with the user:password 've:geta' returns a node that
+        # is in 'ALLOCATION' state and hence, the 'destroy_node' method should
+        # raise a LibcloudError
+        self.assertRaises(LibcloudError, self.driver.destroy_node, node)
+
+    def test_destroy_not_deployed_group(self):
+        """
+        Test 'ex_destroy_group' when group is not deployed.
+        """
+        location = self.driver.list_locations()[0]
+        group = self.driver.ex_list_groups(location)[1]
+        self.assertTrue(group.destroy())
+
+    def test_destroy_deployed_group(self):
+        """
+        Test 'ex_destroy_group' when there are machines running.
+        """
+        location = self.driver.list_locations()[0]
+        group = self.driver.ex_list_groups(location)[0]
+        self.assertTrue(group.destroy())
+
+    def test_destroy_deployed_group_failed(self):
+        """
+        Test 'ex_destroy_group' fails.
+
+        Test driver handles correctly when, for some reason, the
+        asynchronous job fails.
+        """
+        self.driver = AbiquoNodeDriver('muten', 'roshi',
+                                       'http://dummy.host.com/api')
+        location = self.driver.list_locations()[0]
+        group = self.driver.ex_list_groups(location)[0]
+        self.assertFalse(group.destroy())
+
+    def test_destroy_group_invalid_state(self):
+        """
+        Test 'ex_destroy_group' invalid state.
+
+        Test the Driver raises an exception when the group is in
+        invalid temporal state.
+        """
+        self.driver = AbiquoNodeDriver('ve', 'geta',
+                                       'http://dummy.host.com/api')
+        location = self.driver.list_locations()[0]
+        group = self.driver.ex_list_groups(location)[1]
+        self.assertRaises(LibcloudError, group.destroy)
+
+    def test_run_node(self):
+        """
+        Test 'ex_run_node' feature.
+        """
+        node = self.driver.list_nodes()[0]
+        # Node is by default in NodeState.TERMINATED and AbiquoState ==
+        # 'NOT_ALLOCATED'
+        # so it is available to be runned
+        self.driver.ex_run_node(node)
+
+    def test_run_node_invalid_state(self):
+        """
+        Test 'ex_run_node' invalid state.
+
+        Test the Driver raises an exception when try to run a
+        node that is in invalid state to run.
+        """
+        self.driver = AbiquoNodeDriver('go', 'trunks',
+                                       'http://dummy.host.com/api')
+        node = self.driver.list_nodes()[0]
+        # Node is by default in AbiquoState = 'ON' for user 'go:trunks'
+        # so is not available to be runned
+        self.assertRaises(LibcloudError, self.driver.ex_run_node, node)
+
+    def test_run_node_failed(self):
+        """
+        Test 'ex_run_node' fails.
+
+        Test driver handles correctly when, for some reason, the
+        asynchronous job fails.
+        """
+        self.driver = AbiquoNodeDriver('ten', 'shin',
+                                       'http://dummy.host.com/api')
+        node = self.driver.list_nodes()[0]
+        # Node is in the correct state, but it fails because of the
+        # async task and it raises the error.
+        self.assertRaises(LibcloudError, self.driver.ex_run_node, node)
+
+
+class AbiquoMockHttp(MockHttpTestCase):
+    """
+    Mock the functionallity of the remote Abiquo API.
+    """
+    fixtures = ComputeFileFixtures('abiquo')
+    fixture_tag = 'default'
+
+    def _api_login(self, method, url, body, headers):
+        if headers['Authorization'] == 'Basic c29uOmdvdGVu':
+            expected_response = self.fixtures.load('unauthorized_user.html')
+            expected_status = httplib.UNAUTHORIZED
+        else:
+            expected_response = self.fixtures.load('login.xml')
+            expected_status = httplib.OK
+        return (expected_status, expected_response, {}, '')
+
+    def _api_cloud_virtualdatacenters(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('vdcs.xml'), {}, '')
+
+    def _api_cloud_virtualdatacenters_4(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('vdc_4.xml'), {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances(self, method, url, body, headers):
+        if method == 'POST':
+            vapp_name = ET.XML(body).findtext('name')
+            if vapp_name == 'libcloud_test_group':
+                # we come from 'test_ex_create_and_delete_empty_group(self):'
+                # method and so, we return the 'ok' return
+                response = self.fixtures.load('vdc_4_vapp_creation_ok.xml')
+                return (httplib.OK, response, {}, '')
+            elif vapp_name == 'new_group_name':
+                # we come from 'test_ex_create_and_delete_empty_group(self):'
+                # method and so, we return the 'ok' return
+                response = self.fixtures.load('vdc_4_vapp_creation_ok.xml')
+                return (httplib.OK, response, {}, '')
+        else:
+            # It will be a 'GET';
+            return (httplib.OK, self.fixtures.load('vdc_4_vapps.xml'), {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_5(self, method, url, body, headers):
+        if method == 'GET':
+            if headers['Authorization'] == 'Basic dmU6Z2V0YQ==':
+                # Try to destroy a group with 'needs_sync' state
+                response = self.fixtures.load('vdc_4_vapp_5_needs_sync.xml')
+            else:
+                # Try to destroy a group with 'undeployed' state
+                response = self.fixtures.load('vdc_4_vapp_5.xml')
+            return (httplib.OK, response, {}, '')
+        else:
+            # it will be a 'DELETE'
+            return (httplib.NO_CONTENT, '', {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6(self, method, url, body, headers):
+        if method == 'GET':
+            # deployed vapp
+            response = self.fixtures.load('vdc_4_vapp_6.xml')
+            return (httplib.OK, response, {}, '')
+        else:
+            # it will be a 'DELETE'
+            return (httplib.NO_CONTENT, '', {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_tasks_1da8c8b6_86f6_49ef_9d29_57dcc73b875a(self, method, url, body, headers):
+        if headers['Authorization'] == 'Basic bXV0ZW46cm9zaGk=':
+            # User 'muten:roshi' failed task
+            response = self.fixtures.load('vdc_4_vapp_6_undeploy_task_failed.xml')
+        else:
+            response = self.fixtures.load('vdc_4_vapp_6_undeploy_task.xml')
+        return (httplib.OK, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_5_virtualmachines(
+            self, method, url, body, headers):
+        # This virtual app never have virtual machines
+        if method == 'GET':
+            response = self.fixtures.load('vdc_4_vapp_5_vms.xml')
+            return (httplib.OK, response, {}, '')
+        elif method == 'POST':
+            # it must be a POST
+            response = self.fixtures.load('vdc_4_vapp_6_vm_creation_ok.xml')
+            return (httplib.CREATED, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines(
+            self, method, url, body, headers):
+        # Default-created virtual app virtual machines'
+        if method == 'GET':
+            if headers['Authorization'] == 'Basic dmU6Z2V0YQ==':
+                response = self.fixtures.load('vdc_4_vapp_6_vms_allocated.xml')
+            else:
+                response = self.fixtures.load('vdc_4_vapp_6_vms.xml')
+            return (httplib.OK, response, {}, '')
+        else:
+            # it must be a POST
+            response = self.fixtures.load('vdc_4_vapp_6_vm_creation_ok.xml')
+            return (httplib.CREATED, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3(self, method, url, body, headers):
+        if (headers['Authorization'] == 'Basic Z286dHJ1bmtz' or
+                headers['Authorization'] == 'Basic bXV0ZW46cm9zaGk='):
+            # Undeploy node
+            response = self.fixtures.load("vdc_4_vapp_6_vm_3_deployed.xml")
+        elif headers['Authorization'] == 'Basic dmU6Z2V0YQ==':
+            # Try to undeploy a node with 'allocation' state
+            response = self.fixtures.load('vdc_4_vapp_6_vm_3_allocated.xml')
+        else:
+            # Get node
+            response = self.fixtures.load('vdc_4_vapp_6_vm_3.xml')
+        return (httplib.OK, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_action_deploy(self, method, url, body, headers):
+        response = self.fixtures.load('vdc_4_vapp_6_vm_3_deploy.xml')
+        return (httplib.CREATED, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_tasks_b44fe278_6b0f_4dfb_be81_7c03006a93cb(self, method, url, body, headers):
+
+        if headers['Authorization'] == 'Basic dGVuOnNoaW4=':
+            # User 'ten:shin' failed task
+            response = self.fixtures.load('vdc_4_vapp_6_vm_3_deploy_task_failed.xml')
+        else:
+            response = self.fixtures.load('vdc_4_vapp_6_vm_3_deploy_task.xml')
+        return (httplib.OK, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_action_undeploy(
+            self, method, url, body, headers):
+        response = self.fixtures.load('vdc_4_vapp_6_undeploy.xml')
+        return (httplib.OK, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_action_reset(self, method, url, body, headers):
+        response = self.fixtures.load('vdc_4_vapp_6_vm_3_reset.xml')
+        return (httplib.CREATED, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_tasks_a8c9818e_f389_45b7_be2c_3db3a9689940(self, method, url, body, headers):
+        if headers['Authorization'] == 'Basic bXV0ZW46cm9zaGk=':
+            # User 'muten:roshi' failed task
+            response = self.fixtures.load('vdc_4_vapp_6_undeploy_task_failed.xml')
+        else:
+            response = self.fixtures.load('vdc_4_vapp_6_vm_3_reset_task.xml')
+        return (httplib.OK, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_action_undeploy(self, method, url, body, headers):
+        response = self.fixtures.load('vdc_4_vapp_6_vm_3_undeploy.xml')
+        return (httplib.CREATED, response, {}, '')
+
+    def _api_cloud_virtualdatacenters_4_virtualappliances_6_virtualmachines_3_network_nics(self, method, url, body, headers):
+        response = self.fixtures.load('vdc_4_vapp_6_vm_3_nics.xml')
+        return (httplib.OK, response, {}, '')
+
+    def _api_admin_datacenters(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('dcs.xml'), {}, '')
+
+    def _api_admin_enterprises_1(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('ent_1.xml'), {}, '')
+
+    def _api_admin_enterprises_1_datacenterrepositories(self, method, url, body, headers):
+        # When the user is the common one for all the tests ('son, 'goku')
+        # it creates this basic auth and we return the datacenters  value
+        if headers['Authorization'] == 'Basic Z286dHJ1bmtz':
+            expected_response = self.fixtures.load("not_found_error.xml")
+            return (httplib.NOT_FOUND, expected_response, {}, '')
+        elif headers['Authorization'] != 'Basic c29uOmdvaGFu':
+            return (httplib.OK, self.fixtures.load('ent_1_dcreps.xml'), {}, '')
+        else:
+            # son:gohan user: forbidden error
+            expected_response = self.fixtures.load("privilege_errors.html")
+            return (httplib.FORBIDDEN, expected_response, {}, '')
+
+    def _api_admin_enterprises_1_datacenterrepositories_2(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('ent_1_dcrep_2.xml'), {}, '')
+
+    def _api_admin_enterprises_1_datacenterrepositories_2_virtualmachinetemplates(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('ent_1_dcrep_2_templates.xml'),
+                {}, '')
+
+    def _api_admin_enterprises_1_datacenterrepositories_2_virtualmachinetemplates_11(self, method, url, body, headers):
+        return (httplib.OK, self.fixtures.load('ent_1_dcrep_2_template_11.xml'),
+                {}, '')
+
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())



Mime
View raw message