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
| <?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
| <Doc> | |
| <CustomProperties> | |
| <Property Name="xv.propertyset.a" DefaultValue="value a" Encrypted="false" PromptUser="false"/> | |
| <Property Name="xv.propertyset.b" DefaultValue="value b" Encrypted="false" PromptUser="false"/> | |
| <Property Name="xv.propertyset.c" DefaultValue="value c" Encrypted="false" PromptUser="false"/> | |
| <Property Name="xv.propertyset.d" DefaultValue="value d" Encrypted="false" PromptUser="false"/> | |
| <Property Name="xv.propertyset.e" DefaultValue="value e" Encrypted="false" PromptUser="false"/> | |
| </CustomProperties> | |
| </Doc> |
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
| //get REST operation by name | |
| //Inputs: | |
| //host = RESTHost - The rest host object | |
| //operationName: String - The name of the rest operation | |
| //Outputs: | |
| //operation: RESTOperation - the rest operation object | |
| var operationIds = host.getOperations(); | |
| for(var currentIndex in operationIds){ |
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
| //get REST host by name | |
| //Input: [String]name - The name of the rest host | |
| //Output: [RESTHost]host - The rest host object | |
| var hostsIds = RESTHostManager.getHosts(); | |
| for(var currentHostId in hostsIds){ | |
| var currentHost = RESTHostManager.getHost(hostsIds[currentHostId]); | |
| System.log(currentHost.name); | |
| if(currentHost.name == name){ |
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: string - Response in a JSON string | |
| //Output: Any - Return the parsed object | |
| //Parse the json string | |
| var jsonResponse = JSON.parse(response); | |
| //loop through and print out each key and value | |
| for(var i in jsonResponse) { | |
| System.log(i + ": " + jsonResponse[i]); | |
| } |
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
| //vRO Scriptable task to parse a resource element and | |
| //edit values | |
| //inputs: | |
| //jsonTemplate : ResourceElement | |
| //reservationName : String | |
| //subtenantId : String | |
| //outputs | |
| //payload : String |
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
| #!/usr/bin/python | |
| import getpass | |
| import json | |
| import os | |
| from globalconfig import passwd, url, usr | |
| from jinja2 import Environment, FileSystemLoader | |
| from vraapiclient import reservation | |
| #Get the current directory |
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
| #!/usr/bin/python | |
| import csv | |
| import getpass | |
| import json | |
| import os | |
| from jinja2 import Environment, FileSystemLoader | |
| from globalconfig import url, usr, passwd | |
| from vraapiclient import reservation |
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
| <# | |
| Usage: | |
| 1. Generate vra-businessgroups.json by running the following cloudclient command | |
| ./cloudclient.bat vra businessgroup list --export D:\vRAExports\vra-businessgroups.json --format "JSON" | |
| 2. Configure the variables and run this script to generate businessgroup-cloudclient-commands.ps1 | |
| 3. Get a replace all of the machine prefix Ids in businessgroup-cloudclient-commands.ps1 with ones obtained from the new server |
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
| #full path to cloudclient | |
| $cloudClientPath = "D:\cloudclient\bin\cloudclient.bat" | |
| #Path to your prefix json file | |
| $prefixJsonFile = "vra-machineprefixes.json" | |
| #Path to the resulting script file | |
| $prefixScriptFile = "machineprefix-cloudclient-commands.ps1" | |
| $machinePrefixes = Get-Content -Raw -Path "$($prefixJsonFile)" | ConvertFrom-Json | |
| $outFile = @() |
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
| #!/usr/bin/python | |
| import json | |
| #full path to cloudclient | |
| cloudClientPath = '/PATH_TO_CLOUD_CLIENT/bin/cloudclient.sh' | |
| #Path to your prefix json file. If just the filename, it will look in the script directory | |
| prefixJSONFile = 'vra-machineprefixes.json' | |
| #Path to the resulting script file. If just the filename, it will look in the script directory | |
| prefixScriptFile = 'machineprefix-cloudclient-commands.sh' |