From ccf03a25db6c31cf8d8f3b54348004c1ee933f3e Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 10 Jun 2022 14:29:48 -0400 Subject: planet: Fix template for VMs Still to-do: Automatically add the installation `Ship` to the VM --- src/planet.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/planet.rs') diff --git a/src/planet.rs b/src/planet.rs index be81e7e..8775f15 100644 --- a/src/planet.rs +++ b/src/planet.rs @@ -296,6 +296,20 @@ impl Planet { Ok(()) } + + pub fn deathstar(&self) -> Result<(), Error> { + let d = match &self.domain { + Some(d) => d, + None => { + return Err(Error::Other(String::from("No domain connection found"))); + } + }; + + self.shutdown()?; + d.undefine()?; + + Ok(()) + } } #[cfg(test)] -- cgit v1.2.3