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

Function sandbox_draft_clear

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

Clear all pending network rules.

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

Source from the content-addressed store, hash-verified

7704
7705/// Clear all pending network rules.
7706pub async fn sandbox_draft_clear(server: &str, name: &str, tls: &TlsOptions) -> Result<()> {
7707 let mut client = grpc_client(server, tls).await?;
7708
7709 let response = client
7710 .clear_draft_chunks(ClearDraftChunksRequest {
7711 name: name.to_string(),
7712 })
7713 .await
7714 .into_diagnostic()?;
7715
7716 let inner = response.into_inner();
7717 println!(
7718 "{} {} pending chunk(s) cleared.",
7719 "OK".green().bold(),
7720 inner.chunks_cleared,
7721 );
7722
7723 Ok(())
7724}
7725
7726/// Show network rule history.
7727pub async fn sandbox_draft_history(server: &str, name: &str, tls: &TlsOptions) -> Result<()> {

Callers 1

mainFunction · 0.85

Calls 2

grpc_clientFunction · 0.85
clear_draft_chunksMethod · 0.45

Tested by

no test coverage detected