Skip to content

Commit

Permalink
refactor: update inv functions (#657)
Browse files Browse the repository at this point in the history
- Updated `New-AriaNetworksvCenterDataSource` cmdlet to add a vCenter Server in VMware Aria Operations for Networks.
- Updated `New-AriaNetworksNsxtDataSource` cmdlet to add a NSX Manager in VMware Aria Operations for Networks
- Enhanced `Request-AriaNetworksToken` cmdlet for better readability and consistency with other cmdlets.

Signed-off-by: Andy Beltz <[email protected]>"
  • Loading branch information
andybeltz authored Jun 14, 2024
1 parent 02d795e commit f209399
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- Enhanced `New-vRAvROPSIntegrationItem` cmdlet for better error checking and message handling.
- Enhanced `Undo-vRAvROPsIntegrationItem` cmdlet for better error checking and message handling.
- Enhanced `Update-vROPSvRAAdapterCredential` cmdlet to reduce the number of inputs required.
- Enhanced `Request-AriaNetworksToken` cmdlet for better readability and consistency with other cmdlets.

## v2.10.0

Expand Down
1 change: 1 addition & 0 deletions PowerValidatedSolutions.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# Version number of this module.
ModuleVersion = '2.11.0.1019'

# Supported PSEditions
# CompatiblePSEditions = @()

Expand Down
20 changes: 11 additions & 9 deletions PowerValidatedSolutions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -51215,14 +51215,14 @@ Function Request-AriaNetworksToken {
$ariaNetworksHeader.Add("Accept", "application/json")
$ariaNetworksHeader.Add("Content-Type", "application/json")
$uri = "https://$ariaNetworksAppliance/api/ni/auth/token"
$body = '{
"username": "'+ $username +'",
"password": "'+ $password +'",
"domain": {
"domain_type": "LOCAL",
"value": "local"
}
}'
$body = @{
username = $username
password = $password
domain = @{
"domain_type" = "LOCAL"
"value" = "local"
}
} | ConvertTo-Json
if ($PSEdition -eq 'Core') {
$ariaNetworksResponse = Invoke-RestMethod -Uri $uri -Method 'POST' -Headers $ariaNetworksHeader -Body $body -SkipCertificateCheck # PS Core has -SkipCertificateCheck implemented, PowerShell 5.x does not
} else {
Expand Down Expand Up @@ -51445,6 +51445,7 @@ Function New-AriaNetworksvCenterDataSource {
Write-Error $_.Exception.Message
}
}
Export-ModuleMember -Function New-AriaNetworksvCenterDataSource

Function New-AriaNetworksNsxtDataSource {
<#
Expand All @@ -51463,7 +51464,7 @@ Function New-AriaNetworksNsxtDataSource {
This example adds a NSX Manager as a new data source in VMware Aria Operations for Networks by using a NSX service account user with a password.

.PARAMETER fqdn
The NSX Manager to add as a data source.
The fully qualified domain name of the NSX Manager to add as a data source.

.PARAMETER certificate
The principal identity certificate to use for authentication.
Expand Down Expand Up @@ -51547,6 +51548,7 @@ Function New-AriaNetworksNsxtDataSource {
Write-Error $_.Exception.Message
}
}
Export-ModuleMember -Function New-AriaNetworksNsxtDataSource
#EndRegion End VMware Aria Operations for Networks Functions ######
###################################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This example adds a NSX Manager as a new data source in VMware Aria Operations f

### -fqdn

The NSX Manager to add as a data source.
The fully qualified domain name of the NSX Manager to add as a data source.

```yaml
Type: String
Expand Down

0 comments on commit f209399

Please sign in to comment.