From eec3c3b7736f7ec54b25712761d00caaa3f78619 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 10 Jun 2022 09:31:46 -0400 Subject: star: Add struct for new Planet HTTP requests --- src/star.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/star.rs') diff --git a/src/star.rs b/src/star.rs index 53c9124..a9f3bfa 100644 --- a/src/star.rs +++ b/src/star.rs @@ -44,6 +44,16 @@ pub struct Star { con: Option, } +/// The proper JSON request to make to a solard server to introduce a new planet +#[derive(Debug, Serialize, Deserialize)] +pub struct NewPlanet { + pub name: String, + pub max_mem: Memory, + pub max_cpus: CpuCount, + pub disk_size_mb: u64, + pub ship: Ship, +} + impl Star { /// Creates a new Planet based on a libvirtd connect URL /// -- cgit v1.2.3