Skip to content

Commit 8225f0f

Browse files
committed
refactor(core): move Podman bridge default into Podman driver
DEFAULT_NETWORK_NAME is Podman vocabulary, consumed only by the Podman driver. Also drops the unused DEFAULT_IMAGE_PULL_POLICY constant.
1 parent 5df55b9 commit 8225f0f

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

crates/openshell-core/src/config.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ pub const DEFAULT_SERVER_PORT: u16 = 8080;
2727
/// Default container stop timeout in seconds (SIGTERM → SIGKILL).
2828
pub const DEFAULT_STOP_TIMEOUT_SECS: u32 = 10;
2929

30-
/// Default Podman bridge network name.
31-
pub const DEFAULT_NETWORK_NAME: &str = "openshell";
32-
3330
/// Default Docker bridge network name for local sandboxes.
3431
pub const DEFAULT_DOCKER_NETWORK_NAME: &str = "openshell-docker";
3532

@@ -39,9 +36,6 @@ pub const DEFAULT_SERVICE_ROUTING_DOMAIN: &str = "openshell.localhost";
3936
/// Default OCI image for the openshell-sandbox supervisor binary.
4037
pub const DEFAULT_SUPERVISOR_IMAGE: &str = "openshell/supervisor:latest";
4138

42-
/// Default image pull policy for sandbox images.
43-
pub const DEFAULT_IMAGE_PULL_POLICY: &str = "missing";
44-
4539
/// CDI device identifier for requesting all NVIDIA GPUs.
4640
pub const CDI_GPU_DEVICE_ALL: &str = "nvidia.com/gpu=all";
4741

crates/openshell-driver-podman/src/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use openshell_core::config::{
5-
DEFAULT_NETWORK_NAME, DEFAULT_SSH_PORT, DEFAULT_STOP_TIMEOUT_SECS, DEFAULT_SUPERVISOR_IMAGE,
5+
DEFAULT_SSH_PORT, DEFAULT_STOP_TIMEOUT_SECS, DEFAULT_SUPERVISOR_IMAGE,
66
};
77
use std::path::PathBuf;
88
use std::str::FromStr;
99

10+
/// Default Podman bridge network name.
11+
pub const DEFAULT_NETWORK_NAME: &str = "openshell";
12+
1013
/// Image pull policy for sandbox and supervisor images.
1114
///
1215
/// Controls when the Podman driver fetches a newer copy of an OCI image

crates/openshell-driver-podman/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use tracing::info;
99
use tracing_subscriber::EnvFilter;
1010

1111
use openshell_core::VERSION;
12-
use openshell_core::config::{DEFAULT_NETWORK_NAME, DEFAULT_SSH_PORT, DEFAULT_STOP_TIMEOUT_SECS};
12+
use openshell_core::config::{DEFAULT_SSH_PORT, DEFAULT_STOP_TIMEOUT_SECS};
1313
use openshell_core::proto::compute::v1::compute_driver_server::ComputeDriverServer;
14-
use openshell_driver_podman::config::ImagePullPolicy;
14+
use openshell_driver_podman::config::{DEFAULT_NETWORK_NAME, ImagePullPolicy};
1515
use openshell_driver_podman::{ComputeDriverService, PodmanComputeConfig, PodmanComputeDriver};
1616

1717
#[derive(Parser)]

0 commit comments

Comments
 (0)