vROdoc - Convert vRO Code directly into JSDoc website

Read this article:  https://www.linkedin.com/pulse/vrodoc-convert-vro-actions-js-annotated-javascript-post-goyal

vRODoc (2)

Convert vRO Actions to JSDoc to Github/Gitlab Pages

Orange Ebb and Flow Abstract LinkedIn Banner

This mechanism allows vRO Actions to be converted to JSDoc annotated Pure Javascript Code without even using any JSdoc annotation inside vRO. This mechanism intelligently fetches the funtionName, version, inputs and outputs from the vRO Actions itself and create JSDoc comments on basis of it.

Read this article: https://www.linkedin.com/pulse/vrodoc-convert-vro-actions-js-annotated-javascript-post-goyal

vrodoc_process - Copy

Installation

  • Just run this command in your Powershell
Install-Script -Name vRODoc
  • or you can also download this repo directly

How to run

  • Go to the downloaded vrodoc_script.ps1 file and edit it to pass the connection related parameters inside it.
  • Open Powershell editor at that location and just execute it using .\exact_fielname_of_vRODoc.ps1

Example

Let's say you created a simple action in vRO. Now you want that action to be documented. vRODoc has the capability to convert your action into a pure JS code with JSDoc annotations as you can see in the comments of this below mentioned JS code nd then will convert it into a .html page that will be a part of your JSDoc website.

/**
 * @function getAllDesktopsForAUserInPool
 * @version 1.8.12
 * @param {string} poolName 
 * @param {string} username 
 * @returns {string}
 */
funtion getAllDesktopsForAUserInPool(poolName,userName){
     var DAConfiguration = System.getModule("com.mayank.actions").getDAConfigurationElement();
     var podConfiguration = System.getModule("com.mayank.actions").getPodConfigurationElement();
     var daUser = System.getModule("com.mayank.actions").getDA();
     var podAlias = System.getModule("com.vmware.library.view.configuration").getDefaultOrFirstPod(DAConfiguration, daUser);
     var machine = System.getModule("com.vmware.library.view.assignment").getAssignedMachine(poolName, podAlias, username, podConfiguration);
     if (machine)
          return machine.name;
};
Here, all the JSDoc comments are derived from vRO Action itself. There is no additional metadata/comment ever added while this vRO action was formed. Hence, it gives us a out-of-the-box funtionality.

Contributing

If you find any issue with the current scripts, you can create a issue.

If you have any other scripts that you want to share, you can create a pull request.

SHARINGISCARING


Sign in to be able to add comments.

Comments 0