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

Function sandbox_draft_approve_all

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

Approve all pending network rules.

(
    server: &str,
    name: &str,
    include_security_flagged: bool,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

7675
7676/// Approve all pending network rules.
7677pub async fn sandbox_draft_approve_all(
7678 server: &str,
7679 name: &str,
7680 include_security_flagged: bool,
7681 tls: &TlsOptions,
7682) -> Result<()> {
7683 let mut client = grpc_client(server, tls).await?;
7684
7685 let response = client
7686 .approve_all_draft_chunks(ApproveAllDraftChunksRequest {
7687 name: name.to_string(),
7688 include_security_flagged,
7689 })
7690 .await
7691 .into_diagnostic()?;
7692
7693 let inner = response.into_inner();
7694 println!(
7695 "{} {} chunk(s) approved, {} skipped. Policy version: {}",
7696 "OK".green().bold(),
7697 inner.chunks_approved,
7698 inner.chunks_skipped,
7699 inner.policy_version,
7700 );
7701
7702 Ok(())
7703}
7704
7705/// Clear all pending network rules.
7706pub async fn sandbox_draft_clear(server: &str, name: &str, tls: &TlsOptions) -> Result<()> {

Callers 1

mainFunction · 0.85

Calls 2

grpc_clientFunction · 0.85

Tested by

no test coverage detected