posted

0 Comments

Today, we’re happy to announce the new version of the vSphere HTML5 Web Client Fling and there are some fantastic additions to the Developer Center!

The vSphere Client Developer Center is an area built into the main vSphere console. This is an area where automation specialists, developers, and DevOps teams can get immediate access to those vSphere resources they need. Amazingly, this addition recently celebrated its first birthday. Looking back, the Developer Center concept for vSphere first debuted as part of the vSphere HTML5 Web Client Fling and was later introduced to the official release of vSphere in 6.7 Update 2. The first feature was Code Capture, which gave us the ability to perform tasks in the UI and view how those tasks would be performed as code. The next addition was the API Explorer. This allows us to browse all of the available REST APIs, view their documentation, and even try out an API call. This latest update includes two new features and an additional supported language for Code Capture!

Let’s check out some of the new features which have been added to the vSphere Client Developer Center.

PowerActions

The introduction of Code Capture brought a flood of requests for PowerActions to be updated as well. We are happy to say that we heard you and it is back!

The first of two new areas within the Developer Center is PowerActions. This new feature allows us to import scripts into our vSphere environment, then allow any vSphere admin to execute those scripts. These scripts can even be performed in the context of any available, selected objects.

The PowerActions area comes with two sub-sections. The first area is the “Script Library.” This is where you will be able to import, view, and execute the available scripts. The second area is called “Script Executions.” This area will give you the ability to see a log of the scripts which have been ran as well as the output from those scripts.

PowerActions View

Before jumping in and running script, there are some important details to cover. First, we are able to run these scripts thanks to a new service called the Script Execution Service (SES). This service is disabled by default and will need to be enabled in order to use PowerActions. Control over this service is available through the Fling Appliance Management Interface (FAMI), available at port 5490.

Example of the SES in the FAMI

Another important detail concerns the languages and modules available for consumption by SES. Scripts in this version of PowerActions can only be written in PowerShell and the available modules are from PowerCLI 11.5. Scripts should be imported with a standard PS1 extension, as that’s how SES identifies the language to use. These scripts are then imported into a Content Library, which acts as the backend storage mechanism.

Example of a Script Library

As you start using PowerActions, remember to test your scripts and be aware of how they might be ran against your environment. There is no “undo” button.

For information on getting started with PowerActions, see the following blog: Getting (re)Started with PowerActions

Console

There is another new tab available in the Developer Center which is named Console. This could better be known as the PowerCLI Console, if we remember PowerActions for the vSphere Web Client. This tab gives us the ability to run PowerShell based code directly in the vSphere Client itself!

This area too has some details to be covered before jumping right in and running code. Similarly to PowerActions, the Console relies on SES to run any commands. That means that PowerShell is the default language and the available modules are from PowerCLI 11. The console starts off with an already authenticated session to the vCenter Server as the current logged in user. All the commands are processed in a non-interactive fashion. Therefore, any commands issued which prompt for additional information, or even confirmations, will return an error. This console does not include any additional intelligence either, such as intellisense and auto-complete.

Here’s an example of using the Console to pull information about snapshots within the environment:
Example usage of the PowerActions Console

Code Capture

The last several updates to the vSphere Client Developer Center has added a lot of functionality to Code Capture. The first release only supported low-level, API based, PowerCLI output. Since then, we have cleaned up the formatting of the outputted code and added two new languages, JavaScript and Python. With this latest release, we’re introducing support for Go by way of govmomi!

Here’s an example of the result of taking a snapshot of a VM:
Code Capture in Use

Summary

The vSphere HTML5 Web Client Fling continues to introduce features and functionalities to the vSphere Client Developer Center. This version of the Fling brings the return of PowerActions, the easiest way to run PowerCLI commands and scripts directly from the vSphere Client. We’re also introducing the Console feature, which builds a minimal PowerShell terminal into the vSphere Client. Lastly, we have added Go support for the output of Code Capture.

You definitely want to update your version of the vSphere HTML5 Web Client Fling today, and let us know in the comments what you’d like to see us add next!

More information about the vSphere HTML5 Web Client Fling can be found here: VMware Flings: vSphere HTML5 Web Client
More information about using PowerActions can be found at the following blog: Getting (re)Started with PowerActions