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 5.0

Skip to end of metadata
Go to start of metadata

Abiquo 4.6.3 now provides JSON templates for Action plans. This feature defines the data attributes for actions in JSON format to make it easier to create action plans with the API.

The UI also uses this feature and you can customize or translate the UI labels, for example, to change the label for “quantity” set the value of “jsonschema.property.quantity” in the label files.

The new ActionPlanEntryTemplates data object contains the JSON schema and the required link relations for all action types. For example, for the RESIZE_DISK entry type (after it is unescaped and formatted) the template is as follows:

{
   "title":"ResizeDiskConfig",
   "type":"object",
   "additionalProperties":false,
   "properties":{
      "diskSequence":{
         "type":"integer",
         "minimum":0
      },
      "quantity":{
         "type":"integer",
         "minimum":1
      },
      "unit":{
         "type":"string",
         "enum":[
            "GIGABYTES",
            "MEGABYTES"
         ]
      }
   },
   "required":[
      "diskSequence",
      "quantity",
      "unit"
   ]
}

And an example action plan entry to resize a disk is as follows:

{
  "sequence":0,
  "type":"RESIZE_DISK",
  "configuration":"{\"diskSequence\":0,\"quantity\":64,\"unit\":\"MEGABYTES\"}",
	"links":[
        {
           "title":"ABQ_a6c2db91-196b-4395-8b20-9fb202ea2e4e",
           "rel":"virtualmachine",
           "type":"application/vnd.abiquo.virtualmachine+json",  "href":"https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/3"
        }
     ]
 }

For API documentation of the method to retrieve the template, see: https://wiki.abiquo.com/api/latest/ActionPlansResource.html#list-action-plan-entry-templates