Skip to content

Commit

Permalink
NC | account by id | various fixes
Browse files Browse the repository at this point in the history
-fix account status name flag check
-fix Getting Started diagram url
-return email to nc coretest rpc
-fix has_access_keys() to check access_keys[0].access_key is defined
  • Loading branch information
alphaprinz committed Jul 30, 2024
1 parent 9fa46b4 commit 3a6b230
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/NooBaaNonContainerized/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NooBaa Non Containerized solution includes the following components -
5. [Storage File System](#create-storage-file-system-paths) - A File system for storing objects.

### NooBaa High Level Diagram
![NooBaa Non Containerized Components Diagram](https://private-user-images.githubusercontent.com/7504055/351399903-4ee60215-cb4f-48f7-8943-a85dc7f931aa.png)
![NooBaa Non Containerized Components Diagram](https://github.com/user-attachments/assets/601a6220-f236-446e-9ead-404d41a5ffc5)


## Build NooBaa RPM
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/manage_nsfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ async function delete_account(data, user_input) {
async function get_account_status(data, user_input, show_secrets) {
await manage_nsfs_validations.validate_account_args(global_config, data, ACTIONS.STATUS, undefined);
try {
const account_path = _.isUndefined(data.name) ?
const account_path = _.isUndefined(user_input.name) ?
get_symlink_config_file_path(global_config.access_keys_dir_path, data.access_keys[0].access_key) :
//user_input.name is root account name. data.name is iam account name
get_symlink_config_file_path(global_config.root_accounts_dir_path, data.name, user_input.name);
Expand Down
2 changes: 1 addition & 1 deletion src/manage_nsfs/manage_nsfs_cli_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async function get_options_from_file(file_path) {
* @param {object[]} access_keys
*/
function has_access_keys(access_keys) {
return access_keys.length > 0;
return access_keys.length > 0 && access_keys[0].access_key;
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/test/unit_tests/nc_coretest.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ async function read_bucket_manage(options) {
const res = await exec_manage_cli(TYPES.BUCKET, ACTIONS.STATUS, options);
const json_bucket = JSON.parse(res);
const bucket = json_bucket.response.reply;
bucket.owner_account = {
email: bucket.bucket_owner,
id: bucket.owner_account
};
return bucket;
}

Expand Down

0 comments on commit 3a6b230

Please sign in to comment.