In the middle of 2020, a plugin for managing vRealize Automation appeared in vRO, but its functionality is not enough to work with vRA: most tasks are still solved only through the REST API. I propose to use a ready-made package, it is constantly being finalized and already includes more than 100 different processes.
The VMware vRealize Orchestrator Plug-in for vRealize Automation ( documentation ) provides a convenient and intuitive way to work with vRA through built-in objects. It will be a great tool, but only when it is at least 80% ready (if it is planned to be finalized). At the moment, the plugin has several disadvantages:
- The plugin implements very few objects and processes:
- some of your processes will be able to use built-in types and objects, but for most tasks they are not yet available;
- processes need to be written independently using the REST API;
- working with the REST API vRA through this plugin differs from the usual REST API processes;
- Plugin does not support connection to external vRO:
- You can make REST requests to the orchestrator built into vRA, but these processes will not work with an external vRO;
- The future of the plugin is not clear: its development is not visible since the first release, maybe this is the final version of the plugin?
vRA Management Pack
To get started with the vRA 8 REST API, see vRO: vRA 8 Management Pack. In it you will find a description of the process of obtaining a token and useful links.
In the new version of the package, the set of processes has significantly expanded, now there are more than a hundred of them (full list of processes). All major processes have also been improved.
Request execution process
The main process that makes all requests to the vRA8 API is called “Invoke a REST operation (vRA)”. The parameters for connecting to the server are stored in the vra8-api configuration element . As input, the process accepts request parameters: param_0 .. param_3 , the content request body , if necessary, and the name of the REST operation. The additional optional parameter restHostVariable allows you to set the variable name of the vra8-api configuration element , which stores a link to the REST host. This option is required to work with separate vRA and vRO instances/clusters connected to a single authentication provider.
Process «Invoke a REST operation (vRA)»:
- finds a REST:RESTOperation object on a REST host by its name;
- the search is performed on all hosts (in the configuration element variables of the REST:RESTHost type); You can add any number of hosts to the configuration;
- if restHostVariable is not set, then the first found REST:RESTOperation object is used;
- receives a token from the configuration element and executes a REST request;
- checks the server response; if the token is invalid, then requests a new token and repeats the request;
- in case of an error, it generates a json string with the server response.
Preparing the package for work
1 Install the package in vRealize Orchestrator
- download vRO package ru.zabedu.vra.package;
- import the package into the orchestrator via the Packages tab;
- check that all elements have been successfully imported: processes, actions, configuration elements;
2. Register a vRA REST host
- use the standard “Add a REST host” process;
- select the authentication type: “Host’s authentication type” = “NONE”;
3. Configuration setting
Start the “Initialize (vRA)” process. Package preparation includes:
- Selecting the main REST host (add the rest yourself);
- Launching the process of registering used REST operations: “Add REST operations (vRA)”;
- when adding new vRA/vRO instances, run this process manually to add operations;
- Saving vRA account data (to get a refresh token) in the vra8_api config element ;
- Obtaining a vRA refresh token: “Update refresh token”;
- Obtaining a vRA access token: “Update access token”;
- Create a schedule for updating a refresh token.
Plugin loading and process list
Write questions and suggestions for improvement.