Skip to main content

BuildEnvironment

Trait BuildEnvironment 

Source
pub trait BuildEnvironment: ShellEnvironment {
    // Required methods
    fn load_pool_spec(&self, tenant_id: &str, pool_id: &str) -> Result<PoolSpec>;
    fn load_tenant_config(&self, tenant_id: &str) -> Result<TenantConfig>;
    fn ensure_bridge(&self, net: &TenantNet) -> Result<()>;
    fn setup_tap(&self, net: &InstanceNet, bridge_name: &str) -> Result<()>;
    fn teardown_tap(&self, tap_dev: &str) -> Result<()>;
    fn record_revision(
        &self,
        tenant_id: &str,
        pool_id: &str,
        revision: &BuildRevision,
    ) -> Result<()>;
}
Expand description

Full build environment for orchestrated pool builds.

Extends ShellEnvironment with tenant/pool/network operations needed by the pool build pipeline (ephemeral FC builder VMs, artifact recording). mvm-build depends on mvm-core only. At runtime, the orchestrator provides a concrete implementation that delegates to the runtime modules.

Required Methods§

Source

fn load_pool_spec(&self, tenant_id: &str, pool_id: &str) -> Result<PoolSpec>

Load a pool spec from the filesystem.

Source

fn load_tenant_config(&self, tenant_id: &str) -> Result<TenantConfig>

Load a tenant config from the filesystem.

Source

fn ensure_bridge(&self, net: &TenantNet) -> Result<()>

Ensure the tenant network bridge is up.

Source

fn setup_tap(&self, net: &InstanceNet, bridge_name: &str) -> Result<()>

Create and attach a TAP device for a VM.

Source

fn teardown_tap(&self, tap_dev: &str) -> Result<()>

Remove a TAP device.

Source

fn record_revision( &self, tenant_id: &str, pool_id: &str, revision: &BuildRevision, ) -> Result<()>

Record a build revision and update the current symlink.

Implementors§