Create a cli package for Services#1377
Create a cli package for Services#1377prasadtalasila merged 127 commits intoINTO-CPS-Association:feature/distributed-demofrom
Conversation
…ture/distributed-demo
…/DTaaS into feature/distributed-demo
|
@8ohamed please skip the updating of code outside of |
@prasadtalasila Should I revert the changes in the top cli, and wait for you to merge this PR, then in a different PR I commit the changes for the top cli. |
|
@8ohamed please refer the changes in the top-level |
|
Hi @prasadtalasila I updated the stop command it should fix the status command. if not I will look into it again in the next PR. |
|
@8ohamed are the qlty issues fixed as well? |
|
@prasadtalasila yes in "a646ea0" |
| @@ -0,0 +1,432 @@ | |||
| # pylint: disable=redefined-outer-name | |||
| """Tests for Service class and Docker operations""" | |||
| import os | |||
There was a problem hiding this comment.
Import of 'os' is not used.
|
@8ohamed There are still eleven qlty issues in the |
|
Hi @prasadtalasila I fixed the qlty issues, if you inspect qlty.sh on the repo it might still say that some files has 1 or 2 issues, but if you enter the file it doesn't show any issues, I think it takes more time to update the values. And here's the output of the commands on the server
|
|
| ensure you run the setup command with appropriate privileges: | ||
|
|
||
| ```bash | ||
| sudo -E env PATH="$PATH" dtaas-services setup |
There was a problem hiding this comment.
The recommended command sudo -E env PATH="$PATH" dtaas-services setup preserves the unprivileged user’s PATH when escalating to root, which can allow execution of attacker-controlled binaries as root if a writable directory (e.g. $HOME/bin) appears early in PATH. An attacker who can modify a directory on the user’s PATH could place a malicious docker or other executable that the CLI or its dependencies invoke, leading to local privilege escalation and full compromise of the host. To mitigate this, avoid preserving the full user PATH for privileged runs and rely on a minimal, root-controlled PATH when invoking dtaas-services with elevated privileges.
| sudo -E env PATH="$PATH" dtaas-services setup | |
| sudo dtaas-services setup |




Create a cli poetry package for managing services
Type of Change
Description
This PR solves the #1375 issue, by creating a poetry cli package, so the user can manage the platform services by entring command lines.