in metalos/lib/systemd/src/machined_manager.rs [143:303]
fn bind_mount_machine(
&self,
name: &MachineName,
source: &FilePath,
destination: &FilePath,
read_only: bool,
mkdir: bool,
) -> zbus::Result<()>;
/// Clones the specified image under a new name. It also takes a boolean
/// argument indicating whether the resulting image shall be read-only or
/// not.
fn clone_image(
&self,
name: &ImageName,
new_name: &ImageName,
read_only: bool,
) -> zbus::Result<()>;
/// Copy files or directories from a container into the host. It takes a
/// container name, a source directory in the container and a destination
/// directory on the host as arguments.
fn copy_from_machine(
&self,
name: &MachineName,
source: &FilePath,
destination: &FilePath,
) -> zbus::Result<()>;
/// Inverse of [copy_from_machine](ManagerProxy::copy_from_machine).
fn copy_to_machine(
&self,
name: &MachineName,
source: &FilePath,
destination: &FilePath,
) -> zbus::Result<()>;
/// Get the image object path of the image with the specified name.
fn get_image(&self, name: &ImageName) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
/// Get the machine object for the machine with the specified name.
#[dbus_proxy(object = "Machine")]
fn get_machine(&self, name: &MachineName);
/// Retrieve the IP addresses of a container. This method returns an array
/// of pairs consisting of an address family specifier (AF_INET or AF_INET6)
/// and a byte array containing the addresses. This is only supported for
/// containers that make use of network namespacing.
fn get_machine_addresses(&self, name: &MachineName) -> zbus::Result<Vec<(i32, Address)>>;
/// Similarly, [get_machine_by_pid](ManagerProxy::get_machine_by_pid) gets
/// the machine object the specified PID belongs to if there is any.
#[dbus_proxy(object = "Machine")]
fn get_machine_by_pid(&self, pid: u32);
/// Retrieve the OS release information of a container. This method returns
/// an array of key value pairs read from the os-release(5) file in the
/// container and is useful to identify the operating system used in a
/// container.
fn get_machine_osrelease(
&self,
name: &MachineName,
) -> zbus::Result<std::collections::HashMap<String, String>>;
/// Send a UNIX signal to (some of) the machine's processes.
fn kill_machine(&self, name: &MachineName, who: &KillWho, signal: Signal) -> zbus::Result<()>;
/// Get an array of all currently known images.
fn list_images(&self) -> zbus::Result<Vec<ListedImage>>;
/// Get an array of all currently registered machines.
fn list_machines(&self) -> zbus::Result<Vec<ListedMachine>>;
/// Change the read-only flag of an image.
fn mark_image_read_only(&self, name: &ImageName, read_only: bool) -> zbus::Result<()>;
/// Allocates a pseudo TTY in the container and ensures that a getty login
/// prompt of the container is running on the other end. It returns the
/// file descriptor of the PTY and the PTY path. This is useful for
/// acquiring a pty with a login prompt from the container.
fn open_machine_login(
&self,
name: &MachineName,
) -> zbus::Result<(zbus::zvariant::Fd, OwnedFilePath)>;
/// Allocates a pseudo TTY in the container and returns a file descriptor
/// and its path. This is equivalent to transitioning into the container and
/// invoking posix_openpt(3).
fn open_machine_pty(
&self,
name: &MachineName,
) -> zbus::Result<(zbus::zvariant::Fd, OwnedFilePath)>;
/// Return a file descriptor of the machine's root directory. See
/// [root_directory](MachineProxy::root_directory).
fn open_machine_root_directory(&self, name: &MachineName) -> zbus::Result<zbus::zvariant::Fd>;
/// Allocates a pseudo TTY in the container, as the specified user, and
/// invokes the executable at the specified path with a list of arguments
/// (starting from argv\[0\]) and an environment block. It then returns the
/// file descriptor of the PTY and the PTY path.
fn open_machine_shell(
&self,
name: &MachineName,
user: &str,
path: &FilePath,
args: &[&str],
environment: &Environment,
) -> zbus::Result<(zbus::zvariant::Fd, OwnedFilePath)>;
/// Delete a registered image.
fn remove_image(&self, name: &ImageName) -> zbus::Result<()>;
/// Change the name of an image.
fn rename_image(&self, name: &ImageName, new_name: &ImageName) -> zbus::Result<()>;
/// Set a per-image quota limit.
fn set_image_limit(&self, name: &ImageName, size: Size) -> zbus::Result<()>;
/// Set an overall quota limit on the pool of images.
fn set_pool_limit(&self, size: Size) -> zbus::Result<()>;
/// Terminate a virtual machine, killing its processes. It takes a machine
/// name as its only argument.
fn terminate_machine(&self, name: &MachineName) -> zbus::Result<()>;
/// Sent whenever a machine is registered.
#[dbus_proxy(signal)]
fn machine_new(
&self,
id: MachineName,
machine: TypedObjectPath<MachineProxy<'_>>,
) -> zbus::Result<()>;
/// Sent whenever a machine is removed.
#[dbus_proxy(signal)]
fn machine_removed(
&self,
id: MachineName,
machine: TypedObjectPath<MachineProxy<'_>>,
) -> zbus::Result<()>;
/// Size limit of the image pool in bytes.
#[dbus_proxy(property)]
fn pool_limit(&self) -> zbus::Result<Size>;
/// File system path where images are written to.
#[dbus_proxy(property)]
fn pool_path(&self) -> zbus::Result<OwnedFilePath>;
/// Current usage size of the image pool in bytes.
#[dbus_proxy(property)]
fn pool_usage(&self) -> zbus::Result<Size>;
}
#[dbus_proxy(
interface = "org.freedesktop.machine1.Machine",
default_service = "org.freedesktop.machine1",
gen_blocking = false
)]
trait Image {