Skip to content

Commit

Permalink
Revert "Adding function to change multipath policy"
Browse files Browse the repository at this point in the history
This reverts commit 7907b0d.
  • Loading branch information
root authored and root committed Sep 11, 2023
1 parent f6d04b4 commit 59e092d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
1 change: 0 additions & 1 deletion Microsoft.AVS.Management/Microsoft.AVS.Management.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"Remove-AVSStoragePolicy"
"Set-CustomDRS"
"Set-AVSVSANClusterUNMAPTRIM"
"Set-DatastoreMultipathingPolicy"
)

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
Expand Down
34 changes: 0 additions & 34 deletions Microsoft.AVS.Management/Microsoft.AVS.Management.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2778,37 +2778,3 @@ Function Set-AVSVSANClusterUNMAPTRIM {
}
}
}

<#
.DESCRIPTION
Set default Multipath Policy to Round Robin.
.PARAMETER DatastoreName
Datastore name
.EXAMPLE
Set-DatastoreMultipathingPolicy -DatastoreName "myDatastore"
.INPUTS
vCenter datastore name.
.OUTPUTS
None.
#>
function Set-DatastoreMultipathingPolicy {
[CmdletBinding()]
[AVSAttribute(10, UpdatesSDDC = $false, AutomationOnly = $true)]
param(
[Parameter(Mandatory=$true)]
[string]$DatastoreName
)
try {
$datastore = Get-Datastore -Name $DatastoreName -ErrorAction Stop
$policy = Get-ScsiLun -Datastore $datastore | Get-View | Select-Object -First 1 -ExpandProperty MultipathPolicy
$policy.ChangePolicy("VMW_PSP_RR")
Write-Host "Successfully set Multipath Policy to Round Robin for datastore $DatastoreName."
}
catch {
Write-Error "Failed to set Multipath Policy for datastore $DatastoreName. Error: $($_.Exception.Message)"
}
}

0 comments on commit 59e092d

Please sign in to comment.