Skip to content

Commit

Permalink
chore: remove depreciated function aliases (#267)
Browse files Browse the repository at this point in the history
Removed all the aliased function names previously deprecated.

- Removed `Commission-VCFHost` alias from `New-VCFCommissionedHost`.
- Removed `Decommission-VCFHost` alias from `Remove-VCFCommissionedHost`.
- Removed `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`.
- Removed `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`.
- Removed `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`.

Signed-off-by: Jared Burns <jared.burns@broadcom.com>
  • Loading branch information
burnsjared0415 committed Feb 1, 2024
1 parent 96785b8 commit d97dcf6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
- Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`.
- Updated `Get-VCFPersonality` cmdlet with optional parameter `name`.
- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commition JSON specification provided by the SDDC Manager UI.
- Updated `New-VCFWorkloadDomain` cmdlet with optional parameter `validate` to validate the JSON specification.
- Enhanced `New-VCFWorkloadDomain` cmdlet to improve error handling.
- Enhanced `New-VCFCommissionedHost` cmdlet to improve error handling.
- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commission JSON specification provided by the SDDC Manager UI.
- Removed the deprecated `Commission-VCFHost` alias from `New-VCFCommissionedHost`.
- Removed the deprecated `Decommission-VCFHost` alias from `Remove-VCFCommissionedHost`.
- Removed the deprecated `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`.
- Removed the deprecated `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`.
- Removed the deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`.

## v2.4.1

Expand Down
2 changes: 1 addition & 1 deletion PowerVCF.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'PowerVCF.psm1'

# Version number of this module.
ModuleVersion = '2.5.0.1003'
ModuleVersion = '2.5.0.1004'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
22 changes: 5 additions & 17 deletions PowerVCF.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2558,9 +2558,6 @@ Function New-VCFCommissionedHost {
[Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$validate
)

if ($MyInvocation.InvocationName -eq "Commission-VCFHost") {
Write-Warning "Commission-VCFHost is deprecated and will be removed in a future release. Automatically redirecting to New-VCFCommissionedHost. Please refactor to New-VCFCommissionedHost at earliest opportunity."
}
$json_content = $json
$json_content = $json_content | ConvertFrom-Json

Expand Down Expand Up @@ -2631,8 +2628,7 @@ Function New-VCFCommissionedHost {
ResponseException -object $_
}
}
New-Alias -name Commission-VCFHost -Value New-VCFCommissionedHost
Export-ModuleMember -Alias Commission-VCFHost -Function New-VCFCommissionedHost
Export-ModuleMember -Function New-VCFCommissionedHost

Function Remove-VCFCommissionedHost {
<#
Expand All @@ -2654,10 +2650,6 @@ Function Remove-VCFCommissionedHost {
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$json
)

if ($MyInvocation.InvocationName -eq "Decommission-VCFHost") {
Write-Warning "Decommission-VCFHost is deprecated and will be removed in a future release. Automatically redirecting to Remove-VCFCommissionedHost. Please refactor to Remove-VCFCommissionedHost at earliest opportunity."
}

Try {
$jsonBody = validateJsonInput -json $json
createHeader # Set the Accept and Authorization headers.
Expand All @@ -2669,8 +2661,7 @@ Function Remove-VCFCommissionedHost {
ResponseException -object $_
}
}
New-Alias -name Decommission-VCFHost -value Remove-VCFCommissionedHost
Export-ModuleMember -Alias Decommission-VCFHost -Function Remove-VCFCommissionedHost
Export-ModuleMember -Function Remove-VCFCommissionedHost

#EndRegion APIs for managing Hosts

Expand Down Expand Up @@ -3158,8 +3149,7 @@ Function Get-VCFNsxtCluster {
ResponseException -object $_
}
}
New-Alias -Name Get-VCFNsxManagerCluster -Value Get-VCFNsxtCluster
Export-ModuleMember -Function Get-VCFNsxtCluster -Alias Get-VCFNsxManagerCluster
Export-ModuleMember -Function Get-VCFNsxtCluster

#EndRegion APIs for managing NSX Manager Clusters

Expand Down Expand Up @@ -3207,8 +3197,7 @@ Function Get-VCFEdgeCluster {
ResponseException -object $_
}
}
New-Alias -Name Get-VCFNsxEdgeCluster -Value Get-VCFEdgeCluster
Export-ModuleMember -Function Get-VCFEdgeCluster -Alias Get-VCFNsxEdgeCluster
Export-ModuleMember -Function Get-VCFEdgeCluster

Function New-VCFEdgeCluster {
<#
Expand Down Expand Up @@ -3278,8 +3267,7 @@ Function New-VCFEdgeCluster {
ResponseException -object $_
}
}
New-Alias -Name New-VCFNsxEdgeCluster -Value New-VCFEdgeCluster
Export-ModuleMember -Function New-VCFEdgeCluster -Alias New-VCFNsxEdgeCluster
Export-ModuleMember -Function New-VCFEdgeCluster

#EndRegion APIs for managing NSX Edge Clusters

Expand Down

0 comments on commit d97dcf6

Please sign in to comment.