aboutsummaryrefslogtreecommitdiff
path: root/src/planet.rs
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-06-10 14:29:48 -0400
committerCara Salter <cara@devcara.com>2022-06-10 14:29:48 -0400
commitccf03a25db6c31cf8d8f3b54348004c1ee933f3e (patch)
tree14a3d5abade84bc2e41eae81425b28dd9a1b6dca /src/planet.rs
parent26940cde1e363a5454ef0f06381c85afdd1c85d3 (diff)
downloadsolarlib-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.rs14
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)]