Skip to content

Commit 63b13fd

Browse files
committed
Changing the StoragePolicy Url to V2
1 parent ca5bd27 commit 63b13fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Modules/Commvault.Policies/Commvault.Policies.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ function Get-CVStoragePolicy {
628628
else {
629629
foreach ($policy in $response.Content.policies) {
630630
if (-not [String]::IsNullOrEmpty($Name)) {
631-
if ($Name -eq $policy.storagePolicyName) {
631+
if ($Name -eq $policy.storagePolicy.storagePolicyName) {
632632
$policiesToProcess += $policy
633633
}
634634
}
@@ -645,7 +645,7 @@ function Get-CVStoragePolicy {
645645
$sessionObj.requestProps.endpoint = $sessionObj.requestProps.endpoint -creplace ('{storagePolicyId}', $policy.storagePolicyAndCopy.storagePolicyId)
646646
}
647647
else {
648-
$sessionObj.requestProps.endpoint = $sessionObj.requestProps.endpoint -creplace ('{storagePolicyId}', $policy.storagePolicyId)
648+
$sessionObj.requestProps.endpoint = $sessionObj.requestProps.endpoint -creplace ('{storagePolicyId}', $policy.storagePolicy.storagePolicyId)
649649
}
650650

651651
$headerObj = Get-CVRESTHeader $sessionObj

Modules/Commvault.RESTSession/Commvault.RESTSession.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ function GetAPIDetail ([String] $Request) {
954954
'Get-CVStoragePolicy' = @{
955955

956956
Description = 'Get storage policies'
957-
Endpoint = 'StoragePolicy'
957+
Endpoint = 'V2/StoragePolicy'
958958
Method = 'Get'
959959
Body = ''
960960
}

0 commit comments

Comments
 (0)