pub trait PetriVm: Send {
// Required methods
fn wait_for_halt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<HaltReason>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_teardown<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<HaltReason>> + Send + 'async_trait>>
where Self: 'async_trait;
fn test_inspect_openhcl<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_agent<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<PipetteClient>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_vtl2_ready<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_successful_boot_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_enlightened_shutdown<'life0, 'async_trait>(
&'life0 mut self,
kind: ShutdownKind,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A running VM that tests can interact with.
Required Methods§
Sourcefn wait_for_halt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<HaltReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_halt<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<HaltReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait for the VM to halt, returning the reason for the halt.
Sourcefn wait_for_teardown<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<HaltReason>> + Send + 'async_trait>>where
Self: 'async_trait,
fn wait_for_teardown<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<HaltReason>> + Send + 'async_trait>>where
Self: 'async_trait,
Wait for the VM to halt, returning the reason for the halt, and cleanly tear down the VM.
Sourcefn test_inspect_openhcl<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn test_inspect_openhcl<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Test that we are able to inspect OpenHCL.
Sourcefn wait_for_agent<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<PipetteClient>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_agent<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<PipetteClient>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait for a connection from a pipette agent running in the guest. Useful if you’ve rebooted the vm or are otherwise expecting a fresh connection.
Sourcefn wait_for_vtl2_ready<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_vtl2_ready<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait for VTL 2 to report that it is ready to respond to commands. Will fail if the VM is not running OpenHCL.
This should only be necessary if you’re doing something manual. All Petri-provided methods will wait for VTL 2 to be ready automatically.
Sourcefn wait_for_successful_boot_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_successful_boot_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Waits for an event emitted by the firmware about its boot status, and verifies that it is the expected success value.
- Linux Direct guests do not emit a boot event, so this method immediately returns Ok.
- PCAT guests may not emit an event depending on the PCAT version, this method is best effort for them.
Sourcefn send_enlightened_shutdown<'life0, 'async_trait>(
&'life0 mut self,
kind: ShutdownKind,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_enlightened_shutdown<'life0, 'async_trait>(
&'life0 mut self,
kind: ShutdownKind,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Instruct the guest to shutdown via the Hyper-V shutdown IC.