Comment 2 for bug 1971171

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nfv (master)

Reviewed: https://review.opendev.org/c/starlingx/nfv/+/840213
Committed: https://opendev.org/starlingx/nfv/commit/985739f7fbb2e2961b94707cd2ea93440425ea01
Submitter: "Zuul (22348)"
Branch: master

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