feat: app node report

contract admin can report app node
This commit is contained in:
Noor 2025-04-14 15:49:46 +05:30 committed by ghe0
parent bf7d8707f4
commit 9a5387b931
Signed by: ghe0
GPG Key ID: 451028EE56A0FBB4
2 changed files with 7 additions and 7 deletions

@ -284,7 +284,6 @@ fn clap_cmd() -> Command {
.required(true)
)
)
/*
.subcommand(Command::new("report").about("report a node for poor performance")
.arg(
Arg::new("pubkey")
@ -304,7 +303,6 @@ fn clap_cmd() -> Command {
.help("detail the performance issue you experienced")
)
)
*/
)
.subcommand(Command::new("vm")
.about("virtual machines that run on AMD SEV-SNP nodes")

@ -39,11 +39,13 @@ pub fn handle_app_nodes(matches: &ArgMatches) {
let ip: String = subcom_args.get_one::<String>("ip").unwrap().clone();
cli_print(inspect_node(ip).map_err(Into::into));
}
Some(("report", _)) => {
// let node_pubkey: String = path_subcommand.get_one::<String>("pubkey").unwrap().clone();
// let contract_uuid: String = path_subcommand.get_one::<String>("contract").unwrap().clone();
// let reason: String = path_subcommand.get_one::<String>("reason").unwrap().clone();
todo!()
Some(("report", subcom_args)) => {
let node_pubkey: String = subcom_args.get_one::<String>("pubkey").unwrap().clone();
let contract_uuid: String = subcom_args.get_one::<String>("contract").unwrap().clone();
let reason: String = subcom_args.get_one::<String>("reason").unwrap().clone();
cli_print(
crate::general::report_node(node_pubkey, contract_uuid, reason).map_err(Into::into),
)
}
_ => {
eprintln!("Available commands are search, inspec and report. Use --help for more information.")