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

Method from_proto

crates/openshell-supervisor-network/src/opa.rs:184–186  ·  view source on GitHub ↗

Create OPA engine from a typed proto policy. Uses baked-in rego rules and converts the proto's typed fields to JSON data under the `sandbox` key (matching `data.sandbox.*` references in the rego rules). Expands access presets and validates L7 config.

(proto: &ProtoSandboxPolicy)

Source from the content-addressed store, hash-verified

182 ///
183 /// Expands access presets and validates L7 config.
184 pub fn from_proto(proto: &ProtoSandboxPolicy) -> Result<Self> {
185 Self::from_proto_with_pid(proto, 0)
186 }
187
188 /// Create OPA engine from a typed proto policy with symlink resolution.
189 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected