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

Function sandbox_policy_list

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

Source from the content-addressed store, hash-verified

7309}
7310
7311pub async fn sandbox_policy_list(
7312 server: &str,
7313 name: &str,
7314 limit: u32,
7315 tls: &TlsOptions,
7316) -> Result<()> {
7317 let mut client = grpc_client(server, tls).await?;
7318
7319 let resp = client
7320 .list_sandbox_policies(ListSandboxPoliciesRequest {
7321 name: name.to_string(),
7322 limit,
7323 offset: 0,
7324 global: false,
7325 })
7326 .await
7327 .into_diagnostic()?;
7328
7329 let revisions = resp.into_inner().revisions;
7330 if revisions.is_empty() {
7331 eprintln!("No policy history found for sandbox '{name}'");
7332 return Ok(());
7333 }
7334
7335 print_policy_revision_table(&revisions);
7336 Ok(())
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?;

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