Skip to content

Commit 1f33c6b

Browse files
authored
Merge pull request #40 from Commvault/branch1
Changing the StoragePolicy Url to V2
2 parents 4f781f2 + 8958e9e commit 1f33c6b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Modules/Commvault.JobManager/Commvault.JobManager.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ function Get-CVJob {
199199
$subclientId = $subclientObj.subclientId
200200
}
201201
}
202-
202+
203+
$sessionObj.requestProps.endpoint += "&hideAdminjobs=false"
204+
203205
if (-not [String]::IsNullOrEmpty($JobFilter)) {
204206
$sessionObj.requestProps.endpoint += '&jobFilter=' + $JobFilter
205207
}

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)