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

Function policy_for_view

crates/openshell-cli/src/run.rs:7299–7309  ·  view source on GitHub ↗
(policy: &SandboxPolicy, view: PolicyGetView)

Source from the content-addressed store, hash-verified

7297}
7298
7299fn policy_for_view(policy: &SandboxPolicy, view: PolicyGetView) -> Cow<'_, SandboxPolicy> {
7300 if view != PolicyGetView::Base {
7301 return Cow::Borrowed(policy);
7302 }
7303
7304 let mut base_policy = policy.clone();
7305 base_policy
7306 .network_policies
7307 .retain(|name, _| !openshell_policy::is_provider_rule_name(name));
7308 Cow::Owned(base_policy)
7309}
7310
7311pub async fn sandbox_policy_list(
7312 server: &str,

Calls 1

is_provider_rule_nameFunction · 0.85

Tested by

no test coverage detected