When the VIM Stragegy API returns a 409 Conflict for a create,
it is much more useful to know details about the conflict.
ie: what type of strategy already exists.
This fix required:
- the strategy creation rpc message adds an error string
- pecan.abort 'conflict' must include the error string
- the nfv_client code must extract the error string
- the strategy types must return knowledge of an existing
strategy type
- the director class must include details of the existing
strategy type in its failure messages.
Test Plan:
PASS: Create two patch strategies and view the error.
PASS: Create two different strategies and view the error.
PASS: View errors when creating multiple strategies
from horizon.
Closes-Bug: #1989485
Signed-off-by: Al Bailey <email address hidden>
Change-Id: Ic79eab03b70b8bc7fbe2876f95eea3f2f34ab791
Reviewed: https:/ /review. opendev. org/c/starlingx /nfv/+/ 857529 /opendev. org/starlingx/ nfv/commit/ 7ca02243d103a0f 4380c3a347b9fdf ae789537c1
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 7ca02243d103a0f 4380c3a347b9fdf ae789537c1
Author: Al Bailey <email address hidden>
Date: Tue Sep 13 13:59:21 2022 +0000
Adding details to VIM API Conflict responses
When the VIM Stragegy API returns a 409 Conflict for a create,
it is much more useful to know details about the conflict.
ie: what type of strategy already exists.
This fix required:
- the strategy creation rpc message adds an error string
- pecan.abort 'conflict' must include the error string
- the nfv_client code must extract the error string
- the strategy types must return knowledge of an existing
strategy type
- the director class must include details of the existing
strategy type in its failure messages.
Test Plan:
PASS: Create two patch strategies and view the error.
PASS: Create two different strategies and view the error.
PASS: View errors when creating multiple strategies
from horizon.
Closes-Bug: #1989485 c7fbe2876f95eea 3f2f34ab791
Signed-off-by: Al Bailey <email address hidden>
Change-Id: Ic79eab03b70b8b