MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sandbox_draft_reject

Function sandbox_draft_reject

crates/openshell-cli/src/run.rs:7653–7674  ·  view source on GitHub ↗

Reject a network rule.

(
    server: &str,
    name: &str,
    chunk_id: &str,
    reason: &str,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

7651
7652/// Reject a network rule.
7653pub async fn sandbox_draft_reject(
7654 server: &str,
7655 name: &str,
7656 chunk_id: &str,
7657 reason: &str,
7658 tls: &TlsOptions,
7659) -> Result<()> {
7660 let mut client = grpc_client(server, tls).await?;
7661
7662 client
7663 .reject_draft_chunk(RejectDraftChunkRequest {
7664 name: name.to_string(),
7665 chunk_id: chunk_id.to_string(),
7666 reason: reason.to_string(),
7667 })
7668 .await
7669 .into_diagnostic()?;
7670
7671 println!("{} Chunk rejected.", "OK".green().bold());
7672
7673 Ok(())
7674}
7675
7676/// Approve all pending network rules.
7677pub async fn sandbox_draft_approve_all(

Callers 1

mainFunction · 0.85

Calls 2

grpc_clientFunction · 0.85
reject_draft_chunkMethod · 0.45

Tested by

no test coverage detected