Approve all pending network rules.
(
server: &str,
name: &str,
include_security_flagged: bool,
tls: &TlsOptions,
)
| 7675 | |
| 7676 | /// Approve all pending network rules. |
| 7677 | pub 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. |
| 7706 | pub async fn sandbox_draft_clear(server: &str, name: &str, tls: &TlsOptions) -> Result<()> { |
no test coverage detected