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§
Sourcefn load_pool_spec(&self, tenant_id: &str, pool_id: &str) -> Result<PoolSpec>
fn load_pool_spec(&self, tenant_id: &str, pool_id: &str) -> Result<PoolSpec>
Load a pool spec from the filesystem.
Sourcefn load_tenant_config(&self, tenant_id: &str) -> Result<TenantConfig>
fn load_tenant_config(&self, tenant_id: &str) -> Result<TenantConfig>
Load a tenant config from the filesystem.
Sourcefn ensure_bridge(&self, net: &TenantNet) -> Result<()>
fn ensure_bridge(&self, net: &TenantNet) -> Result<()>
Ensure the tenant network bridge is up.
Sourcefn setup_tap(&self, net: &InstanceNet, bridge_name: &str) -> Result<()>
fn setup_tap(&self, net: &InstanceNet, bridge_name: &str) -> Result<()>
Create and attach a TAP device for a VM.
Sourcefn teardown_tap(&self, tap_dev: &str) -> Result<()>
fn teardown_tap(&self, tap_dev: &str) -> Result<()>
Remove a TAP device.
Sourcefn record_revision(
&self,
tenant_id: &str,
pool_id: &str,
revision: &BuildRevision,
) -> Result<()>
fn record_revision( &self, tenant_id: &str, pool_id: &str, revision: &BuildRevision, ) -> Result<()>
Record a build revision and update the current symlink.