This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Name: getNetworkProfiles | |
| //Description: Used to get all network profiles from a given vCAC IaaS Host | |
| //Inputs: vcacHost [vCAC:VCACHost] | |
| //Initialize Array or JSON | |
| var networkProfiles = []; | |
| var netProfiles = System.getModule("com.vmware.library.vcac").getEntitiesBySystemFilter(vcacHost,"ManagementModelEntities.svc","StaticIPv4NetworkProfiles",null,null,null,null,null,null); | |
| for each (netProfile in netProfiles){ | |
| //Create JSON Object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Name: getNetworkRanges | |
| //Description: Used to get all network ranges from a given vCAC IaaS Host | |
| //Inputs: vcacHost [vCAC:VCACHost] | |
| //Return Type: string | |
| //Initialize Array or JSON | |
| var networkRanges = []; | |
| var netRanges = vCACEntityManager.readModelEntitiesBySystemExpandQuery(vcacHost.id,"ManagementModelEntities.svc","StaticIPv4Ranges",null,'StaticIPv4NetworkProfile/ID',null,null,null,null,null); | |
| for each (netRange in netRanges){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Description: This action is used with vRA to get applicable reservations policies using a custom form dropdown. | |
| //Inputs: | |
| //[STRING] blueprint -> bind with constant of blueprint id (Blueprint name with no spaces) | |
| //[STRING] component -> bind with constant of component such vSphere_Machine_1 | |
| //[STRING] user -> Requested For | |
| //[STRING] tenant -> Tenant reference | |
| //[STRING] subtenantId -> Subtenant reference | |
| //Return Type: Properties | |
| var IDS_PER_PAGE_LIMIT = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Description: This action is used with vRA to get applicable reservations policies using a custom form dropdown. | |
| //Inputs: | |
| //[STRING] resPolicyId -> bind to ReservationPolicyId | |
| //[STRING] tenant -> bind to tenant reference | |
| //Return Type: Properties | |
| var result = new Properties(); | |
| if(!resPolicyId) { | |
| return result; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Creator: Kasey Linden | |
| //Date: Sept. 17, 2018 | |
| //Description: This action is used to filter VrmDataCenterLocation by Rservation Policy Id | |
| //Inputs: tenant [string], resPolicyId[string] | |
| //Output: array/string | |
| if(!tenant){ | |
| throw "Error no tenant provided"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Creator: Les Kimmel | |
| // Description: This function can be used in vRO to initate a retry on any REST request that fails due to an expired cookie from Satellite. | |
| // Inputs: N/A | |
| // Return Type: Any | |
| // How to use: For a vRO REST Request to Red Hat Satellite input the following line to invoke the rest request `var SatelliteRESTRequest = System.getModule("module.rhsat.rest").SatelliteRESTRequest();` | |
| var SatelliteRESTRequest = function (req) { | |
| System.debug("Request URL: " + req.fullUrl); | |
| var resp = req.execute(); | |
| // Check it unauthorized. If so retry once. This accounts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Copyright (c) 2017 VMware, Inc. All rights reserved. | |
| # | |
| # Description: VMware vRealize Automation and Software Services agents installation script | |
| # | |
| # Parameters from the commandline to set the default variables | |
| param( | |
| [string]$ApplianceHost="", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #Name: Install Satellite Tools | |
| #Creator: Kasey Linden / Lesley Kimmel | |
| #Version: v0.8.0 | |
| #Description: Used as a software component through vRealize Automation to install required agents for Red Hat Satellite. Inputs must be configured for SAT_ACTIVATION_KEY, SAT_ORGANIZATION, and SAT_SERVER through property bindings or with values directly configured in the software component. | |
| ###CONFIGURATION#### | |
| #SATELLITE VARIBLES# | |
| #VARIABLES ARE ONLY USED FOR SCRIPT EXECUTION OUTSIDE OF VRA. VRA PROVIDES VARIABLES VIA SOFTWARE COMPONENT. | |
| #CHECK FOR ENVIRONMENT VARIABLES SET BY VRA SOFTWARE COMPONENT ELSE USE DEFAULTS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Input: endpoint [VAPI:VAPIEndpoint] | |
| //Return: Array/string | |
| if(!endpoint){ | |
| return null | |
| } | |
| var client = endpoint.client(); | |
| var categories = new com_vmware_cis_tagging_category(client) ; | |
| var catArray = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Inputs: vapiEndpoint [VAPI:VAPIEndpoint], object_id_type [string], object_id_id [string], tag_id [string] | |
| //Outputs: void | |
| var object_id = new com_vmware_vapi_std_dynamic__ID() | |
| object_id.type = object_id_type; | |
| object_id.id = object_id_id; | |
| var client = vapiEndpoint.client(); | |
| var service = new com_vmware_cis_tagging_tag__association(client); | |
| service.attach(tag_id,object_id); | |
| client.close(); |
OlderNewer