diff src/main.rs @ 13:56e9763abeef

define start cmd
author AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
date Thu, 29 Oct 2020 17:12:09 +0900
parents 0df4d067badb
children 5477c26e6984
line wrap: on
line diff
--- a/src/main.rs	Thu Oct 29 16:15:52 2020 +0900
+++ b/src/main.rs	Thu Oct 29 17:12:09 2020 +0900
@@ -73,11 +73,13 @@
     name_or_id: String,
 }
 
+/*
 struct VM {
     id: u32,
     name: String,
     is_vm_running: bool,
 }
+*/
 
 fn main() {
     let opts: Opts = Opts::parse();
@@ -92,10 +94,13 @@
             user::set_root_id();
             command::list_command(user_name);
         }
+        SubCommand::Start(arg) => {
+            user::set_root_id();
+            command::start_command(user_name, arg.name);
+        }
         SubCommand::Define(name) => {}
         SubCommand::Shutdown(name) => {}
         SubCommand::Console(name) => {}
-
         SubCommand::Destroy(name_or_id) => {}
         _ => {}
     }