distcloud-client/distributedcloud-client
Salman Rana db6d32fdf7 Fix deploy upload invalid arg exit
Raise a DCManagerClientException to exit from the deploy
upload command handler when an invalid
file arg is encountered. Otherwise, exiting the method
with a simple return results in:
 - an exit code of 0 (a non-zero exit code is expected)
 - Output of an empty deploy table
   (SubcloudDeployUpload is a subclass of DCManagerShowOne.
   A simple return is interpreted as success, hence a console
   output of an empty result is displayed)

Overall, this behavior is misleading as it indicates success
despite the failure. This behavior is specific to the file arg
check (client-side validation done prior to the endpoint call).
Backend errors have been verified to be handled properly,
with a non-zero exit code.

Test Plan:
Using deploy upload (dcmanager subcloud-deploy upload):
  1. PASS: Execute the command with valid
     arguments (correct file references); verify a zero exit code
     (“echo $?”) and console output displaying the
     deploy table.
  2. PASS: Execute the command with an invalid argument
     (missing reference file); verify a non-zero exit code
     (“echo $?”), no deploy table console output and an
     error message “ERROR (app) <arg> does not exist: <file>”

Closes-Bug: 2032970

Change-Id: I53da00a1ba4562aae4345ea1182ca923d227d0e8
Signed-off-by: Salman Rana <salman.rana@windriver.com>
2023-08-30 17:56:58 +00:00
..
centos Enabling firmware update dcmanager orchestration commands 2020-07-30 12:58:26 -05:00
dcmanagerclient Fix deploy upload invalid arg exit 2023-08-30 17:56:58 +00:00
debian Update debian package versions to use git commits 2023-02-10 09:13:13 -08:00
.coveragerc Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
.testr.conf Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
LICENSE Update files for relocated repo 2019-11-04 16:12:27 -05:00
MANIFEST.in Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
README.rst Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
babel.cfg Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
pylint.rc Make Tox compatible to Debian Python3.9 Environment - dc-client 2022-08-11 14:16:40 -04:00
requirements.txt Support subcloud deploy upload the common files 2020-04-23 09:38:51 -04:00
setup.cfg Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
setup.py Move content to subdir to support relocated packaging 2019-11-04 14:14:38 -05:00
test-requirements-debian.txt Make Tox compatible to Debian Python3.9 Environment - dc-client 2022-08-11 14:16:40 -04:00
test-requirements.txt Adding py39 gate and removing py36 gates from zuul 2021-10-28 19:41:32 +00:00
tox.ini Clean up outdated configs in tox.ini and .zuul.yaml 2023-07-20 17:38:24 -03:00

README.rst

Dcmanagerclient

Wind River's Distributed Cloud system supports an edge computing solution by providing central management and orchestration for a geographically distributed network of Titanium Cloud systems.

python-dcmanagerclient

Python client for dcmanager

This is a client library for Dcmanager built on the Dcmanager API. It provides a Python API (the dcmanagerclient module) and a command-line tool (dcmanager).