distcloud/distributedcloud/dcorch
Lindley Werner c5e1d7c131 Fix load-import --local with proxy
When load-import is called with --local the load is imported locally
from the active controller. When it's called with "--os-region-name
SystemController", the request is intercepted by the dc-api-proxy.

This commit fixes a bug that happens when the request is intercepted
by the dc-api-proxy. When using --local, the function receives the
params through "request.body" and when not using it the params come
through request.POST. Only the second way was being treated.

Test plan:
  PASS: load-import with --os-region-name SystemController,
  --inactive and --local should be completed if using an upgradable
  load
  PASS: load-import with --os-region-name SystemController,
  --inactive and --local should fail if using a non-upgradable load
  PASS: load-import with --os-region-name SystemController, --active,
  and --local should complete using a load from the same version
  PASS: load-import with --os-region-name SystemController and
  --inactive should be completed if using an upgradable load
  PASS: load-import with --os-region-name SystemController and
  --inactive should fail if using a non-upgradable load

Closes-bug: 2043511

Change-Id: Id5c02fdc35c43b4134fd34592de36d35f9fc88b6
Signed-off-by: Lindley Werner <Lindley.Vieira@windriver.com>
2023-11-14 18:54:25 -03:00
..
api Fix load-import --local with proxy 2023-11-14 18:54:25 -03:00
cmd Tech debt: move portions of dcorch.common.consts into dccommon.consts 2022-06-16 12:28:44 -04:00
common Add a switch to patching proxy 2023-10-24 08:33:11 -03:00
db Subcloud Name Reconfiguration 2023-09-07 10:30:06 -03:00
drivers Minor Code Change Based on Py39 Pylint Feedback 2022-08-10 13:12:24 -04:00
engine Subcloud Name Reconfiguration 2023-09-07 10:30:06 -03:00
objects Minor Code Change Based on Py39 Pylint Feedback 2022-08-10 13:12:24 -04:00
rpc Update endpoint caches post network reconfig 2023-03-14 11:44:15 -03:00
tests Minor Code Change Based on Py39 Pylint Feedback 2022-08-10 13:12:24 -04:00
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
config-generator.conf Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
version.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00