Mercurial > hg > Members > anatofuz > ie-virsh
changeset 38:6f1b90844b7f
s/common_cmd/common/
author | AnaTofuZ <anatofuz@gmail.com> |
---|---|
date | Sun, 22 Nov 2020 11:21:18 +0900 |
parents | 0f966575a56a |
children | f667f3a4bbee |
files | src/command.rs src/main.rs |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/command.rs Sun Nov 22 11:20:34 2020 +0900 +++ b/src/command.rs Sun Nov 22 11:21:18 2020 +0900 @@ -35,7 +35,7 @@ virsh::command_require_vm_name(get_vm_name(user_name, vm_name), "start"); } -pub fn common_cmd(user_name: &str, vm_name: &str, command: &str) { +pub fn common(user_name: &str, vm_name: &str, command: &str) { exec_cmd_from_name_or_id(user_name, vm_name, command) }
--- a/src/main.rs Sun Nov 22 11:20:34 2020 +0900 +++ b/src/main.rs Sun Nov 22 11:21:18 2020 +0900 @@ -137,47 +137,47 @@ SubCommand::Shutdown(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "shutdown"); + command::common(&user_name, &arg.name, "shutdown"); } SubCommand::Console(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "console"); + command::common(&user_name, &arg.name, "console"); } SubCommand::Destroy(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "destroy"); + command::common(&user_name, &arg.name, "destroy"); } SubCommand::Vncdisplay(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "vncdisplay"); + command::common(&user_name, &arg.name, "vncdisplay"); } SubCommand::Ttyconsole(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "ttyconsole"); + command::common(&user_name, &arg.name, "ttyconsole"); } SubCommand::Dumpxml(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "dumpxml"); + command::common(&user_name, &arg.name, "dumpxml"); } SubCommand::Undefine(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "undefine"); + command::common(&user_name, &arg.name, "undefine"); } SubCommand::Domiflist(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "domiflist"); + command::common(&user_name, &arg.name, "domiflist"); } SubCommand::Dominfo(arg) => { user::set_root_id(); - command::common_cmd(&user_name, &arg.name, "dominfo"); + command::common(&user_name, &arg.name, "dominfo"); } SubCommand::Templates(_) => {