vRealize Automation Reservation Service API |
Reservation Service
You can use the Reservation Service to manage reservations.
A reservation is a pool of resources for provisioning, consisting of several different types of resources. For example, a virtual reservation allocates a share of the memory, CPU and storage resources on a particular compute resource for a business group to use.
A reservation must belong to a business group, and a business group could have multiple reservations on the same resources or different resources.
You can use this generic Reservation Service for any artifact from any provider. For example, a service which follows its own provider-specified behaviors. The Reservation Service is extensible and you can add new types of reservations from third-party providers by using the Reservation Provider component.
High Level View
The Reservation Service contains two parts following vRealize Automation's architecture:
- Reservation Service
- Reservation Provider
Reservation Service faces consumers directly to provide all reservation-related functionalities.
Reservation Provider registers the reservation and reservation policy types to Reservation Service, and handles all reservation-related requests. It is not exposed to consumers directly.
There might be one or more reservation providers and each reservation provider could register one or more reservation/reservation policy types to the Reservation Service.
Following sections provide more details about Reservation Service and Reservation Provider.
Reservation Service
The Reservation Service is one typical component of vRealize Automation, which defines particular domain entities, registers Data and Schema Service endpoint, and provides corresponding API sets:
-
Domain Entities
- Reservation
- ReservationType
- ReservationPolicy
- ReservationPolicyType
- AlertPolicy
- Alert
- AlertType
-
Registered Endpoints
- Data and Schema Service
-
Defined Endpoints
- Reservation Callback
-
API Sets
- Reservation Type Management API
- Reservation Management API
- Reservation Policy Type Management API
- Reservation Policy Management API
- Data and Schema Service API
Domain Entities
Here is a diagram of reservation domain entities:
Reservation Service defines only the basic fields for the Reservation entity, and Reservation Providers define the ReservationType, AlertType and ReservationPolicyType. The _ReservationType_s provided by Reservation Providers defines the extensions for the Reservation, all those extension data are put into extensionData field in Reservation.
You can use Data and Schema Service API to get the schema for the extensionData by reservation type ID, and query the permissible values for particular fields declared in the schema if the fields support permissible values through the Data and Schema Service API.
Reservation Provider
Reservation Providers are provided by Service Provider, and are used to handle all reservation-related requests, including:
- Register Reservation Types.
- Register Reservation Policy Types.
- Provide Reservation Callback implementation to manage all types of Reservation/Reservation Policy that were registered by it.
- Provide Data and Schema Callback implementation for schema and permissible value query.
Sample Flows
Here is the simple sample flows about how to use Reservation Service, it lists only the API names needed for the flow rather than the full request/response, please refer to vRealize Automation API Programming Guide for more details.
Create a Reservation
- Query available reservation types.
The following API call returns available reservation types:
GET /reservation-service/api/reservations/types
- Set value to the fields defined in the Reservation entity (do not include extensionData field).
It may to need to get the sub tenant ID by using the following API call:
GET /identity/api/tenants/$tenantId/subtenants
-
Put the data into extensionData field in Reservation entity.
- Query the schema definition by reservation type ID.
The following API call returns the schema definition for the specified reservation type:
GET /reservation-service/api/data-service/schema/$reservationTypeId/default
2. Put the data into _extensionData_ field in _Reservation_ entity based on the schema retrieved in previous step.
You may need to call the Data and Schema service to get the permissible values for the fields defined in schema:
POST /reservation-service/api/data-service/schema/$reservationTypeIdOrSchemaId/default/$fieldId/values
- Create the Reservation.
The following API call is used to create the target Reservation
POST /reservation-service/api/reservations
Register a Reservation Type
- Register the Reservation Provider to vRealize Automation.
- Register the i18n properties file for target reservation type to vRealize Automation.
- Register the Reservation Provider to the following endpoints:
- com.vmware.csp.core.cafe.data
- com.vmware.vcac.core.cafe.reservation-callback.provider
- Construct and register the ReservationType:
POST /reservation-service/api/reservations/types
Related Documentation
Related SDKs
Related Sample Code
- VMware vRealize Automation PluginJenkins vRealize Automation Plugin The vRealize Automation Jenkins plugin enables Jenkins to provision vRealize Automation 7 Blueprints. Requirements Jenkins 1.58+ Java 8 to compile plugin or Java 7 ...vRealize Automation Java
- vRealize Automation API Samples for PostmanvRealize Automation API Samples for Postman Overview The vRealize Automation REST API provides consumers and administrators access to all services in its service catalog that support the vRealize Auto ...vRealize Automation POSTMAN Collection
- Project BosphorusProject Bosphorus Background This project is aimed at providing a custom portal framework for vRealize Automation (vRA) along with a reference implementation. It is intended for advanced users/develop ...vRealize Automation Java
- vRealize Automation Reference ApplicationvRealize Automation Reference Application Overview This is a sample project that demonstrates how to create a simple self-service portal for vRealize Automation using only RESTful APIs. You are encour ...vRealize Automation JavaScript
- chef-client example of a bootstrap install on Ubuntu 16.04A basic example to install the chef-client via the install.sh from Chef Software. This should be noted that this only requires wget and bash, so this can work for CentOS, RHEL, debian, Ubuntu, and the ...vRealize Automation vRA Blueprint
- chef-client example of a bootstrap install on Windows using Powershell 3 and upA basic example to install the chef-client via the install.ps1 from Chef Software. This should be noted that this requires Powershell and should work on any version of Windows with Powershell 3+. You ...vRealize Automation vRA Blueprint
- Find all VMs with a particular property value in vRAFind all VMs with a particular property value in vRAvRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
- Rename a vRA IaaS virtual machineRename a vRA IaaS virtual machinevRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
- vRA 7 and above prepare_vra_template.ps1Powershell script designed to deploy the needed agents on your windows template. This mimics the prepare_vra_template.sh file for linux and will deploy java, bootstrap and gugent agents from the vRA a ...vRealize Automation PowerShell
- Get the Reservation of a vRA VMGet the Reservation of a vRA VMvRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
-
- Get the Reservation Policy ID of a vRA ReservationGet the ID of the Reservation Policy of a vRA ReservationvRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
- CentOS Base vRA BlueprintSimple vRA Blueprint for 64-bit CentOS 7.0 VMvRealize Automation vRA Blueprint
- Kubernetes as a Service BlueprintThis blueprint currently requires RHEL/CENTOS 7 Atomic. I do plan to port this to Photon OS as soon as it is GA. Live demo of this solution here > https://youtu.be/X8QfAQmcVjA Full instructions to in ...vRealize Automation vRA Blueprint
- Create Cloud management portal based on VRA APIsThis sample web app shows how to create your own cloud management portal based on vRealize Automation Rest APIs. Key part of this sample is the javascript file https://github.com/chicm/vraclient/blob/ ...vRealize Automation JavaScript
- Add Disk and New SCSI AdapaterSimple vRO package that has the workflows needed to deploy a new disk, to the same datastore as the chosen VM while adding the next available SCSI adapter. See this post for the best usagevRealize Orchestrator Plug-in SDK vRO Package
- prepare_vra_template.ps1 7.0.1UPDATED Script - for combined 7.0, 7.0.1, and 7.1 go to https://developercenter.vmware.com/samples?id=1136vRealize Automation PowerShell
- Chef Server BlueprintThis is for RHEL/CENTOS7 See my guide here for instruction on importing this to your environment.vRealize Automation vRA Blueprint
- vRealize Automation - Catalog ServicevRealize Automation - Catalog Service The catalog service REST API is designed to be used by the consumers of the service catalog; for example, an end user who wants to request a catalog item would be ...api_vra_catalog vRealize Automation api_vra_composition POSTMAN Collection
- Set given vCAC Property on vSphere VMSets a given vCAC Property on vSphere VM. Input is the vSphere VM Name.vRealize Orchestrator Plug-in SDK vRO Workflow