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

Function test_sandbox

crates/openshell-server/src/grpc/policy.rs:4387–4412  ·  view source on GitHub ↗
(
        id: &str,
        name: &str,
        policy: ProtoSandboxPolicy,
        providers: Vec<String>,
    )

Source from the content-addressed store, hash-verified

4385 }
4386
4387 fn test_sandbox(
4388 id: &str,
4389 name: &str,
4390 policy: ProtoSandboxPolicy,
4391 providers: Vec<String>,
4392 ) -> Sandbox {
4393 use openshell_core::proto::{SandboxPhase, SandboxSpec};
4394
4395 let mut sandbox = Sandbox {
4396 metadata: Some(openshell_core::proto::datamodel::v1::ObjectMeta {
4397 id: id.to_string(),
4398 name: name.to_string(),
4399 created_at_ms: 1_000_000,
4400 labels: HashMap::new(),
4401 resource_version: 0,
4402 }),
4403 spec: Some(SandboxSpec {
4404 policy: Some(policy),
4405 providers,
4406 ..Default::default()
4407 }),
4408 ..Default::default()
4409 };
4410 sandbox.set_phase(SandboxPhase::Ready as i32);
4411 sandbox
4412 }
4413
4414 async fn enable_providers_v2(state: &Arc<ServerState>) {
4415 let global_settings = StoredSettings {

Calls 1

set_phaseMethod · 0.80

Tested by

no test coverage detected