This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 19a4e9dd50e veeam: Fix escape powershell comand when listing Veeam 
repository names (#6943)
19a4e9dd50e is described below

commit 19a4e9dd50e4333b2751d7309389b83b8e16118d
Author: SadiJr <[email protected]>
AuthorDate: Mon Dec 12 04:16:30 2022 -0300

    veeam: Fix escape powershell comand when listing Veeam repository names 
(#6943)
    
    PR #5774 introduced a functionality to allow operators to choose in which 
Veeam's repository, if more than one is configured, ACS' clone job will be 
executed. However, a change was missing in the PR and caused the errors 
reported in #6599.
    
    This PR addresses the fix for #6599.
    
    Co-authored-by: SadiJr <[email protected]>
---
 .../src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
 
b/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
index 39f3b5e44da..e0f55f7d47e 100644
--- 
a/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
+++ 
b/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
@@ -369,7 +369,7 @@ public class VeeamClient {
     protected String getRepositoryNameFromJob(String backupName) {
         final List<String> cmds = Arrays.asList(
                 String.format("$Job = Get-VBRJob -name \"%s\"", backupName),
-                "$Job.GetBackupTargetRepository() ^| select Name | Format-List"
+                "$Job.GetBackupTargetRepository() ^| select Name ^| 
Format-List"
         );
         Pair<Boolean, String> result = executePowerShellCommands(cmds);
         if (result == null || !result.first()) {
@@ -717,4 +717,4 @@ public class VeeamClient {
         }
         return new Pair<>(result.first(), restoreLocation);
     }
-}
\ No newline at end of file
+}

Reply via email to