Author: David Feathergill, Chief Software Architect, Vizioncore
Since its very first version, vRanger has allowed users to extend its functionality and integrate it with other applications in their environment through the use of scripting. Long ago, in the pre-VirtualCenter days, before we had the ability backup all of the virtual machines on an individual ESX host directly in the product using the -allregisteredvms switch we created a script using the vRanger command-line interface (CLI) to do this. We understood the importance of having a scriptable interface and we made sure to provide one for our users so that they could do the same sort of thing. As we were designing vRanger Pro 4.0 DPP we wanted to retain the spirit of our CLI and allow for new types of integration, so we created the web service interface that we call the vAPI.
The vAPI web service interface acts as a facade, exposing services in the vRanger Pro 4.0 DPP platform to the outside world. The main areas that these services cover are: inventory, repositories, connections, and jobs. Developers can choose to expose functionality in their clients as they see fit. For example, an application may choose to observe events relating to jobs and display notifications about their completion and result. Another could create backup and/or restore jobs in vRanger and run them. For the administrator, we’ve created special vAPI clients, the PowerShell cmdlets.
While the vAPI web service interface is developer focused, the PowerShell cmdlets are administrator focused. The set of cmdlets that we have created give the administrator open-ended access to the platform. By using these, we allow the administrator to integrate vRanger with third-party software and to create scripts automating the protection of their virtual infrastructure. The administrator’s abilities have been greatly enhanced compared to previous releases. We expose much more of our platform functionality than ever before, with 33 cmdlets covering the main functional areas of the vRanger platform. For those interested in trying our PowerShell support, here are a few basic cmdlets that can help you get started:
- get-pssnapin - Lists all of the PowerShell snap-ins registered on the computer. You should see one corresponding to vRanger in the resulting list if you are running the vRanger PowerShell console.
- get-command - Lists all of the cmdlets available. If you wanted a list only those pertaining to vRanger, you could issue the command “get-command -pssnapin vranger.api.powershell” in the vRanger PowerShell console.
- get-help - This cmdlet displays online help for PowerShell. For information about the Get-Repository cmdlet, you could issue the command “get-help Get-Repository” in the vRanger PowerShell console.
The vAPI web service allows for vRanger platform integration. It presents the core functionality of vRanger Pro 4.0 DPP to the outside world. Developers can consume the web service directly, and administrators can use the PowerShell cmdlets to create scripts to customize data protection in their environment.