From 71a9297721fc69d2eb8e21e9861c040b4ee57388 Mon Sep 17 00:00:00 2001 From: Jason Barnett Date: Fri, 4 Aug 2023 12:55:29 -0600 Subject: [PATCH] bugfix: allow hybrid worker groups with spaces --- .../automationworker/3.x/worker/jrdsclient.py | 4 +++- .../automationworker/worker/jrdsclient.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/jrdsclient.py b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/jrdsclient.py index 1ac8a4da3..59ebe3e9e 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/jrdsclient.py +++ b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/jrdsclient.py @@ -8,6 +8,7 @@ from datetime import datetime import time import traceback +import urllib.parse import configuration3 as configuration @@ -69,8 +70,9 @@ def get_sandbox_actions(self): } ] """ + encoded_hybrid_worker_group_name = urllib.parse.quote(self.HybridWorkerGroupName) url = self.base_uri + "/automationAccounts/" + self.account_id + \ - "/Sandboxes/GetSandboxActions?HybridWorkerGroupName=" + self.HybridWorkerGroupName + \ + "/Sandboxes/GetSandboxActions?HybridWorkerGroupName=" + encoded_hybrid_worker_group_name + \ "&api-version=" + self.protocol_version response = self.issue_request(lambda u: self.httpClient.get(u), url) diff --git a/Providers/nxOMSAutomationWorker/automationworker/worker/jrdsclient.py b/Providers/nxOMSAutomationWorker/automationworker/worker/jrdsclient.py index 9ba7ba665..66faf43bf 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/worker/jrdsclient.py +++ b/Providers/nxOMSAutomationWorker/automationworker/worker/jrdsclient.py @@ -7,6 +7,7 @@ from datetime import datetime import time import traceback +import urllib.parse import configuration @@ -68,8 +69,9 @@ def get_sandbox_actions(self): } ] """ + encoded_hybrid_worker_group_name = urllib.parse.quote(self.HybridWorkerGroupName) url = self.base_uri + "/automationAccounts/" + self.account_id + \ - "/Sandboxes/GetSandboxActions?HybridWorkerGroupName=" + self.HybridWorkerGroupName + \ + "/Sandboxes/GetSandboxActions?HybridWorkerGroupName=" + encoded_hybrid_worker_group_name + \ "&api-version=" + self.protocol_version response = self.issue_request(lambda u: self.httpClient.get(u), url)