⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

CloudInitRunner

Struct CloudInitRunner 

Source
pub struct CloudInitRunner { /* private fields */ }
Expand description

Cloud-Init runner: orchestrates the full initialization sequence.

Implementations§

Source§

impl CloudInitRunner

Source

pub fn new() -> Self

Create a new cloud-init runner.

Source

pub fn with_metadata(metadata: MetadataService) -> Self

Create with custom metadata service.

Source

pub fn fetch_metadata(&mut self) -> Result<(), CloudInitError>

Fetch metadata from the metadata service.

Source

pub fn fetch_userdata(&mut self, raw_data: &str) -> Result<(), CloudInitError>

Fetch and parse user data.

Source

pub fn apply_hostname(&mut self) -> Result<(), CloudInitError>

Apply the configured hostname.

Source

pub fn create_users(&mut self) -> Result<(), CloudInitError>

Create user accounts.

Source

pub fn install_ssh_keys(&mut self) -> Result<(), CloudInitError>

Install SSH keys.

Source

pub fn run_commands(&mut self) -> Result<(), CloudInitError>

Run commands.

Source

pub fn write_files(&mut self) -> Result<(), CloudInitError>

Write files.

Source

pub fn install_packages(&mut self) -> Result<(), CloudInitError>

Install packages.

Source

pub fn execute(&mut self, raw_userdata: &str) -> Result<(), CloudInitError>

Execute the full cloud-init sequence.

Source

pub fn log(&self) -> &[LogEntry]

Get the execution log.

Source

pub fn is_completed(&self) -> bool

Check if cloud-init has completed.

Source

pub fn applied_hostname(&self) -> Option<&str>

Get the applied hostname.

Source

pub fn created_users(&self) -> &[String]

Get created users.

Source

pub fn written_files(&self) -> &[String]

Get written files.

Source

pub fn executed_commands(&self) -> &[String]

Get executed commands.

Source

pub fn installed_packages(&self) -> &[String]

Get installed packages.

Trait Implementations§

Source§

impl Debug for CloudInitRunner

Source§

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

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

impl Default for CloudInitRunner

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for CloudInitRunner

§

impl RefUnwindSafe for CloudInitRunner

§

impl Send for CloudInitRunner

§

impl Sync for CloudInitRunner

§

impl Unpin for CloudInitRunner

§

impl UnwindSafe for CloudInitRunner

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.