Skip to content

Commit 4fb3603

Browse files
committed
Use percent-quoted path when building undersync URL
I stupidly introduced "/" characters into VLAN Group names, so quote these to be sure to build a valid URL.
1 parent 57fbd1e commit 4fb3603

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/neutron-understack/neutron_understack/undersync.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pathlib
2+
import urllib.parse
23
from functools import cached_property
34

45
import requests
@@ -57,6 +58,7 @@ def client(self):
5758
return session
5859

5960
def _undersync_post(self, action: str, vlan_group: str) -> requests.Response:
61+
vlan_group = urllib.parse.quote(vlan_group, safe="")
6062
response = self.client.post(
6163
f"{self.api_url}/v1/vlan-group/{vlan_group}/{action}", timeout=self.timeout
6264
)

0 commit comments

Comments
 (0)