Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Conversions Resource

Exposed Resources Hierarchy
Conversions Resource

Contents:

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions

Exposed Methods

Retrieve all the conversions of a virtual machine template

Get all the conversions of the given virtual machine template. The results can be filtered by the state of the conversion and by compatibility with a specific hypervisor type.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.conversions+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

hypervisor

false

 

filter the request by the hypervisor type compatibility

state

false

 

filter the request by the state of the templates

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Conversions Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all the conversions of a virtual machine template example
curl --verbose  -X GET -u admin:xabiquo http://localhost/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions
 
> GET /api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MDY3NTg0NjoxZTk2NGVhYjE4MjNmN2VjMWU3NjVmOTg4N2VmMjA5NDpBQklRVU8; Expires=Fri, 01-Feb-2013 17:44:35 GMT; Path=/api
< Set-Cookie: JSESSIONID=BBD508E1FAC766705CA3F675C0B6F3BC.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.conversions+xml;version=2.4
< Content-Length: 1646
< Date: Fri, 01 Feb 2013 17:14:35 GMT
< 
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<conversions>
  <conversion>
    <link rel="datacenter"
    type="application/vnd.abiquo.datacenter+xml"
    href="http://localhost:80/api/admin/datacenters/2" />
    <link rel="datacenterrepository"
    type="application/vnd.abiquo.datacenterrepository+xml"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2" />
    <link title="FINISHED" rel="edit"
    type="application/vnd.abiquo.conversion+xml"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VMDK_FLAT" />
    <link rel="enterprise"
    type="application/vnd.abiquo.enterprise+xml"
    href="http://localhost:80/api/admin/enterprises/1" />
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VMDK_FLAT/tasks" />
    <link rel="virtualmachinetemplate"
    type="application/vnd.abiquo.virtualmachinetemplate+xml"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1" />
    <state>FINISHED</state>
    <sourceFormat>RAW</sourceFormat>
    <sourcePath>
    1/promoted/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97.img</sourcePath>
    <targetFormat>VMDK_FLAT</targetFormat>
    <targetPath>
    1/promoted/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97/formats/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97-VMDK_FLAT.img</targetPath>
    <targetSizeInBytes>20971520</targetSizeInBytes>
    <startTimestamp>2013-02-01T17:32:39+01:00</startTimestamp>
  </conversion>
</conversions>    

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions/{conversion}

Exposed Methods

Retrieve a task related to a conversion

Displays a specific task on the virtual machine template conversion. Tasks are a set of jobs (conversion operations). Any of these tasks may still be in progress. Every task has a UUID.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions/{conversion}//tasks/{id}
Roles Required:
Request Headers: Accept: application/vnd.abiquo.task+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Task Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a task related to a conversion example
curl --verbose -X GET -u admin:xabiquo http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks/c429ab0b-a830-4b96-b9fe-cb719685d464 | xmlprint

> GET /api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks/c429ab0b-a830-4b96-b9fe-cb719685d464 HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MTM2NDA4NzpiYzNmYjg1NjllNzFhY2JlNzllMDc5OWU0ODg0MTQ2MjpBQklRVU8; Expires=Fri, 01-Feb-2013 17:56:04 GMT; Path=/api
< Set-Cookie: JSESSIONID=E99E96A31AA9DDAF7DFE8AB84EC4F2A6.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.task+xml;version=2.4
< Content-Length: 1232
< Date: Fri, 01 Feb 2013 17:26:04 GMT
< 
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<task>
  <link rel="parent"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks" />
  <link rel="result" type="application/vnd.abiquo.conversion+xml"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT" />
  <link rel="self"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks/c429ab0b-a830-4b96-b9fe-cb719685d464" />
  <taskId>c429ab0b-a830-4b96-b9fe-cb719685d464</taskId>
  <userId>admin</userId>
  <type>CONVERT_DISK</type>
  <ownerId>1-VDI_FLAT</ownerId>
  <state>FINISHED_SUCCESSFULLY</state>
  <creationTimestamp>1359739376</creationTimestamp>
  <timestamp>1359739378</timestamp>
  <jobs>
    <job>
      <id>c15cae93-37cf-4f21-bf74-8bc159a63e7b</id>
      <parentTaskId>
      c429ab0b-a830-4b96-b9fe-cb719685d464</parentTaskId>
      <type>DISK_CONVERSION</type>
      <description>Convert disk task's disk conversion on
      conversion with id 1-VDI_FLAT</description>
      <state>DONE</state>
      <rollbackState>UNKNOWN</rollbackState>
      <creationTimestamp>1359739376</creationTimestamp>
      <timestamp>1359739378</timestamp>
    </job>
  </jobs>
</task>

Retrieve all tasks related to a conversion

Displays the tasks related to the current virtual machine template conversion. Tasks are a set of jobs (conversion operations). Any of these tasks may still be in progress.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions/{conversion}//tasks
Roles Required:
Request Headers: Accept: application/vnd.abiquo.tasks+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Tasks Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all tasks related to a conversion example
curl --verbose -X GET -u admin:xabiquo http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks | xmlprint

