pub trait PetriVmConfig: Send {
Show 14 methods
// Required methods
fn run_without_agent<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>
where Self: 'async_trait;
fn run_with_lazy_pipette<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>
where Self: 'async_trait;
fn run<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn PetriVm>, PipetteClient)>> + Send + 'async_trait>>
where Self: 'async_trait;
fn with_secure_boot(self: Box<Self>) -> Box<dyn PetriVmConfig>;
fn with_windows_secure_boot_template(
self: Box<Self>,
) -> Box<dyn PetriVmConfig>;
fn with_uefi_ca_secure_boot_template(
self: Box<Self>,
) -> Box<dyn PetriVmConfig>;
fn with_processor_topology(
self: Box<Self>,
topology: ProcessorTopology,
) -> Box<dyn PetriVmConfig>;
fn with_custom_openhcl(
self: Box<Self>,
artifact: ResolvedArtifact,
) -> Box<dyn PetriVmConfig>;
fn with_openhcl_command_line(
self: Box<Self>,
command_line: &str,
) -> Box<dyn PetriVmConfig>;
fn with_agent_file(
self: Box<Self>,
name: &str,
artifact: ResolvedArtifact,
) -> Box<dyn PetriVmConfig>;
fn with_openhcl_agent_file(
self: Box<Self>,
name: &str,
artifact: ResolvedArtifact,
) -> Box<dyn PetriVmConfig>;
fn with_uefi_frontpage(
self: Box<Self>,
enable: bool,
) -> Box<dyn PetriVmConfig>;
fn with_vmbus_redirect(
self: Box<Self>,
enable: bool,
) -> Box<dyn PetriVmConfig>;
fn os_flavor(&self) -> OsFlavor;
}
Expand description
Configuration state for a test VM.
R is the type of the struct used to interact with the VM once it is created
Required Methods§
Sourcefn run_without_agent<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>where
Self: 'async_trait,
fn run_without_agent<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>where
Self: 'async_trait,
Build and boot the requested VM. Does not configure and start pipette. Should only be used for testing platforms that pipette does not support.
Sourcefn run_with_lazy_pipette<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>where
Self: 'async_trait,
fn run_with_lazy_pipette<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn PetriVm>>> + Send + 'async_trait>>where
Self: 'async_trait,
Run the VM, configuring pipette to automatically start, but do not wait for it to connect. This is useful for tests where the first boot attempt is expected to not succeed, but pipette functionality is still desired.
Sourcefn run<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn PetriVm>, PipetteClient)>> + Send + 'async_trait>>where
Self: 'async_trait,
fn run<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn PetriVm>, PipetteClient)>> + Send + 'async_trait>>where
Self: 'async_trait,
Run the VM, launching pipette and returning a client to it.
Sourcefn with_secure_boot(self: Box<Self>) -> Box<dyn PetriVmConfig>
fn with_secure_boot(self: Box<Self>) -> Box<dyn PetriVmConfig>
Set the VM to enable secure boot and inject the templates per OS flavor.
Sourcefn with_windows_secure_boot_template(self: Box<Self>) -> Box<dyn PetriVmConfig>
fn with_windows_secure_boot_template(self: Box<Self>) -> Box<dyn PetriVmConfig>
Inject Windows secure boot templates into the VM’s UEFI.
Sourcefn with_uefi_ca_secure_boot_template(self: Box<Self>) -> Box<dyn PetriVmConfig>
fn with_uefi_ca_secure_boot_template(self: Box<Self>) -> Box<dyn PetriVmConfig>
Inject UEFI CA secure boot templates into the VM’s UEFI.
Sourcefn with_processor_topology(
self: Box<Self>,
topology: ProcessorTopology,
) -> Box<dyn PetriVmConfig>
fn with_processor_topology( self: Box<Self>, topology: ProcessorTopology, ) -> Box<dyn PetriVmConfig>
Set the VM to use the specified processor topology.
Sourcefn with_custom_openhcl(
self: Box<Self>,
artifact: ResolvedArtifact,
) -> Box<dyn PetriVmConfig>
fn with_custom_openhcl( self: Box<Self>, artifact: ResolvedArtifact, ) -> Box<dyn PetriVmConfig>
Sets a custom OpenHCL IGVM file to use.
Sourcefn with_openhcl_command_line(
self: Box<Self>,
command_line: &str,
) -> Box<dyn PetriVmConfig>
fn with_openhcl_command_line( self: Box<Self>, command_line: &str, ) -> Box<dyn PetriVmConfig>
Sets the command line for the paravisor.
Sourcefn with_agent_file(
self: Box<Self>,
name: &str,
artifact: ResolvedArtifact,
) -> Box<dyn PetriVmConfig>
fn with_agent_file( self: Box<Self>, name: &str, artifact: ResolvedArtifact, ) -> Box<dyn PetriVmConfig>
Adds a file to the VM’s pipette agent image.
Sourcefn with_openhcl_agent_file(
self: Box<Self>,
name: &str,
artifact: ResolvedArtifact,
) -> Box<dyn PetriVmConfig>
fn with_openhcl_agent_file( self: Box<Self>, name: &str, artifact: ResolvedArtifact, ) -> Box<dyn PetriVmConfig>
Adds a file to the paravisor’s pipette agent image.
Sourcefn with_uefi_frontpage(self: Box<Self>, enable: bool) -> Box<dyn PetriVmConfig>
fn with_uefi_frontpage(self: Box<Self>, enable: bool) -> Box<dyn PetriVmConfig>
Sets whether UEFI frontpage is enabled.
Sourcefn with_vmbus_redirect(self: Box<Self>, enable: bool) -> Box<dyn PetriVmConfig>
fn with_vmbus_redirect(self: Box<Self>, enable: bool) -> Box<dyn PetriVmConfig>
Run the VM with Enable VMBus relay enabled