From 30766d2a0438134a54725c89d9d6ae03afc1d782 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 10 Jul 2022 22:03:49 -0400 Subject: star: Support an optional seed_base for new planets Pass in any URL that can be appended with "/{meta,user}-data" and return valid cloud-init stuff --- src/star.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/star.rs b/src/star.rs index 28caa21..46f5bff 100644 --- a/src/star.rs +++ b/src/star.rs @@ -124,7 +124,7 @@ impl Star { /// If the installation image doesn't exist in the default libvirtd pool, this will fail with /// [`Error::MissingImage`][crate::errors::Error::MissingImage]. /// - pub fn planet(&mut self, name: String, max_mem: Memory, max_cpus: CpuCount, disk_size_mb: u64, ship: Ship) -> Result { + pub fn planet(&mut self, name: String, max_mem: Memory, max_cpus: CpuCount, disk_size_mb: u64, ship: Ship, seed_base: Option) -> Result { // Check for image on host machine if self.remote { @@ -198,7 +198,7 @@ impl Star { true, max_mem.0, max_cpus.0, - "blank".to_string() + seed_base, )?; let buf = String::from_utf8(buf).unwrap(); -- cgit v1.2.3