Skip to content

Commit

Permalink
fix: command 'migrate nodes' validate HSM groups
Browse files Browse the repository at this point in the history
refactor: housekeeping with module files
  • Loading branch information
Manuel Sopena Ballesteros committed Sep 29, 2024
1 parent df00812 commit 24e955f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions src/cli/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,27 @@ pub async fn process_cli(

let xnames_string: &String = cli_migrate_nodes.get_one("XNAMES").unwrap();

// Validate user has access to 'from' HSM group
let _ = get_target_hsm_group_vec_or_all(
shasta_token,
shasta_base_url,
shasta_root_cert,
Some(from),
settings_hsm_group_name_opt,
)
.await;

// Validate user has access to 'to' HSM group
let _ = get_target_hsm_group_vec_or_all(
shasta_token,
shasta_base_url,
shasta_root_cert,
Some(to),
settings_hsm_group_name_opt,
)
.await;

// Migrate nodes
add_nodes::exec(
shasta_token,
shasta_base_url,
Expand Down
File renamed without changes.

0 comments on commit 24e955f

Please sign in to comment.