summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/fe_client.py
diff options
context:
space:
mode:
authorChristian Hopps <chopps@gmail.com>2024-02-14 10:04:11 -0500
committerChristian Hopps <chopps@labn.net>2024-02-18 18:53:37 -0500
commit4a93d171c2e3ec1ff6c4fc553d6acf42e035e0d4 (patch)
tree6b1b90eace15b70e08b5b487c97b5ebfbe06962f /tests/topotests/lib/fe_client.py
parent1d4ea437e4a4fced3fce6e441952fdea8d94af80 (diff)
lib: mgmtd: add xpath arg to notification message
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests/topotests/lib/fe_client.py')
-rwxr-xr-xtests/topotests/lib/fe_client.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/topotests/lib/fe_client.py b/tests/topotests/lib/fe_client.py
index ec643bb0bf..07059ccf3a 100755
--- a/tests/topotests/lib/fe_client.py
+++ b/tests/topotests/lib/fe_client.py
@@ -321,12 +321,18 @@ class Session:
while True:
logging.debug("Waiting for Notify Message")
mhdr, mfixed, mdata = self.recv_native_msg()
- assert mdata[-1] == 0
- result = mdata[:-1].decode("utf-8")
if mhdr[HDR_FIELD_CODE] == MSG_CODE_NOTIFY:
logging.debug("Received Notify Message: %s: %s", mfixed, mdata)
else:
raise Exception(f"Received NON-NOTIFY Message: {mfixed}: {mdata}")
+
+ vsplit = mhdr[HDR_FIELD_VSPLIT]
+ assert mdata[vsplit - 1] == 0
+ xpath = mdata[: vsplit - 1].decode("utf-8")
+
+ assert mdata[-1] == 0
+ result = mdata[vsplit:-1].decode("utf-8")
+
if not xpaths:
return result
js = json.loads(result)