nfv/nfv/nfv-tests
Al Bailey 94321e9d57 Debian: python3 fix for OpenStackRestAPIExceptions
When the NFV uses tasks and futures and coroutines to
interact with openstack APIs, an OpenStackRestAPIException
can be returned as a task result.

The exception needs to be 'pickled' when sent across the
queue/socket for the 'simulated' asyncio workflow.

However, the pickle code for that exception was broken in
python3. It was relying on a python2 'message' attribute
of the base Exception class to exist, which no longer
exists (in python3)

This was causing the pickle command to quietly fail and
the code waiting for the task result would timeout and
not report back the failure information.

The fix is to ensure that there is a 'message' property
on that exception type.

Unit tests have been added for all the pickleable
exceptions, to ensure their '__reduce__' and other
interactions with 'pickle' are not reporting any failures.

Test Plan:
 PASS: create and apply a kube-upgrade-strategy for an
 older version of kubernetes and observe it reports its
failure error (rather than a timeout)

Closes-Bug: #2007285
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I3a8776163a78330810ae1097ddd1831b1b26a212
2023-02-14 15:21:13 +00:00
..
nfv_api_tests Update default floating management address 2020-06-01 17:39:53 -05:00
nfv_scenario_tests Fix relative imports in nfv 2023-01-24 22:16:39 +00:00
nfv_unit_tests Debian: python3 fix for OpenStackRestAPIExceptions 2023-02-14 15:21:13 +00:00
__init__.py Convert NFV unit tests from nose to stestr 2018-09-18 12:56:44 -05:00