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: getLinkProperties | |
| Input: vCACHost - vCAC:VCACHost | |
| Input: vCACVirtualMachine - vCAC:VirtualMachine | |
| Description: List the properties for a vCAC entity object link | |
| */ | |
| //Set the name of the link here: | |
| var linkName = "VMDiskHardware"; |
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: getvCACVirtualMachineSnapshots | |
| Input: vCACHost - vCAC:VCACHost | |
| Input: vCACVirtualMachine - vCAC:VirtualMachine | |
| Output: Array/Properties | |
| Description: Get snapshot information for a vCAC virtual machine | |
| */ | |
| //Get snapshot entities from the virtual machine | |
| var properties = new Properties(); |
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: getResourcesProvisionedByRequest | |
| Input: vCACCAFEHost - vCACCAFE:VCACHost | |
| Input: requestId - String | |
| Output: void | |
| Description: Get catalog item resources provisioned from a request | |
| */ | |
| var _requestId = "bc147f2c-1995-442b-8fc9-c769ec9bf9f4"; |
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
| # --- Set the uri for the latest release | |
| $URI = "https://api.github.com/repos/chelnak/vRAAPIClient/releases/latest" | |
| # --- Query the API to get the url of the zip | |
| $Response = Invoke-RestMethod -Method Get -Uri $URI | |
| $ZipUrl = $Response.zipball_url | |
| # --- Download the file to the current location | |
| $OutputPath = "$((Get-Location).Path)\$($Response.name.Replace(" ","_")).zip" | |
| Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath |
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
| <# | |
| Cancel all tokens of a workflow or a list of specific workflow tokens | |
| Example body | |
| { | |
| "tokenIds" : [], | |
| "workflowId" : "f75459b7-128d-4ff0-ad99-b9d454307eeb" |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am chelnak on github. | |
| * I am craiggumbley (https://keybase.io/craiggumbley) on keybase. | |
| * I have a public key whose fingerprint is 3A9D 572C FB5A 4DE0 DE61 6134 548D 2C03 3029 0698 | |
| To claim this, I am signing this 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
| { | |
| "@type": "ExternalNetworkProfile", | |
| "id": "7fc00c02-ece0-44ef-9376-edb6e04778b1", | |
| "name": "CG-External-Profile", | |
| "description": "", | |
| "createdDate": "2015-10-16T06:48:56.000Z", | |
| "lastModifiedDate": "2015-10-16T06:49:05.000Z", | |
| "isHidden": false, | |
| "definedRanges": [ | |
| { |
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
| var endpoint = "com.vmware.vcac.core.cafe.reservation.api"; | |
| var restClient = vCACCAFEHost.createRestClient(endpoint); | |
| System.log(restClient.getUrl()); | |
| var resourceUrl = "reservations"; | |
| var response = restClient.get(resourceUrl); | |
| //return type is vCACCAFEServiceResponse | |
| var body = response.getBodyAsJson(); |
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: getvCACCAFEMachinePrefixFromEntity.action | |
| Input: vCACCAFEHost - vCACCAFE:VCACHost | |
| Input: machinePrefixEntity - vCAC:Entity | |
| Output: vCACCAFEMachinePrefixObject - vCACCAFE:MachinePrefix | |
| Description: Maps a vCAC:Entity machine prefix to a vCACCAFEMahcinePrefix object | |
| */ | |
| var vCACCAFEMachinePrefixObject; | |
| var vCACCAFEMachinePrefixArray = new Array(); |
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: vCACMachinePrefixEntity [vCAC:Entity | |
| input: vCACCAFEHost [vCACCAFE:vCACHost] | |
| output: vCACCAFEMachinePrefixObject [vCACCAFE:MachinePrefix] | |
| Description: Maps a vCAC:Entity machine prefix to a vCACCAFEMahcinePrefix object | |
| */ | |
| var vCACCAFEMachinePrefixEntityName = vCACMachinePrefixEntity.getProperty('MachinePrefix'); | |
| var vCACCAFEMachinePrefixArray = vCACCAFEEntitiesFinder.findMachinePrefixes(vCACCAFEHost,vCACCAFEMachinePrefixEntityName); |