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 4.4

Skip to end of metadata
Go to start of metadata

Virtual machine action plan management

Exposed Resources Hierarchy
Virtual machine action plan Management

Contents:

Main URI of the resource

This class operates mainly over the Resource URI: /cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans

Exposed Methods

List action plans of a virtual machine

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans
Roles required: VM_ACTION_PLAN_VIEW
Request headers: Accept: application/vnd.abiquo.virtualmachineactionplans+json;
Request parameters: 

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Retrieve all action plans in a virtual machine
curl 'http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans' \
-X GET \
-H 'Accept: application/vnd.abiquo.virtualmachineactionplans+json;version=4.0'

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: ABQSESSIONID=966690701336258947; Expires=Wed, 02-Nov-2016 09:12:06 GMT; Path=/; HttpOnly
Set-Cookie: auth=YWRtaW46MTQ3ODA3NzkyNjIyMjpkZGZjY2M0YTllMzE1ZTM3YmE0Y2JiZTJlMDg0MDI5ZTpBQklRVU8; Expires=Wed, 02-Nov-2016 09:12:06 GMT; Path=/; HttpOnly
Content-Type: application/vnd.abiquo.virtualmachineactionplans+json; version=4.0
Transfer-Encoding: chunked
Date: Wed, 02 Nov 2016 08:42:06 GMT

{
   "links":[
      {
         "title":"ABQ_2cf23c7c-71f7-45ac-99f7-9c1fe360dae4",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      }
   ],
   "collection":[
      {
         "links":[
            {
               "title":"ABQ_2cf23c7c-71f7-45ac-99f7-9c1fe360dae4",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"execute action plan",
               "rel":"execute",
               "type":"application/vnd.abiquo.acceptedrequest+json",
               "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/action/execute"
            },
            {
               "title":"tasks",
               "rel":"tasks",
               "type":"application/vnd.abiquo.tasks+json",
               "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/tasks"
            },
            {
               "title":"interval-schedules",
               "rel":"interval-schedules",
               "type":"application/vnd.abiquo.intervalbasedschedules+json",
               "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
            },
            {
               "title":"cron-schedules",
               "rel":"cron-schedules",
               "type":"application/vnd.abiquo.cronbasedschedules+json",
               "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
            },
            {
               "title":"action-plan-example",
               "rel":"edit",
               "type":"application/vnd.abiquo.virtualmachineactionplan+json",
               "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1"
            }
         ],
         "name":"action-plan-example",
         "description":"Deploy, power and instance",
         "createdBy":"Cloud",
         "entries":[
            {
               "sequence":0,
               "type":"DEPLOY",
               "parameterType":"None"
            },
            {
               "sequence":1,
               "type":"POWER_OFF",
               "parameterType":"None"
            },
            {
               "sequence":2,
               "type":"INSTANCE",
               "parameter":"my-instance-name",
               "parameterType":"InstanceName"
            }
         ]
      }
   ]
}

Create an action plan for a virtual machine

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans
Roles required: VM_ACTION_PLAN_MANAGE
Request headers: Accept: application/vnd.abiquo.virtualmachineactionplans+json; Content-type: application/vnd.abiquo.virtualmachineactionplans+json;
Request parameters: 

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Create an action plan in a virtual machine
curl 'http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans' \
-X POST \
-H 'Content-Type: application/vnd.abiquo.virtualmachineactionplan+json;version=4.0' \
-H 'Accept: application/vnd.abiquo.virtualmachineactionplan+json;version=4.0' \
--data-binary '{"entries":[{"sequence":0,"type":"DEPLOY","parameterType":"None"},{"sequence":1,"type":"POWER_OFF","parameterType":"None"},{"sequence":2,"type":"INSTANCE","parameter":"my-instance-name"}],"name":"action-plan-example","description":"Deploy, power and instance"}'

HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Set-Cookie: ABQSESSIONID=966690701336258947; Expires=Wed, 02-Nov-2016 08:52:23 GMT; Path=/; HttpOnly
Set-Cookie: auth=YWRtaW46MTQ3ODA3Njc0MzE3OTpmMjI1Nzg2ODNiOWMxMzc5ZWRmZDA4MzM4NzBhZGMzODpBQklRVU8; Expires=Wed, 02-Nov-2016 08:52:23 GMT; Path=/; HttpOnly
Access-Control-Allow-Origin: http://example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Authorization, Content-Type, X-Abiquo-OTP
Location: http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1
Content-Type: application/vnd.abiquo.virtualmachineactionplan+json; version=4.0
Transfer-Encoding: chunked
Date: Wed, 02 Nov 2016 08:22:23 GMT

