Before deploing we do some configuration based on the list of the
firmware versions the target supports and on DPP subscription user
has.
Previously this configuration lived beside the code responsible for
deploying, as a result, the deploying workflows was messy, had nesting
levels over 3, and nonlinear and complex logic.
This commit tries to separate this configuration and deploying to make
it more readable and scallable.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
This function is useful not unly during update workflow, but every time
firmware is being deployed
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
"test -v" checks whether a variable has been declared, it does not check
its value. We sometimes use "unset" for some variables, and then check
again with "test -v". The problem is, "unset" erases variable value, but
the variable still exists, so the "test -v" will be true before, as well
as after the "unset".
We must use "test -n" (whether a variable holds non-zero length
string value) and "test -z" (whether a variable holds zero length string
value) to check string values of variables. This way the "unset" will
work.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
Variables with links to hashes of the firmware binaries are always set,
use variables with links to firmware binaries instead.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
This commit adds dynamically rendered submenu for functionality
implemented by private DES packages installed from Dasharo server.
Every installed package extends the submenu accroding to its needs.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
This commit adds package management functionality: downloading and
installing packages from Dasharo server. The packages are private, the
access is granted after entering DES credentials.
Additionally this commit reworks codebase a bit, to make it more clear.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>