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

Function sync_policy

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

Sync an enriched policy back to the gateway. Used by the supervisor to push baseline-path-enriched policies so the gateway stores the effective policy users see via `openshell sandbox get`.

(endpoint: &str, sandbox: &str, policy: &ProtoSandboxPolicy)

Source from the content-addressed store, hash-verified

656/// Used by the supervisor to push baseline-path-enriched policies so the
657/// gateway stores the effective policy users see via `openshell sandbox get`.
658pub async fn sync_policy(endpoint: &str, sandbox: &str, policy: &ProtoSandboxPolicy) -> Result<()> {
659 debug!(endpoint = %endpoint, sandbox = %sandbox, "Syncing enriched policy to gateway");
660 let mut client = connect(endpoint).await?;
661 sync_policy_with_client(&mut client, sandbox, policy).await
662}
663
664/// Fetch provider environment variables for a sandbox from `OpenShell` server via gRPC.
665///

Callers 1

load_policyFunction · 0.85

Calls 2

connectFunction · 0.85
sync_policy_with_clientFunction · 0.85

Tested by

no test coverage detected