Mercurial > hg > Members > anatofuz > ie-virsh
comparison src/main.rs @ 28:1c3b6b6ee0b1
add show template
author | AnaTofuZ <anatofuz@gmail.com> |
---|---|
date | Sat, 21 Nov 2020 16:37:58 +0900 |
parents | afec42bdd5ab |
children | 91a99ff9c4c5 |
comparison
equal
deleted
inserted
replaced
27:c0f0181ee91a | 28:1c3b6b6ee0b1 |
---|---|
21 Vncdisplay(Vncdisplay), | 21 Vncdisplay(Vncdisplay), |
22 Dumpxml(Dumpxml), | 22 Dumpxml(Dumpxml), |
23 DefineGDB(DefineGDB), | 23 DefineGDB(DefineGDB), |
24 Domiflist(Domiflist), | 24 Domiflist(Domiflist), |
25 Dominfo(Dominfo), | 25 Dominfo(Dominfo), |
26 Templates(Templates), | |
26 } | 27 } |
28 | |
29 /// show templates vm | |
30 #[derive(Clap)] | |
31 struct Templates {} | |
27 | 32 |
28 /// define the domain in which the gdb port is opened from the template XML file | 33 /// define the domain in which the gdb port is opened from the template XML file |
29 #[derive(Clap)] | 34 #[derive(Clap)] |
30 struct DefineGDB { | 35 struct DefineGDB { |
31 name: String, | 36 name: String, |
173 SubCommand::Dominfo(arg) => { | 178 SubCommand::Dominfo(arg) => { |
174 user::set_root_id(); | 179 user::set_root_id(); |
175 command::dominfo(&user_name, arg.name); | 180 command::dominfo(&user_name, arg.name); |
176 } | 181 } |
177 | 182 |
183 SubCommand::Templates(_) => { | |
184 if let Err(e) = command::templates() { | |
185 println!("{}", e); | |
186 } | |
187 } | |
188 | |
178 _ => {} | 189 _ => {} |
179 } | 190 } |
180 } | 191 } |