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

Method get_draft_policy

crates/openshell-core/src/grpc_client.rs:795–810  ·  view source on GitHub ↗

Fetch the current draft chunks for a sandbox. `status_filter` may be `"pending"`, `"approved"`, `"rejected"`, or empty for all. Used by `policy.local`'s `GET /v1/proposals/{id}` and `/wait` routes to inspect proposal state.

(
        &self,
        sandbox_name: &str,
        status_filter: &str,
    )

Source from the content-addressed store, hash-verified

793 /// `policy.local`'s `GET /v1/proposals/{id}` and `/wait` routes to
794 /// inspect proposal state.
795 pub async fn get_draft_policy(
796 &self,
797 sandbox_name: &str,
798 status_filter: &str,
799 ) -> Result<Vec<PolicyChunk>> {
800 let response = self
801 .client
802 .clone()
803 .get_draft_policy(GetDraftPolicyRequest {
804 name: sandbox_name.to_string(),
805 status_filter: status_filter.to_string(),
806 })
807 .await
808 .into_diagnostic()?;
809 Ok(response.into_inner().chunks)
810 }
811
812 /// Report policy load status back to the server.
813 pub async fn report_policy_status(

Callers 2

refresh_draft_chunksFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected