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

Method evaluate_network_action

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

Evaluate a network access request and return a routing action. Uses the OPA `network_action` rule which returns one of: `"allow"` or `"deny"`.

(&self, input: &NetworkInput)

Source from the content-addressed store, hash-verified

306 /// Uses the OPA `network_action` rule which returns one of:
307 /// `"allow"` or `"deny"`.
308 pub fn evaluate_network_action(&self, input: &NetworkInput) -> Result<NetworkAction> {
309 Ok(self.evaluate_network_action_with_generation(input)?.0)
310 }
311
312 /// Evaluate network action and return the policy generation used for the evaluation.
313 pub fn evaluate_network_action_with_generation(