> GET /api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MTI5NzU2NTo4YTQwODY4ZDEwMDM2MmJlZjY3YTNhYTg4YWVjNGRiNzpBQklRVU8; Expires=Fri, 01-Feb-2013 17:54:57 GMT; Path=/api
< Set-Cookie: JSESSIONID=2C3DE802F81CA74A91CA550147E2174C.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.tasks+xml;version=2.4
< Content-Length: 1537
< Date: Fri, 01 Feb 2013 17:24:57 GMT
< 
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<tasks>
  <link rel="self"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks" />
  <link rel="parent"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT" />
  <task>
    <link rel="parent"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks" />
    <link rel="result" type="application/vnd.abiquo.conversion+xml"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT" />
    <link rel="self"
    href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks/c429ab0b-a830-4b96-b9fe-cb719685d464" />
    <taskId>c429ab0b-a830-4b96-b9fe-cb719685d464</taskId>
    <userId>admin</userId>
    <type>CONVERT_DISK</type>
    <ownerId>1-VDI_FLAT</ownerId>
    <state>FINISHED_SUCCESSFULLY</state>
    <creationTimestamp>1359739376</creationTimestamp>
    <timestamp>1359739378</timestamp>
    <jobs>
      <job>
        <id>c15cae93-37cf-4f21-bf74-8bc159a63e7b</id>
        <parentTaskId>
        c429ab0b-a830-4b96-b9fe-cb719685d464</parentTaskId>
        <type>DISK_CONVERSION</type>
        <description>Convert disk task's disk conversion on
        conversion with id 1-VDI_FLAT</description>
        <state>DONE</state>
        <rollbackState>UNKNOWN</rollbackState>
        <creationTimestamp>1359739376</creationTimestamp>
        <timestamp>1359739378</timestamp>
      </job>
    </jobs>
  </task>
</tasks>



Retrieve a conversion of a virtual machine template

Get the desired conversion for the given virtual machine template

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions/{conversion}
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.conversion+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Conversion Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a conversion of a virtual machine template example
curl --verbose  -X GET -u admin:xabiquo http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VMDK_FLAT 

> GET /api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VMDK_FLAT HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MDc4NTk3ODo5YzIxNjUxNTRjZTdlYzhkMjkwMTIyOTc5MTc1NDU4ODpBQklRVU8; Expires=Fri, 01-Feb-2013 17:46:25 GMT; Path=/api
< Set-Cookie: JSESSIONID=10739B453D2F8C8EC001EFF1ECF6BFCA.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.conversion+xml;version=2.4
< Content-Length: 1619
< Date: Fri, 01 Feb 2013 17:16:26 GMT
< 
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<conversion>
  <link rel="datacenter"
  type="application/vnd.abiquo.datacenter+xml"
  href="http://localhost:80/api/admin/datacenters/2" />
  <link rel="datacenterrepository"
  type="application/vnd.abiquo.datacenterrepository+xml"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2" />
  <link title="FINISHED" rel="edit"
  type="application/vnd.abiquo.conversion+xml"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VMDK_FLAT" />
  <link rel="enterprise"
  type="application/vnd.abiquo.enterprise+xml"
  href="http://localhost:80/api/admin/enterprises/1" />
  <link rel="tasks" type="application/vnd.abiquo.tasks+xml"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VMDK_FLAT/tasks" />
  <link rel="virtualmachinetemplate"
  type="application/vnd.abiquo.virtualmachinetemplate+xml"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1" />
  <state>FINISHED</state>
  <sourceFormat>RAW</sourceFormat>
  <sourcePath>
  1/promoted/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97.img</sourcePath>
  <targetFormat>VMDK_FLAT</targetFormat>
  <targetPath>
  1/promoted/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97/formats/myveryownpromotedtemplate-f7674cf7-1144-479f-973c-e0e72feced97-VMDK_FLAT.img</targetPath>
  <targetSizeInBytes>20971520</targetSizeInBytes>
  <startTimestamp>2013-02-01T17:32:39+01:00</startTimestamp>
</conversion>



Creates a conversion

This method can also be used to retry a FAILED conversion. Send a V2V conversion to the conversion-manager remote service in order to obtain the desired DiskFormat compatibility for the current virtual machine template.

Synopsis: PUT http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/conversions/{conversion}
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4; Content-type: application/vnd.abiquo.conversion+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: Conversion Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Creates a conversion example
curl --verbose  -X PUT -u admin:xabiquo -H "Content-type:application/vnd.abiquo.conversion+xml" -H "Accept:application/vnd.abiquo.acceptedrequest+xml" http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT -d '<conversion><targetFormat>VDI_FLAT</targetFormat></conversion>' | xmlprint

> PUT /api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Content-type:application/vnd.abiquo.conversion+xml
> Accept:application/vnd.abiquo.acceptedrequest+xml
> Content-Length: 62
> 
< HTTP/1.1 202 Aceptado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MTE3NjE3MToyMDgyZjUwZjhjOWU3ZjI3NjY0NTBmOWI3NjRhZWM5YTpBQklRVU8; Expires=Fri, 01-Feb-2013 17:52:56 GMT; Path=/api
< Set-Cookie: JSESSIONID=C5181184396154FAD98034659A3BC7DB.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml
< Content-Length: 460
< Date: Fri, 01 Feb 2013 17:22:56 GMT
< 
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<acceptedrequest>
  <link rel="status"
  href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/1/conversions/VDI_FLAT/tasks/c429ab0b-a830-4b96-b9fe-cb719685d464" />
  <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>



Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')