{
   "links":[
      {
         "title":"ABQ_2cf23c7c-71f7-45ac-99f7-9c1fe360dae4",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"execute action plan",
         "rel":"execute",
         "type":"application/vnd.abiquo.acceptedrequest+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/action/execute"
      },
      {
         "title":"tasks",
         "rel":"tasks",
         "type":"application/vnd.abiquo.tasks+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/tasks"
      },
      {
         "title":"interval-schedules",
         "rel":"interval-schedules",
         "type":"application/vnd.abiquo.intervalbasedschedules+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
      },
      {
         "title":"cron-schedules",
         "rel":"cron-schedules",
         "type":"application/vnd.abiquo.cronbasedschedules+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
      },
      {
         "title":"action-plan-example",
         "rel":"edit",
         "type":"application/vnd.abiquo.virtualmachineactionplan+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1"
      }
   ],
   "name":"action-plan-example",
   "description":"Deploy, power and instance",
   "createdBy":"Cloud",
   "entries":[
      {
         "sequence":0,
         "type":"DEPLOY",
         "parameterType":"None"
      },
      {
         "sequence":1,
         "type":"POWER_OFF",
         "parameterType":"None"
      },
      {
         "sequence":2,
         "type":"INSTANCE",
         "parameter":"my-instance-name",
         "parameterType":"InstanceName"
      }
   ]
}

Get an action plan of a virtual machine

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans/{actionplan}
Roles required: VM_ACTION_PLAN_VIEW
Request headers:  Accept: application/vnd.abiquo.virtualmachineactionplan+json;
Request parameters: 

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Retrieve an action plan in a virtual machine
curl 'http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1' \
-X GET \
-H 'Accept: application/vnd.abiquo.virtualmachineactionplan+json;version=4.0'

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: ABQSESSIONID=966690701336258947; Expires=Wed, 02-Nov-2016 09:12:06 GMT; Path=/; HttpOnly
Set-Cookie: auth=YWRtaW46MTQ3ODA3NzkyNjIyMjpkZGZjY2M0YTllMzE1ZTM3YmE0Y2JiZTJlMDg0MDI5ZTpBQklRVU8; Expires=Wed, 02-Nov-2016 09:12:06 GMT; Path=/; HttpOnly
Content-Type: application/vnd.abiquo.virtualmachineactionplan+json; version=4.0
Transfer-Encoding: chunked
Date: Wed, 02 Nov 2016 08:42:06 GMT
{
   "links":[
      {
         "title":"ABQ_2cf23c7c-71f7-45ac-99f7-9c1fe360dae4",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"execute action plan",
         "rel":"execute",
         "type":"application/vnd.abiquo.acceptedrequest+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/action/execute"
      },
      {
         "title":"tasks",
         "rel":"tasks",
         "type":"application/vnd.abiquo.tasks+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/tasks"
      },
      {
         "title":"interval-schedules",
         "rel":"interval-schedules",
         "type":"application/vnd.abiquo.intervalbasedschedules+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
      },
      {
         "title":"cron-schedules",
         "rel":"cron-schedules",
         "type":"application/vnd.abiquo.cronbasedschedules+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
      },
      {
         "title":"action-plan-example",
         "rel":"edit",
         "type":"application/vnd.abiquo.virtualmachineactionplan+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1"
      }
   ],
   "name":"action-plan-example",
   "description":"Deploy, power and instance",
   "createdBy":"Cloud",
   "entries":[
      {
         "sequence":0,
         "type":"DEPLOY",
         "parameterType":"None"
      },
      {
         "sequence":1,
         "type":"POWER_OFF",
         "parameterType":"None"
      },
      {
         "sequence":2,
         "type":"INSTANCE",
         "parameter":"my-instance-name",
         "parameterType":"InstanceName"
      }
   ]
}

Update a virtual machine action plan

