-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTaaS CLI: Base structure and User add/Delete for Compose #578
DTaaS CLI: Base structure and User add/Delete for Compose #578
Conversation
@astitva1905 |
@astitva1905 # This is the config for DTaaS CLI
name = "Digital Twin as a Service (DTaaS)"
version = "0.1"
owner = "The INTO-CPS-Association"
git-repo = "https://github.com/into-cps-association/DTaaS.git"
[common]
# absolute path to the DTaaS application directory
path = "/home/dtaas/app"
[users]
# matching user info must present in this config file
add = ["username1","username2"]
remove = ["username3"]
[users.username1]
email = "[email protected]"
[users.username2]
email = "[email protected]"
[users.username3]
email = "[email protected]"
[client.web]
config = "/home/dtaas/app/config/client/env.local.js" Please name this file as The format of the config subcommands are: # inspiration "git config -h"
dtaas config [OPTIONS]
-l --list show TOML config file
-g --get path get the value of common.path variable
-s --set path set the value of common.path variable
-u --unset path delete the common.path variable from dtaas.toml file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comments.
The additional stack to be put in:
Additional TODO: github workflow file to perform all the poetry steps including |
A suggestion to reduce the scope of this PR: Assume the correct formatting of |
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## feature/distributed-demo #578 +/- ##
=============================================================
+ Coverage 63.38% 93.33% +29.94%
=============================================================
Files 31 5 -26
Lines 396 45 -351
Branches 26 3 -23
=============================================================
- Hits 251 42 -209
+ Misses 130 0 -130
+ Partials 15 3 -12
... and 31 files with indirect coverage changes
|
Let the forward-auth config update step (for conf.server and conf.local) be manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to check the working of the code. Please do add the developer (poetry...) commands to the README
cli/dtaas.toml
Outdated
|
||
[common] | ||
# absolute path to the DTaaS application directory | ||
server-dns = "domain.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
foo.com
cli/dtaas.toml
Outdated
[common] | ||
# absolute path to the DTaaS application directory | ||
server-dns = "domain.com" | ||
path = "/home/astitva/Desktop/yamlstuff" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/home/dtaas/DTaaS
cli/dtaas.toml
Outdated
|
||
[users] | ||
# matching user info must present in this config file | ||
add = ["astitvasehgal05","astitvasehgal19", "prasad"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user1,user2,user3
|
||
configObj = dtaasPkg.Config() | ||
|
||
err = userPkg.deleteUser(configObj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use try...catch structure
cli/src/pkg/dtaas.py
Outdated
class Config: | ||
def __init__(self): | ||
config, err = utils.importToml('dtaas.toml') | ||
if err!=None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is try....catch iseful here?
cli/src/pkg/users.py
Outdated
import subprocess | ||
from . import utils | ||
|
||
def __getComposeConfig(username, server, DTaaSDirPath): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice notation for internal functions.
cmdStr = " ".join(cmd) | ||
subprocess.run(cmdStr, shell=True, check=False) | ||
|
||
def stopUserContainers(users): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
compose['services'][username] = config | ||
return None | ||
|
||
def startUserContainers(users): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
return None, Exception("Config file error: Missing 'common' tag") | ||
return conf['common'], None | ||
|
||
def getUsers(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/src/pkg/users.py
Outdated
|
||
err = utils.exportYaml(compose, 'compose.users.yml') | ||
if err is not None: | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
|
||
startUserContainers(userList) | ||
|
||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
cli/src/pkg/users.py
Outdated
return err | ||
path, err = configObj.getPath() | ||
if err is not None: | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many returns @prasadtalasila
@astitva1905 please resolve these codeclimate issues as well. Thanks. |
return None, Exception("Config file error: The server dns isn't set in TOML") | ||
return str(confCommon['server-dns']), None | ||
|
||
def getAddUsersList(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/tests/test_utils.py
Outdated
|
||
def test_export_yaml(): | ||
|
||
data = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/tests/test_utils.py
Outdated
assert template==expected | ||
|
||
def test_import_yaml_compose(): | ||
expected = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/src/pkg/users.py
Outdated
|
||
err = startUserContainers(userList) | ||
if err is not None: | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
cli/src/pkg/users.py
Outdated
if 'services' not in compose: | ||
return None | ||
if username not in compose['services']: | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
@astitva1905 some feedback on the CLI after trying in
|
addUsersList = [ str(username) for username in confUsers['add']] | ||
return addUsersList, None | ||
|
||
def getDeleteUsersList(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/tests/test_utils.py
Outdated
} | ||
} | ||
|
||
expected = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/src/pkg/users.py
Outdated
|
||
err = utils.exportYaml(compose, 'compose.users.yml') | ||
if err is not None: | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
if err is not None: | ||
return err | ||
|
||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
cli/tests/test_utils.py
Outdated
|
||
def test_replace_all(): | ||
|
||
template = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
return None, Exception(f"Error while getting toml file: {filename}, " + str(err)) | ||
return config, None | ||
|
||
def replaceAll(obj, mapping): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
cli/src/pkg/utils.py
Outdated
|
||
obj[key], err = replaceAll(obj[key], mapping) | ||
if err is not None: | ||
return None, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
cli/src/pkg/utils.py
Outdated
if err is not None: | ||
return None, err | ||
|
||
return obj, None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
return None, Exception(f"Error while getting toml file: {filename}, " + str(err)) | ||
return config, None | ||
|
||
def replaceAll(obj, mapping): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
|
||
|
||
|
||
def checkError(err): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "checkError" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
return None, Exception(f"Error while getting toml file: {filename}, " + str(err)) | ||
return config, None | ||
|
||
def replaceAll(obj, mapping): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "replaceAll" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
return None, err | ||
return obj, None | ||
|
||
return None, Exception("Config substition failed: Object format not valid") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
return | ||
|
||
#### user group commands | ||
@user.command() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/src/pkg/utils.py
Outdated
|
||
return None, Exception("Config substition failed: Object format not valid") | ||
|
||
def replaceString(obj, mapping): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "replaceString" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
|
||
return None | ||
|
||
def deleteUser(configObj): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "deleteUser" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
raise click.ClickException("Error while adding users: " + str(err)) | ||
click.echo("Users added successfully") | ||
|
||
@user.command() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
return self.data,None | ||
return None, Exception("Config not initialised") | ||
|
||
def getCommon(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
return Exception("failed to stop containers") | ||
return None | ||
|
||
def addUsers(configObj): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "addUsers" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
import shutil | ||
from src.pkg import utils | ||
|
||
def getComposeConfig(username, server, path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "getComposeConfig" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
cli/src/cmd.py
Outdated
""" This file defines all cli entrypoints for dtaas""" | ||
|
||
import click | ||
#from . import service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this commented out code.
|
||
return config, None | ||
|
||
def createUserFiles(users, filePath): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "createUserFiles" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
return Exception("failed to start containers") | ||
return None | ||
|
||
def stopUserContainers(users): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename function "stopUserContainers" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
|
||
return None | ||
|
||
def deleteUser(configObj): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function deleteUser
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
return None, Exception(f"Error while getting toml file: {filename}, " + str(err)) | ||
return config, None | ||
|
||
def replaceAll(obj, mapping): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function replaceAll
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
import subprocess | ||
|
||
|
||
def test_add_user_cli(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
result =subprocess.run(["dtaas admin user add"], shell=True) | ||
assert result.returncode == 0 | ||
|
||
def test_delete_user_cli(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
cli/README.md
Outdated
``` | ||
### Additional Points to Remember | ||
|
||
- The base DTaaS system should be up and running before adding/deleting users with the CLI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
- The base DTaaS system should be up and running before adding/deleting users with the CLI | ||
|
||
- The _user add_ CLI will add and start a container for a new user. | ||
It can also start a container for an existing user if that container was somehow stopped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
|
||
- The _user add_ CLI will add and start a container for a new user. | ||
It can also start a container for an existing user if that container was somehow stopped. | ||
It shows a _Running_ status for existing user containers that are already up and running, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
It shows a _Running_ status for existing user containers that are already up and running, | ||
it doesn't restart them. | ||
|
||
- Configure the _server-dns_ in the _dtaas.toml_ file with the domain name of your server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
- Configure the _server-dns_ in the _dtaas.toml_ file with the domain name of your server. | ||
If you want to bring up the server locally, please set this to _"localhost"_. | ||
|
||
- _user add_ and _user delete_ CLIs return an error if the _add_ and _delete_ lists in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
- _user add_ and _user delete_ CLIs return an error if the _add_ and _delete_ lists in | ||
_dtaas.toml_ are empty, respectively. | ||
|
||
- Currently the _email_ fields for each user in dtaas.toml are not in use, and are not necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
_dtaas.toml_ are empty, respectively. | ||
|
||
- Currently the _email_ fields for each user in dtaas.toml are not in use, and are not necessary | ||
to fill in. These emails must be configured manually for each user in the docker/conf.local or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/README.md
Outdated
|
||
- Currently the _email_ fields for each user in dtaas.toml are not in use, and are not necessary | ||
to fill in. These emails must be configured manually for each user in the docker/conf.local or | ||
docker/conf.server files and the _traefik-forward-auth_ container must be restarted as described above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
|
||
```bash | ||
dtaas admin user delete | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fenced code blocks should be surrounded by blank lines
cli/DEVELOPER.README.md
Outdated
singleton Config class, which is used throughout the CLI. Additionally, | ||
it contains the handling functions for each CLI. These functions perform | ||
the actual operations that the CLI command is responsible for. It also | ||
has helper functions that can be used across the CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces
cli/DEVELOPER.README.md
Outdated
|
||
## Poetry | ||
|
||
We use [Poetry Package](https://python-poetry.org/docs/) to manage dependencies and build the CLI. The configuration file for this is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length
cli/tests/test_utils.py
Outdated
|
||
assert filecmp.cmp('tests/compose.users.test.yml', 'tests/compose.users.exp.yml') | ||
|
||
def getReplaceAllObject(stringval1, stringval2, stringval3, listval1, listval2, listval3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function getReplaceAllObject
has 6 arguments (exceeds 4 allowed). Consider refactoring.
cli/DEVELOPER.md
Outdated
The CLI is published to [PyPI](https://pypi.org/). | ||
Once new changes to the CLI are merged to the DTaaS | ||
repository, the CLI is also published to the official | ||
DTaaS PyPI account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces
[MISCELLANEOUS] | ||
|
||
# List of note tags to take in consideration, separated by a comma. | ||
notes=FIXME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME found
|
||
# List of note tags to take in consideration, separated by a comma. | ||
notes=FIXME, | ||
XXX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XXX found
# List of note tags to take in consideration, separated by a comma. | ||
notes=FIXME, | ||
XXX, | ||
TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO found
cli/DEVELOPER.md
Outdated
|
||
## Setup | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple consecutive blank lines
cli/README.md
Outdated
```toml | ||
[users] | ||
# matching user info must present in this config file | ||
add = ["username1","username2", "username3"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces
def getFromConfig(self, key): | ||
"""Gets the specific key from config""" | ||
conf, err = self.getConfig() | ||
if err is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 5 locations. Consider refactoring.
def getStringFromCommon(self, key): | ||
"""Gets the specific string key from config.common""" | ||
confCommon, err = self.getCommon() | ||
if err is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 5 locations. Consider refactoring.
def getStringListFromUsers(self, key): | ||
"""Gets the specific key as a list of strings from config.users""" | ||
confUsers, err = self.getUsers() | ||
if err is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 5 locations. Consider refactoring.
def replaceList(arr, mapping): | ||
for ind, val in enumerate(arr): | ||
arr[ind], err = replaceAll(val, mapping) | ||
if err is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 5 locations. Consider refactoring.
if not isinstance(key,str): | ||
return None, Exception("Config substitution failed: Key is not a string") | ||
dictionary[key], err = replaceAll(dictionary[key], mapping) | ||
if err is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 5 locations. Consider refactoring.
Code Climate has analyzed commit 6d5deb0 and detected 0 issues on this pull request. View more on Code Climate. |
Tests:
![Screenshot from 2024-03-03 13-13-52](https://private-user-images.githubusercontent.com/69433630/309536742-21118646-824e-4717-b368-2639a4dc78e7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDMzMDYsIm5iZiI6MTczOTM0MzAwNiwicGF0aCI6Ii82OTQzMzYzMC8zMDk1MzY3NDItMjExMTg2NDYtODI0ZS00NzE3LWIzNjgtMjYzOWE0ZGM3OGU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA2NTAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjZTUzYTk3MDcxZGUzYzQwZmFjYWU5YjQxMDhlMGUyZDA0ZTBkYmE2NjViYTFmY2RhNjk4MzA0YzJjMjg0OTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rCMAQSZQTlK-ccT0Uu9P7bwBLQOy7vBrB_EXp5ce3jU)
![Screenshot from 2024-03-03 13-13-33](https://private-user-images.githubusercontent.com/69433630/309536749-98314802-eca9-4204-9edd-3954c87553db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDMzMDYsIm5iZiI6MTczOTM0MzAwNiwicGF0aCI6Ii82OTQzMzYzMC8zMDk1MzY3NDktOTgzMTQ4MDItZWNhOS00MjA0LTllZGQtMzk1NGM4NzU1M2RiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA2NTAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNjMTFjZWI1ZmU1M2Q2NWVjZjc3MDQ5OGU2MzJhMWY2NTJkNWVmMTBjNWY5Y2QwNGQ5ZWYxODlhNDkxNzFjMjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-SDLDdu5_ENrqMRAdRQVH6CToqDw90k6lz9SDxBiMWA)
![Screenshot from 2024-03-03 13-13-28](https://private-user-images.githubusercontent.com/69433630/309536758-87ad462d-1a10-4973-a3b9-30b554d60fee.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDMzMDYsIm5iZiI6MTczOTM0MzAwNiwicGF0aCI6Ii82OTQzMzYzMC8zMDk1MzY3NTgtODdhZDQ2MmQtMWExMC00OTczLWEzYjktMzBiNTU0ZDYwZmVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA2NTAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjOWU2MzljYWFkMjYyYTIxNjA3YTdkOTBlMDY5OGI1M2VkMzE4YjE3ODFiNzU0ZWZiOGI3ZjU3NTJmN2Y2YjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HNAGxjISFYLNn_zf7Id6Ngnq6xryV9xmanW9iN9orCQ)
![Screenshot from 2024-03-03 13-13-21](https://private-user-images.githubusercontent.com/69433630/309536762-8a5c9dae-dae0-40f0-a1f8-52bd8ee7ac5e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDMzMDYsIm5iZiI6MTczOTM0MzAwNiwicGF0aCI6Ii82OTQzMzYzMC8zMDk1MzY3NjItOGE1YzlkYWUtZGFlMC00MGYwLWExZjgtNTJiZDhlZTdhYzVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA2NTAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxNzgxMGQwZTJlZjE0YjIzYzMzODljODQ0ZThjNTk0YjYwNGI5N2E4MzI2NzcwYzUyODMxY2RlZDhmMTAxNTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9Fv9BthUGTCUWqlIiFz99Khx5wkVgDnggmhTMG8SgOQ)
To do:
Adding rules to conf file in user add -> (for next PR)
Starting new user container from within the user add cli (docker compose -f compose.users.yml up ) -> Done
No hardcoding config, instead users.yml.yemplate with recursive replace to fill in params -> Done
File path decision for global config file (~/.config/dtaas/config.yml) -> Changed to dtaas.toml (fornow assumed as always exists in DTaaS/cli/); Done.
Setting networks across compose files
Linting and testing
Packaging and publishing cli