annotate src/main.rs @ 24:e8ba0f63c227

remove static variable
author AnaTofuZ <anatofuz@gmail.com>
date Tue, 03 Nov 2020 18:37:04 +0900
parents 78f246ce5235
children da27437a94b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
017344e337e8 use split_whitespace
AnaTofuZ <anatofuz@gmail.com>
parents: 7
diff changeset
1 use clap::Clap;
12
0df4d067badb move each crates
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
2 use ie_virsh::{command, user};
1
dba3414e8f7e get uid, gid, login_user
AnaTofuZ <anatofuz@gmail.com>
parents: 0
diff changeset
3
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
4 #[derive(Clap)]
7
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
5 #[clap(version = "1.0", author = "AnaTofuZ <anatofuz@cr.ie.u-ryukyu.ac.jp>")]
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
6 struct Opts {
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
7 #[clap(subcommand)]
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
8 subcmd: SubCommand,
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
9 }
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
10
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
11 #[derive(Clap)]
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
12 enum SubCommand {
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
13 List(List),
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
14 Undefine(Undefine),
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
15 Define(Define),
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
16 Shutdown(Shutdown),
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
17 Destroy(Destroy),
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
18 Console(Console),
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
19 Start(Start),
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
20 Ttyconsole(TTyconsole),
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
21 VNCDisplay(VNCDisplay),
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
22 Dumpxml(Dumpxml),
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
23 DefineGDB(DefineGDB),
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
24 Domiflist(Domiflist),
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
25 Dominfo(Dominfo),
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
26 }
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
27
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
28 /// define the domain in which the gdb port is opened from the template XML file
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
29 #[derive(Clap)]
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
30 struct DefineGDB {
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
31 name: String,
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
32 }
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
33
7
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
34 /// define (but don't start) a domain from an template XML file
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
35 #[derive(Clap)]
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
36 struct Define {
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
37 name: String,
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
38 }
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
39
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
40 /// domain information in XML
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
41 #[derive(Clap)]
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
42 struct Dumpxml {
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
43 name: String,
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
44 }
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
45
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
46 /// vncdisplay
11
AnaTofuZ <anatofuz@gmail.com>
parents: 10
diff changeset
47 #[derive(Clap)]
AnaTofuZ <anatofuz@gmail.com>
parents: 10
diff changeset
48 struct VNCDisplay {
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
49 name: String,
11
AnaTofuZ <anatofuz@gmail.com>
parents: 10
diff changeset
50 }
AnaTofuZ <anatofuz@gmail.com>
parents: 10
diff changeset
51
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
52 /// undefine a domain
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
53 #[derive(Clap)]
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
54 struct Undefine {
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
55 name: String,
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
56 }
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
57
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
58 /// start a (previously defined) inactive domain
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
59 #[derive(Clap)]
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
60 struct Start {
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
61 name: String,
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
62 }
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
63
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
64 /// tty console
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
65 #[derive(Clap)]
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
66 struct TTyconsole {
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
67 name: String,
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
68 }
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
69
7
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
70 /// gracefully shutdown a domain
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
71 #[derive(Clap)]
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
72 struct Shutdown {
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
73 name: String,
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
74 }
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
75
7
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
76 /// list domains
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
77 #[derive(Clap)]
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
78 struct List {}
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
79
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
80 /// destroy (stop) a domain
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
81 #[derive(Clap)]
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
82 struct Destroy {
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
83 name: String,
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
84 }
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
85
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
86 /// connect to the guest console
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
87 #[derive(Clap)]
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
88 struct Console {
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
89 name: String,
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
90 }
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
91
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
92 /// list all domain virtual interfaces
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
93 #[derive(Clap)]
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
94 struct Domiflist {
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
95 name: String,
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
96 }
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
97
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
98 /// domain information
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
99 #[derive(Clap)]
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
100 struct Dominfo {
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
101 name: String,
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
102 }
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
103
0
3ef828bc5261 cargo new
AnaTofuZ <anatofuz@gmail.com>
parents:
diff changeset
104 fn main() {
7
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
105 let opts: Opts = Opts::parse();
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
106
12
0df4d067badb move each crates
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
107 let uid = user::getuid();
0df4d067badb move each crates
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
108 let gid = user::getgid();
0df4d067badb move each crates
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
109 let user_name = user::getlogin(uid);
3
5bdb02e05c86 show virsh list --all
AnaTofuZ <anatofuz@gmail.com>
parents: 2
diff changeset
110 println!("uid: {} gid: {} name: {}", uid, gid, user_name);
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
111
7
07b763b84401 rebarse use macro
AnaTofuZ <anatofuz@gmail.com>
parents: 6
diff changeset
112 match opts.subcmd {
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
113 SubCommand::List(_) => {
12
0df4d067badb move each crates
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
114 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
115 command::list(&user_name);
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
116 }
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
117
13
56e9763abeef define start cmd
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 12
diff changeset
118 SubCommand::Start(arg) => {
56e9763abeef define start cmd
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 12
diff changeset
119 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
120 command::start(&user_name, arg.name);
13
56e9763abeef define start cmd
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 12
diff changeset
121 }
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
122
20
da4858f4658d impl define cmd
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
123 SubCommand::Define(arg) => {
da4858f4658d impl define cmd
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
124 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
125 let user = user::User{
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
126 Uid: uid,
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
127 Gid: gid,
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
128 Name: user_name.to_string()
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
129 };
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
130 command::define(&user, arg.name);
20
da4858f4658d impl define cmd
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
131 }
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
132
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
133 SubCommand::Shutdown(arg) => {
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
134 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
135 command::shutdown(&user_name, arg.name);
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
136 }
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
137
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
138 SubCommand::Console(arg) => {
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
139 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
140 command::console(&user_name, arg.name);
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
141 }
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
142
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
143 SubCommand::Destroy(arg) => {
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
144 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
145 command::destroy(&user_name, arg.name);
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
146 }
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
147
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
148 SubCommand::VNCDisplay(arg) => {
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
149 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
150 command::vncdisplay(&user_name, arg.name);
17
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
151 }
5477c26e6984 impl sub commands that use uid
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
152
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
153 SubCommand::Ttyconsole(arg) => {
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
154 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
155 command::ttyconsole(&user_name, arg.name);
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
156 }
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
157
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
158 SubCommand::Dumpxml(arg) => {
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
159 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
160 command::dumpxml(&user_name, arg.name);
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
161 }
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
162
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
163 SubCommand::Undefine(arg) => {
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
164 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
165 command::undefine(&user_name, arg.name);
18
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
166 }
9b24d6767a2f define other command
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
167
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
168 SubCommand::Domiflist(arg) => {
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
169 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
170 command::domiflist(&user_name, arg.name);
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
171 }
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
172
22
78f246ce5235 fix cmd name
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
173 SubCommand::Dominfo(arg) => {
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
174 user::set_root_id();
24
e8ba0f63c227 remove static variable
AnaTofuZ <anatofuz@gmail.com>
parents: 22
diff changeset
175 command::dominfo(&user_name, arg.name);
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
176 }
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
177
10
AnaTofuZ <anatofuz@gmail.com>
parents: 9
diff changeset
178 _ => {}
5
ef1358b993e1 mmm.....
AnaTofuZ <anatofuz@gmail.com>
parents: 4
diff changeset
179 }
19
d37203a877d9 add xml parse/writer
AnaTofuZ <k198584@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
180 }