SadiJr commented on a change in pull request #5455:
URL: https://github.com/apache/cloudstack/pull/5455#discussion_r713867137



##########
File path: 
plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -616,18 +633,20 @@ public boolean deleteJobAndBackup(final String jobName) {
     public List<Backup.RestorePoint> listRestorePoints(String backupName, 
String vmInternalName) {
         final List<String> cmds = Arrays.asList(
                 String.format("$backup = Get-VBRBackup -Name \"%s\"", 
backupName),
-                String.format("if ($backup) { (Get-VBRRestorePoint 
-Backup:$backup -Name \"%s\" ^| Where-Object {$_.IsConsistent -eq $true}) }", 
vmInternalName)
+                String.format("if ($backup) { $restore = (Get-VBRRestorePoint 
-Backup:$backup -Name \"%s\" ^| Where-Object {$_.IsConsistent -eq $true})", 
vmInternalName),
+                "if ($restore) { $restore ^| Format-List } }"

Review comment:
       Yes, I tested in Veeam B&R v11 (build 11.0.0.837), Enterprise license. 
Works fine. And, according to the powershell documentation 
(https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/format-list?view=powershell-7.1),
 when using Format-List, the commands will be output in the pattern expected by 
ACS. 
   
   But I don't tested in Veeam 9.x.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to