Skip to main content

MachinePlan

Struct MachinePlan 

Source
pub struct MachinePlan {
Show 35 fields pub shape: MachineShape, pub addresses: IndexMap<String, Ipv4Addr>, pub more_addresses: IndexMap<String, Vec<Ipv4Addr>>, pub addresses6: IndexMap<String, Ipv6Addr>, pub names: Vec<String>, pub routes: Vec<Route>, pub routes6: Vec<Route6>, pub default_gateway: Option<Ipv4Addr>, pub is_gateway: bool, pub offline: bool, pub ports: Vec<PublishedPort>, pub volumes: Vec<Volume>, pub files: Vec<MachineFile>, pub disks: Vec<DataDisk>, pub settings: Settings, pub inputs: Vec<String>, pub secrets: Vec<SecretFile>, pub size: Size, pub arch: Arch, pub rate_limit: Option<String>, pub image: Option<Image>, pub vm_image: Option<VmImage>, pub boot: Option<Boot>, pub depends_on: Vec<String>, pub lifecycle: MachineLifecycle, pub os: Option<String>, pub winrm: Option<Winrm>, pub winssh: bool, pub tpm: Option<Tpm>, pub external: Option<External>, pub host_vars: IndexMap<String, Value>, pub outside: IndexMap<String, OutsideAddress>, pub process: Process, pub hardware: Hardware, pub recipe: Option<Recipe>,
}
Expand description

One machine of the environment.

Fields§

§shape: MachineShape

How the target produces it.

§addresses: IndexMap<String, Ipv4Addr>

Its address on each of its networks, in its order (the first is its primary network).

§more_addresses: IndexMap<String, Vec<Ipv4Addr>>

Its addresses after the primary one on each network where it has several (lan: [10, 11]), in its networks’ order.

§addresses6: IndexMap<String, Ipv6Addr>

Its IPv6 address on each IPv6 network that derives them (not on addresses: auto ones).

§names: Vec<String>

Its names: its own, then its aliases, then (with dns.private) each of them under the private zone’s domain.

§routes: Vec<Route>

Routes to the networks it isn’t on.

§routes6: Vec<Route6>

IPv6 routes to the IPv6 blocks it isn’t on, through the router.

§default_gateway: Option<Ipv4Addr>

Its default route through a gateway machine, if one routes one of its networks.

§is_gateway: bool

Whether it is the gateway of one of its networks (it forwards).

§offline: bool

Whether nothing it is on reaches the internet and no gateway decides for it.

§ports: Vec<PublishedPort>

The ports it publishes on the host.

§volumes: Vec<Volume>

Its volumes, in spec order.

§files: Vec<MachineFile>

The files placed on it, in spec order.

§disks: Vec<DataDisk>

Its data disks, in spec order.

§settings: Settings

The settings a container gets from its runtime and a VM from its set-up.

§inputs: Vec<String>

The inputs it reads (environment variables given at run time).

§secrets: Vec<SecretFile>

The secrets it gets as files, delivered at run time (never their values).

§size: Size

Its size.

§arch: Arch

Its CPU architecture.

§rate_limit: Option<String>

The bandwidth cap on each of its links (rate_limit, a tc rate such as 10mbit).

§image: Option<Image>

What it runs from, on this target.

§vm_image: Option<VmImage>

The VM’s own image per target (vm.image: a box URL, a Proxmox or cloud image), when the spec gives one.

§boot: Option<Boot>

How the VM boots, when not the way its image does (vm.boot).

§depends_on: Vec<String>

The machines it waits for, as the spec lists them.

§lifecycle: MachineLifecycle

The set-up steps of a VM, in order (empty for the other shapes).

§os: Option<String>

The OS of its VM implementation (debian-12, windows-server-2022…), whatever the target: an existing host keeps the OS its vm: names.

§winrm: Option<Winrm>

How its Windows VM answers WinRM (None off Windows, and on a box reached over OpenSSH).

§winssh: bool

Whether its Windows VM’s box is reached over OpenSSH instead (vm.image.winssh).

§tpm: Option<Tpm>

Its virtual TPM 2.0, when it gets one (vm.tpm, or Windows 11’s own).

§external: Option<External>

Its SSH endpoint as an existing host (external:), when the spec gives one.

§host_vars: IndexMap<String, Value>

Its variables from the provision: steps’ host_vars, merged in step order.

§outside: IndexMap<String, OutsideAddress>

Its addresses on the outside networks it joins, after its own networks.

§process: Process

Its own command, working directory, before steps and healthcheck.

§hardware: Hardware

The GPUs, host devices and nested virtualization it asks for.

§recipe: Option<Recipe>

Its configuration resolved (an app’s steps), which its container’s build or its VM’s set-up renders: the one source every CM renderer reads.

Implementations§

Source§

impl MachinePlan

Source

pub fn is_windows(&self) -> bool

Whether it runs Windows.

Trait Implementations§

Source§

impl Clone for MachinePlan

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MachinePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for MachinePlan

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MachinePlan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.