(server: &str, limit: u32, tls: &TlsOptions)
| 7337 | } |
| 7338 | |
| 7339 | pub 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 | |
| 7362 | fn print_policy_revision_table(revisions: &[openshell_core::proto::SandboxPolicyRevision]) { |
| 7363 | println!( |
no test coverage detected