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

Function sandbox_policy_list_global

crates/openshell-cli/src/run.rs:7339–7360  ·  view source on GitHub ↗
(server: &str, limit: u32, tls: &TlsOptions)

Source from the content-addressed store, hash-verified

7337}
7338
7339pub async fn sandbox_policy_list_global(server: &str, limit: u32, tls: &TlsOptions) -> Result<()> {
7340 let mut client = grpc_client(server, tls).await?;
7341
7342 let resp = client
7343 .list_sandbox_policies(ListSandboxPoliciesRequest {
7344 name: String::new(),
7345 limit,
7346 offset: 0,
7347 global: true,
7348 })
7349 .await
7350 .into_diagnostic()?;
7351
7352 let revisions = resp.into_inner().revisions;
7353 if revisions.is_empty() {
7354 eprintln!("No global policy history found");
7355 return Ok(());
7356 }
7357
7358 print_policy_revision_table(&revisions);
7359 Ok(())
7360}
7361
7362fn print_policy_revision_table(revisions: &[openshell_core::proto::SandboxPolicyRevision]) {
7363 println!(

Callers 1

mainFunction · 0.85

Calls 4

grpc_clientFunction · 0.85
list_sandbox_policiesMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected