diff options
author | Cara Salter <cara@devcara.com> | 2022-06-10 14:29:48 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-06-10 14:29:48 -0400 |
commit | ccf03a25db6c31cf8d8f3b54348004c1ee933f3e (patch) | |
tree | 14a3d5abade84bc2e41eae81425b28dd9a1b6dca /src/planet.rs | |
parent | 26940cde1e363a5454ef0f06381c85afdd1c85d3 (diff) | |
download | solarlib-ccf03a25db6c31cf8d8f3b54348004c1ee933f3e.tar.gz solarlib-ccf03a25db6c31cf8d8f3b54348004c1ee933f3e.zip |
planet: Fix template for VMs
Still to-do: Automatically add the installation `Ship` to the VM
Diffstat (limited to 'src/planet.rs')
-rw-r--r-- | src/planet.rs | 14 |
1 files changed, 14 insertions, 0 deletions
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)] |