-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/JakkuLabs/PowervRA
- Loading branch information
Showing
14 changed files
with
347 additions
and
234 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
## Breaking Changes | ||
**WARNING: This release contains breaking changes** | ||
* The minmum supported PowerShell Versions have been raised to the following: | ||
* Windows PowerShell: 5.1 | ||
* PowerShell Core: 6.0.0-rc** | ||
|
||
## Features | ||
* Feature - Add ability to select SSL Protocol (#159) | ||
* Feature - Single PSM1 file to speed up load times | ||
* Feature - Add -Wait Parameter to Request-vRAResourceAction (@Thitho007) | ||
* Feature - Get-vRAResource enhancements (#171) (@BlackCatDeployment) | ||
|
||
## Fixes | ||
* Fixed #134 - Issue with double quotes in some functions | ||
* Fixed #135 - Some private functions are being exported | ||
* Fixed #137 - Help examples for Get-vRAResource are incorrect | ||
* Fixed #148 - Request-vRAResourceAction Example Correction | ||
* Fixed #149 - Support Reservation Type change from 'vSphere' to 'vSphere (vCenter)' in vRA 7.3 | ||
* Fixed #151 - Get-vRAReservationPolicy | ||
* Fixed #153 - New-vRAReserveration Error | ||
* Fixed #130 - Unable to connect after removing SSLv3/TLSv1 ciphers from vRA Appliance | ||
* Fixed #173 - Consider using Module Tags in addition to PSEditions | ||
* Fixed #175 - Use ConvertTo-Json in Connect-vRAServer (@mponton) |
This file contains 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
This file contains 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
118 changes: 118 additions & 0 deletions
118
src/Functions/Public/catalog-service/Get-vRARequestDetail.ps1
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
|
||
function Get-vRARequestDetail { | ||
<# | ||
.SYNOPSIS | ||
Get detailed information about vRA request | ||
.DESCRIPTION | ||
Get detailed information about vRA request. These are result produced by the request (if any) | ||
.PARAMETER Id | ||
The Id of the request to query | ||
.PARAMETER RequestNumber | ||
The request number of the request to query | ||
.INPUTS | ||
System.String | ||
.OUTPUTS | ||
System.Management.Automation.PSObject | ||
.EXAMPLE | ||
Get-vRARequestDetail -Id 972ab103-950a-4240-8a3d-97174ee07f35 | ||
.EXAMPLE | ||
Get-vRARequestDetail -RequestNumber 965299 | ||
.EXAMPLE | ||
Get-vRARequestDetail -RequestNumber 965299,965300 | ||
.EXAMPLE | ||
Get-vRARequest -RequestNumber 965299 | Get-vRARequestDetail | ||
#> | ||
[CmdletBinding(DefaultParameterSetName="ById")][OutputType('System.Management.Automation.PSObject', 'System.Object[]')] | ||
|
||
Param ( | ||
|
||
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,ParameterSetName="ById")] | ||
[ValidateNotNullOrEmpty()] | ||
[String[]]$Id, | ||
|
||
[Parameter(Mandatory=$true,ParameterSetName="ByRequestNumber")] | ||
[ValidateNotNullOrEmpty()] | ||
[String[]]$RequestNumber | ||
|
||
) | ||
|
||
Begin { | ||
|
||
# --- Test for vRA API version | ||
xRequires -Version 7.0 | ||
|
||
} | ||
|
||
Process { | ||
|
||
try { | ||
|
||
switch ($PsCmdlet.ParameterSetName) { | ||
|
||
# --- If the id parameter is passed returned detailed information about the request | ||
'ById' { | ||
|
||
foreach ($RequestId in $Id){ | ||
|
||
$RequestNumber = (Get-vRARequest -Id $RequestId).RequestNumber | ||
$URI = "/catalog-service/api/consumer/requests/$($RequestId)/forms/details" | ||
$RequestDetail = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference | ||
|
||
[PSCustomObject] @{ | ||
|
||
Id = $RequestId | ||
RequestNumber = $RequestNumber | ||
Detail = $RequestDetail.values.entries | ||
} | ||
} | ||
|
||
break | ||
|
||
} | ||
# --- If the request number parameter is passed returned detailed information about the request | ||
'ByRequestNumber' { | ||
|
||
foreach ($Number in $RequestNumber){ | ||
|
||
$RequestId = (Get-vRARequest -RequestNumber $Number).id | ||
$URI = "/catalog-service/api/consumer/requests/$($RequestId)/forms/details" | ||
$RequestDetail = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference | ||
|
||
[PSCustomObject] @{ | ||
|
||
Id = $RequestId | ||
RequestNumber = $Number | ||
Detail = $RequestDetail.values.entries | ||
} | ||
} | ||
|
||
break | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
catch [Exception]{ | ||
|
||
throw | ||
|
||
} | ||
|
||
} | ||
|
||
End { | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.