commit 985739f7fbb2e2961b94707cd2ea93440425ea01
Author: Al Bailey <email address hidden>
Date: Mon May 2 15:24:43 2022 +0000
Debian: Fix VIM API calls
On python 2 struct.pack returns a string, and therefore a
payload of type 'string' can be appended to it, before
being converted to bytes for writing to tcp.
On python 3 struct.pack returns bytes, and therefore a
payload of type 'string' can not be appended to it.
The payload needs to be converted to bytes first. The
conversion of bytes to bytes (writing to tcp) is a no-op.
This change has no impact on python2 code.
Test Plan:
PASS: "sw-manager patch-strategy show" does not generate exceptions in nfv-vim or nfv-vim-api logs on Debian.
Closes-Bug: 1971171
Signed-off-by: Al Bailey <email address hidden>
Change-Id: Ia4fc56ca20f1e013ad1432802c4f18793ee3bb26
Reviewed: https:/ /review. opendev. org/c/starlingx /nfv/+/ 840213 /opendev. org/starlingx/ nfv/commit/ 985739f7fbb2e29 61b94707cd2ea93 440425ea01
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 985739f7fbb2e29 61b94707cd2ea93 440425ea01
Author: Al Bailey <email address hidden>
Date: Mon May 2 15:24:43 2022 +0000
Debian: Fix VIM API calls
On python 2 struct.pack returns a string, and therefore a
payload of type 'string' can be appended to it, before
being converted to bytes for writing to tcp.
On python 3 struct.pack returns bytes, and therefore a
payload of type 'string' can not be appended to it.
The payload needs to be converted to bytes first. The
conversion of bytes to bytes (writing to tcp) is a no-op.
This change has no impact on python2 code.
Test Plan:
exceptions in nfv-vim or nfv-vim-api logs on Debian.
PASS: "sw-manager patch-strategy show" does not generate
Closes-Bug: 1971171 13ad1432802c4f1 8793ee3bb26
Signed-off-by: Al Bailey <email address hidden>
Change-Id: Ia4fc56ca20f1e0