Synopsis: PUT http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans/{actionplan}
Roles required: VM_ACTION_PLAN_MANAGE
Request headers:  Accept: application/vnd.abiquo.virtualmachineactionplan+json; Content-type: application/vnd.abiquo.virtualmachineactionplan+json;
Request parameters: 

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Edit a virtual machine action plan
curl 'http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1' \
-X PUT \
-H 'Content-Type: application/vnd.abiquo.virtualmachineactionplan+json;version=4.0' \
-H 'Accept: application/vnd.abiquo.virtualmachineactionplan+json;version=4.0' \
--data-binary '{"links":[{"title":"ABQ_2cf23c7c-71f7-45ac-99f7-9c1fe360dae4","rel":"virtualmachine","type":"application/vnd.abiquo.virtualmachine+json","href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"},{"title":"execute action plan","rel":"execute","type":"application/vnd.abiquo.acceptedrequest+json","href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/action/execute"},{"title":"tasks","rel":"tasks","type":"application/vnd.abiquo.tasks+json","href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/tasks"},{"title":"interval-schedules","rel":"interval-schedules","type":"application/vnd.abiquo.intervalbasedschedules+json","href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"},{"title":"cron-schedules","rel":"cron-schedules","type":"application/vnd.abiquo.cronbasedschedules+json","href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"},{"title":"action-plan-example","rel":"edit","type":"application/vnd.abiquo.virtualmachineactionplan+json","href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1"}],"name":"action-plan-example","description":"Deploy, power off","createdBy":"Cloud","entries":[{"sequence":0,"type":"DEPLOY","parameterType":"None"},{"sequence":1,"type":"POWER_OFF","parameterType":"None"}]}'

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: ABQSESSIONID=966690701336258947; Expires=Wed, 02-Nov-2016 09:20:40 GMT; Path=/; HttpOnly
Set-Cookie: auth=YWRtaW46MTQ3ODA3ODQ0MDgyODpjYmJiNjdmODcyMjc0NTczYTFjYTRlZWU4MDk3MGRiNzpBQklRVU8; Expires=Wed, 02-Nov-2016 09:20:40 GMT; Path=/; HttpOnly
Access-Control-Allow-Origin: http://example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Authorization, Content-Type, X-Abiquo-OTP
Content-Type: application/vnd.abiquo.virtualmachineactionplan+json; version=4.0
Transfer-Encoding: chunked
Date: Wed, 02 Nov 2016 08:50:40 GMT
{
   "links":[
      {
         "title":"ABQ_2cf23c7c-71f7-45ac-99f7-9c1fe360dae4",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"execute action plan",
         "rel":"execute",
         "type":"application/vnd.abiquo.acceptedrequest+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/action/execute"
      },
      {
         "title":"tasks",
         "rel":"tasks",
         "type":"application/vnd.abiquo.tasks+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/tasks"
      },
      {
         "title":"interval-schedules",
         "rel":"interval-schedules",
         "type":"application/vnd.abiquo.intervalbasedschedules+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
      },
      {
         "title":"cron-schedules",
         "rel":"cron-schedules",
         "type":"application/vnd.abiquo.cronbasedschedules+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/schedules"
      },
      {
         "title":"action-plan-example",
         "rel":"edit",
         "type":"application/vnd.abiquo.virtualmachineactionplan+json",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1"
      }
   ],
   "name":"action-plan-example",
   "description":"Deploy, power off",
   "createdBy":"Cloud",
   "entries":[
      {
         "sequence":0,
         "type":"DEPLOY",
         "parameterType":"None"
      },
      {
         "sequence":1,
         "type":"POWER_OFF",
         "parameterType":"None"
      }
   ]
}

Delete a virtual machine action plan

Synopsis: DELETE http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans/{actionplan}
Roles required: VM_ACTION_PLAN_MANAGE
Request headers: 
Request parameters: 

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: 
Request Example:

 Click here to show or hide the request example
Delete a virtual machine action plan
curl 'http://10.60.1.241/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1' \
-X DELETE \
 -H 'Accept: application/vnd.abiquo.virtualmachineactionplan+json;version=4.0'

HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Set-Cookie: ABQSESSIONID=966690701336258947; Expires=Wed, 02-Nov-2016 09:36:24 GMT; Path=/; HttpOnly
Set-Cookie: auth=YWRtaW46MTQ3ODA3OTM4NTA4MzpmMzJmMjg2YTAzZjY4MGMwYmQ0NTYzMTE2ZTg0NGYwZTpBQklRVU8; Expires=Wed, 02-Nov-2016 09:36:25 GMT; Path=/; HttpOnly
Access-Control-Allow-Origin: http://10.60.1.241
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Authorization, Content-Type, X-Abiquo-OTP
Date: Wed, 02 Nov 2016 09:06:25 GMT

Execute a virtual machine action plan

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualapplince}/virtualmachines/{virtualmachine}/actionplans/{actionplan}/action/execute
Roles required: VM_ACTION_PLAN_MANAGE
Request headers: Accept: application/vnd.abiquo.acceptedrequest+json;
Request parameters: 

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Execute a virtual machine action plan
curl 'http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/action/execute' \
-X POST


HTTP/1.1 202 Accepted
Server: Apache-Coyote/1.1
Set-Cookie: ABQSESSIONID=966690701336258947; Expires=Wed, 02-Nov-2016 09:32:01 GMT; Path=/; HttpOnly
Set-Cookie: auth=YWRtaW46MTQ3ODA3OTEyMjA3ODoyOGMxYmQzYWRiZDg3Mjk5N2U3Mjc3OGEzMjYzODFlYjpBQklRVU8; Expires=Wed, 02-Nov-2016 09:32:02 GMT; Path=/; HttpOnly
Access-Control-Allow-Origin: http://example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Authorization, Content-Type, X-Abiquo-OTP
Content-Type: application/vnd.abiquo.acceptedrequest+json; version=4.0
Transfer-Encoding: chunked
Date: Wed, 02 Nov 2016 09:02:01 GMT
{
   "links":[
      {
         "rel":"status",
         "href":"http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/actionplans/1/tasks/8100ed45-0237-44aa-9681-28a2a538af85"
      }
   ],
   "entity":"You can keep track of the progress in the link"
}


  • No labels