You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current src/cmd/ (CLI) components have a strange hierarchy. Accounts/buckets/whitelist management is under manage_nsfs while other NooBaa CLI commands are placed in the correct location.
The manage_nsfs help has a weird look and should be more user-friendly -
Indentation issues.
Missing info for each command.
check OC CLI for reference.
When running with no command we get invalidType error instead of help print.
Add --verbose/--quiet - NooBaa CLI should not print stderr to the user.
Manage_nsfs - The add action should be renamed to create.
Whitelist -
Currently, there is no action specified for whitelists, we always update.
We need to split the actions to get/delete/update, or remove completely and update/get/delete via editing of config.json.
change validation function to use net.blocklist API.
change the default empty string ('') default to undefined - which means that only when whitelist is undefined we will allow all, and not on empty string.
Expected behavior
We expect NooBaa CLI to -
Be user-friendly.
Not writing stderr logs to the user unless specifying --verbose.
Have a flattened hierarchy.
Account/Bucket add action should be renamed to create.
Steps to reproduce
run node src/cmd
More information - Screenshots / Logs / Other output
Example of indentation missing, missing info and stderr prints:
sudo node src/cmd/manage_nsfs account --help
Error accrued while getting the data from /etc/noobaa.conf.d/config_dir_redirect: Error: ENOENT: no such file or directory, open '/etc/noobaa.conf.d/config_dir_redirect'
config.get_config_root - could not find custom config_root, will use the default config_root /etc/noobaa.conf.d
load_nsfs_nc_config.setting config.NSFS_NC_CONF_DIR /etc/noobaa.conf.d
config.load_nsfs_nc_config could not find config.json... skipping
Usage:
account <action> [flags]
List of actions supported:
add
update
list
status
delete
Example of manage_nsfs invalidType error instead of help print -
sudo node src/cmd/manage_nsfs
Error accrued while getting the data from /etc/noobaa.conf.d/config_dir_redirect: Error: ENOENT: no such file or directory, open '/etc/noobaa.conf.d/config_dir_redirect'
config.get_config_root - could not find custom config_root, will use the default config_root /etc/noobaa.conf.d
load_nsfs_nc_config.setting config.NSFS_NC_CONF_DIR /etc/noobaa.conf.d
config.load_nsfs_nc_config could not find config.json... skipping
{
"error": {
"code": "InvalidType",
"message": "Invalid type, available types are account, bucket or whitelist"
}
}
The text was updated successfully, but these errors were encountered:
Environment info
Actual behavior
Expected behavior
Steps to reproduce
node src/cmd
More information - Screenshots / Logs / Other output
Example of indentation missing, missing info and stderr prints:
Example of manage_nsfs invalidType error instead of help print -
The text was updated successfully, but these errors were encountered: