mu 5.7.8 → 5.7.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/lib/mu.rb +1 -1
  2. data/lib/mu/command.rb +18 -2
  3. data/lib/mu/command/cmd_musl.rb +165 -0
  4. data/lib/mu/command/cmd_runscale.rb +12 -8
  5. data/lib/mu/command/help.rb +1 -0
  6. data/lib/mu/har.rb +449 -0
  7. data/lib/mu/libxml.rb +21 -0
  8. data/lib/mu/maker.rb +288 -0
  9. data/lib/mu/xmlizable.rb +559 -0
  10. metadata +78 -267
  11. data/rdoc/Gemfile.html +0 -194
  12. data/rdoc/LICENSE_txt.html +0 -201
  13. data/rdoc/Mu.html +0 -478
  14. data/rdoc/Mu/Client.html +0 -461
  15. data/rdoc/Mu/Command.html +0 -338
  16. data/rdoc/Mu/Command/API.html +0 -844
  17. data/rdoc/Mu/Command/Cmd_appid.html +0 -1341
  18. data/rdoc/Mu/Command/Cmd_cli.html +0 -800
  19. data/rdoc/Mu/Command/Cmd_ddt.html +0 -1612
  20. data/rdoc/Mu/Command/Cmd_homepage.html +0 -762
  21. data/rdoc/Mu/Command/Cmd_muapi.html +0 -1363
  22. data/rdoc/Mu/Command/Cmd_netconfig.html +0 -1077
  23. data/rdoc/Mu/Command/Cmd_runscale.html +0 -1441
  24. data/rdoc/Mu/Command/Cmd_runscenario.html +0 -787
  25. data/rdoc/Mu/Command/Cmd_runverify.html +0 -893
  26. data/rdoc/Mu/Command/Cmd_scale.html +0 -1323
  27. data/rdoc/Mu/Command/Cmd_system.html +0 -677
  28. data/rdoc/Mu/Command/Curl.html +0 -751
  29. data/rdoc/Mu/Command/Help.html +0 -305
  30. data/rdoc/Mu/Curl.html +0 -243
  31. data/rdoc/Mu/Curl/Error.html +0 -304
  32. data/rdoc/Mu/Curl/Error/Authorize.html +0 -355
  33. data/rdoc/Mu/Curl/Error/Connect.html +0 -286
  34. data/rdoc/Mu/Curl/Error/DNS.html +0 -236
  35. data/rdoc/Mu/Curl/Error/Region.html +0 -307
  36. data/rdoc/Mu/Curl/Error/Status.html +0 -286
  37. data/rdoc/Mu/Curl/Error/Timeout.html +0 -286
  38. data/rdoc/Mu/Curl/Verify.html +0 -472
  39. data/rdoc/Mu/Curl/Verify/Request.html +0 -424
  40. data/rdoc/Mu/Curl/Verify/Response.html +0 -372
  41. data/rdoc/Mu/Curl/Verify/Result.html +0 -373
  42. data/rdoc/Mu/Ddt.html +0 -1347
  43. data/rdoc/Mu/Helper.html +0 -517
  44. data/rdoc/Mu/Homepage.html +0 -719
  45. data/rdoc/Mu/HttpHelper.html +0 -890
  46. data/rdoc/Mu/Muapi.html +0 -1226
  47. data/rdoc/Mu/Netconfig.html +0 -1178
  48. data/rdoc/Mu/Scale.html +0 -1359
  49. data/rdoc/Mu/System.html +0 -504
  50. data/rdoc/Object.html +0 -285
  51. data/rdoc/README_rdoc.html +0 -892
  52. data/rdoc/Rakefile.html +0 -257
  53. data/rdoc/TCTestMu.html +0 -2583
  54. data/rdoc/Test.html +0 -235
  55. data/rdoc/Test/Unit.html +0 -235
  56. data/rdoc/Test/Unit/TestCase.html +0 -236
  57. data/rdoc/Test/helper_rb.html +0 -62
  58. data/rdoc/Test/tc_test_mu_rb.html +0 -60
  59. data/rdoc/VERSION.html +0 -179
  60. data/rdoc/bin/mu.html +0 -54
  61. data/rdoc/classes/Mu.html +0 -132
  62. data/rdoc/classes/Mu/Client.html +0 -214
  63. data/rdoc/classes/Mu/Command.html +0 -129
  64. data/rdoc/classes/Mu/Command/API.html +0 -362
  65. data/rdoc/classes/Mu/Command/Cmd_appid.html +0 -238
  66. data/rdoc/classes/Mu/Command/Cmd_cli.html +0 -273
  67. data/rdoc/classes/Mu/Command/Cmd_ddt.html +0 -639
  68. data/rdoc/classes/Mu/Command/Cmd_homepage.html +0 -276
  69. data/rdoc/classes/Mu/Command/Cmd_muapi.html +0 -527
  70. data/rdoc/classes/Mu/Command/Cmd_netconfig.html +0 -399
  71. data/rdoc/classes/Mu/Command/Cmd_runscale.html +0 -220
  72. data/rdoc/classes/Mu/Command/Cmd_runscenario.html +0 -197
  73. data/rdoc/classes/Mu/Command/Cmd_runverify.html +0 -196
  74. data/rdoc/classes/Mu/Command/Cmd_scale.html +0 -511
  75. data/rdoc/classes/Mu/Command/Cmd_system.html +0 -236
  76. data/rdoc/classes/Mu/Command/Curl.html +0 -182
  77. data/rdoc/classes/Mu/Command/Help.html +0 -137
  78. data/rdoc/classes/Mu/Curl.html +0 -116
  79. data/rdoc/classes/Mu/Curl/Error.html +0 -148
  80. data/rdoc/classes/Mu/Curl/Error/Authorize.html +0 -165
  81. data/rdoc/classes/Mu/Curl/Error/Connect.html +0 -139
  82. data/rdoc/classes/Mu/Curl/Error/DNS.html +0 -113
  83. data/rdoc/classes/Mu/Curl/Error/Region.html +0 -150
  84. data/rdoc/classes/Mu/Curl/Error/Status.html +0 -139
  85. data/rdoc/classes/Mu/Curl/Error/Timeout.html +0 -139
  86. data/rdoc/classes/Mu/Curl/Verify.html +0 -207
  87. data/rdoc/classes/Mu/Curl/Verify/Request.html +0 -187
  88. data/rdoc/classes/Mu/Curl/Verify/Response.html +0 -172
  89. data/rdoc/classes/Mu/Curl/Verify/Result.html +0 -172
  90. data/rdoc/classes/Mu/Ddt.html +0 -610
  91. data/rdoc/classes/Mu/Helper.html +0 -308
  92. data/rdoc/classes/Mu/Homepage.html +0 -306
  93. data/rdoc/classes/Mu/HttpHelper.html +0 -393
  94. data/rdoc/classes/Mu/Muapi.html +0 -549
  95. data/rdoc/classes/Mu/Netconfig.html +0 -478
  96. data/rdoc/classes/Mu/Scale.html +0 -580
  97. data/rdoc/classes/Mu/System.html +0 -232
  98. data/rdoc/classes/Object.html +0 -139
  99. data/rdoc/classes/TCTestMu.html +0 -948
  100. data/rdoc/classes/Test.html +0 -107
  101. data/rdoc/classes/Test/Unit.html +0 -107
  102. data/rdoc/classes/Test/Unit/TestCase.html +0 -113
  103. data/rdoc/created.rid +0 -36
  104. data/rdoc/files/lib/mu/api/ddt_rb.html +0 -101
  105. data/rdoc/files/lib/mu/api/homepage_rb.html +0 -101
  106. data/rdoc/files/lib/mu/api/muapi_rb.html +0 -101
  107. data/rdoc/files/lib/mu/api/netconfig_rb.html +0 -101
  108. data/rdoc/files/lib/mu/api/scale_rb.html +0 -101
  109. data/rdoc/files/lib/mu/api/system_rb.html +0 -101
  110. data/rdoc/files/lib/mu/client_rb.html +0 -101
  111. data/rdoc/files/lib/mu/command/api_rb.html +0 -101
  112. data/rdoc/files/lib/mu/command/cmd_appid_rb.html +0 -119
  113. data/rdoc/files/lib/mu/command/cmd_cli_rb.html +0 -108
  114. data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +0 -116
  115. data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +0 -115
  116. data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +0 -115
  117. data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +0 -116
  118. data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +0 -119
  119. data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +0 -115
  120. data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +0 -118
  121. data/rdoc/files/lib/mu/command/cmd_scale_rb.html +0 -115
  122. data/rdoc/files/lib/mu/command/cmd_system_rb.html +0 -116
  123. data/rdoc/files/lib/mu/command/curl_rb.html +0 -101
  124. data/rdoc/files/lib/mu/command/help_rb.html +0 -101
  125. data/rdoc/files/lib/mu/command_rb.html +0 -107
  126. data/rdoc/files/lib/mu/curl/error_rb.html +0 -101
  127. data/rdoc/files/lib/mu/curl/verify_rb.html +0 -101
  128. data/rdoc/files/lib/mu/helper_rb.html +0 -101
  129. data/rdoc/files/lib/mu/http_helper_rb.html +0 -101
  130. data/rdoc/files/lib/mu_rb.html +0 -121
  131. data/rdoc/files/test/helper_rb.html +0 -112
  132. data/rdoc/files/test/tc_test_mu_rb.html +0 -111
  133. data/rdoc/fr_class_index.html +0 -34
  134. data/rdoc/fr_file_index.html +0 -31
  135. data/rdoc/fr_method_index.html +0 -112
  136. data/rdoc/images/brick.png +0 -0
  137. data/rdoc/images/brick_link.png +0 -0
  138. data/rdoc/images/bug.png +0 -0
  139. data/rdoc/images/bullet_black.png +0 -0
  140. data/rdoc/images/bullet_toggle_minus.png +0 -0
  141. data/rdoc/images/bullet_toggle_plus.png +0 -0
  142. data/rdoc/images/date.png +0 -0
  143. data/rdoc/images/find.png +0 -0
  144. data/rdoc/images/loadingAnimation.gif +0 -0
  145. data/rdoc/images/macFFBgHack.png +0 -0
  146. data/rdoc/images/package.png +0 -0
  147. data/rdoc/images/page_green.png +0 -0
  148. data/rdoc/images/page_white_text.png +0 -0
  149. data/rdoc/images/page_white_width.png +0 -0
  150. data/rdoc/images/plugin.png +0 -0
  151. data/rdoc/images/ruby.png +0 -0
  152. data/rdoc/images/tag_green.png +0 -0
  153. data/rdoc/images/wrench.png +0 -0
  154. data/rdoc/images/wrench_orange.png +0 -0
  155. data/rdoc/images/zoom.png +0 -0
  156. data/rdoc/index.html +0 -884
  157. data/rdoc/js/darkfish.js +0 -116
  158. data/rdoc/js/jquery.js +0 -32
  159. data/rdoc/js/quicksearch.js +0 -114
  160. data/rdoc/js/thickbox-compressed.js +0 -10
  161. data/rdoc/lib/mu/api/ddt_rb.html +0 -52
  162. data/rdoc/lib/mu/api/homepage_rb.html +0 -52
  163. data/rdoc/lib/mu/api/muapi_rb.html +0 -52
  164. data/rdoc/lib/mu/api/netconfig_rb.html +0 -52
  165. data/rdoc/lib/mu/api/scale_rb.html +0 -52
  166. data/rdoc/lib/mu/api/system_rb.html +0 -52
  167. data/rdoc/lib/mu/client_rb.html +0 -52
  168. data/rdoc/lib/mu/command/api_rb.html +0 -52
  169. data/rdoc/lib/mu/command/cmd_appid_rb.html +0 -62
  170. data/rdoc/lib/mu/command/cmd_cli_rb.html +0 -55
  171. data/rdoc/lib/mu/command/cmd_ddt_rb.html +0 -60
  172. data/rdoc/lib/mu/command/cmd_homepage_rb.html +0 -57
  173. data/rdoc/lib/mu/command/cmd_muapi_rb.html +0 -59
  174. data/rdoc/lib/mu/command/cmd_netconfig_rb.html +0 -58
  175. data/rdoc/lib/mu/command/cmd_runscale_rb.html +0 -62
  176. data/rdoc/lib/mu/command/cmd_runscenario_rb.html +0 -57
  177. data/rdoc/lib/mu/command/cmd_runverify_rb.html +0 -61
  178. data/rdoc/lib/mu/command/cmd_scale_rb.html +0 -58
  179. data/rdoc/lib/mu/command/cmd_system_rb.html +0 -59
  180. data/rdoc/lib/mu/command/curl_rb.html +0 -52
  181. data/rdoc/lib/mu/command/help_rb.html +0 -52
  182. data/rdoc/lib/mu/command_rb.html +0 -55
  183. data/rdoc/lib/mu/curl/error_rb.html +0 -52
  184. data/rdoc/lib/mu/curl/verify_rb.html +0 -52
  185. data/rdoc/lib/mu/helper_rb.html +0 -52
  186. data/rdoc/lib/mu/http_helper_rb.html +0 -52
  187. data/rdoc/lib/mu_rb.html +0 -80
  188. data/rdoc/rdoc-style.css +0 -208
  189. data/rdoc/rdoc.css +0 -706
  190. data/test/data/app_id_stats.csv +0 -1
  191. data/test/data/app_id_status.json +0 -156
  192. data/test/data/data_cgi.msl +0 -94
  193. data/test/data/data_cgi.xml +0 -322
  194. data/test/data/default_test.csv +0 -3
  195. data/test/data/ftp_with_channel.xml +0 -1643
  196. data/test/data/irc.xml +0 -3837
  197. data/test/data/scale.json +0 -25
  198. data/test/data/test_data_cgi_error.xml +0 -35
@@ -1,800 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: Mu::Command::Cmd_cli</title>
9
-
10
- <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../../index.html">Home</a>
29
- <a href="../../index.html#classes">Classes</a>
30
- <a href="../../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../../lib/mu/command/cmd_cli_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/mu/command/cmd_cli.rb">lib/mu/command/cmd_cli.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link"><a href="../Command.html">Mu::Command</a></p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
- <div id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
- <ul class="link-list">
71
-
72
- <li><a href="#method-i-cmd_cli_help">#cmd_cli_help</a></li>
73
-
74
- <li><a href="#method-i-cmd_help">#cmd_help</a></li>
75
-
76
- <li><a href="#method-i-cmd_history">#cmd_history</a></li>
77
-
78
- <li><a href="#method-i-cmd_ping">#cmd_ping</a></li>
79
-
80
- <li><a href="#method-i-cmd_question">#cmd_question</a></li>
81
-
82
- <li><a href="#method-i-cmd_traceroute">#cmd_traceroute</a></li>
83
-
84
- <li><a href="#method-i-help">#help</a></li>
85
-
86
- <li><a href="#method-i-parse_cli">#parse_cli</a></li>
87
-
88
- <li><a href="#method-i-run_cmd">#run_cmd</a></li>
89
-
90
- <li><a href="#method-i-setup">#setup</a></li>
91
-
92
- </ul>
93
- </div>
94
-
95
-
96
- <!-- Included Modules -->
97
-
98
- </div>
99
-
100
- <div id="project-metadata">
101
-
102
-
103
- <div id="fileindex-section" class="section project-section">
104
- <h3 class="section-header">Files</h3>
105
- <ul>
106
-
107
- <li class="file"><a href="../../Gemfile.html">Gemfile</a></li>
108
-
109
- <li class="file"><a href="../../LICENSE_txt.html">LICENSE.txt</a></li>
110
-
111
- <li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
112
-
113
- <li class="file"><a href="../../Rakefile.html">Rakefile</a></li>
114
-
115
- <li class="file"><a href="../../VERSION.html">VERSION</a></li>
116
-
117
- </ul>
118
- </div>
119
-
120
-
121
- <div id="classindex-section" class="section project-section">
122
- <h3 class="section-header">Class Index
123
- <span class="search-toggle"><img src="../../images/find.png"
124
- height="16" width="16" alt="[+]"
125
- title="show/hide quicksearch" /></span></h3>
126
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
127
- <fieldset>
128
- <legend>Quicksearch</legend>
129
- <input type="text" name="quicksearch" value=""
130
- class="quicksearch-field" />
131
- </fieldset>
132
- </form>
133
-
134
- <ul class="link-list">
135
-
136
- <li><a href="../../Mu.html">Mu</a></li>
137
-
138
- <li><a href="../../Mu/Client.html">Mu::Client</a></li>
139
-
140
- <li><a href="../../Mu/Command.html">Mu::Command</a></li>
141
-
142
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
143
-
144
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
145
-
146
- <li><a href="../../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
147
-
148
- <li><a href="../../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
149
-
150
- <li><a href="../../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
151
-
152
- <li><a href="../../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
153
-
154
- <li><a href="../../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
155
-
156
- <li><a href="../../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
157
-
158
- <li><a href="../../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
159
-
160
- <li><a href="../../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
161
-
162
- <li><a href="../../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
163
-
164
- <li><a href="../../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
165
-
166
- <li><a href="../../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
167
-
168
- <li><a href="../../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
169
-
170
- <li><a href="../../Mu/Command/Help.html">Mu::Command::Help</a></li>
171
-
172
- <li><a href="../../Mu/Curl.html">Mu::Curl</a></li>
173
-
174
- <li><a href="../../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
175
-
176
- <li><a href="../../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
177
-
178
- <li><a href="../../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
179
-
180
- <li><a href="../../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
181
-
182
- <li><a href="../../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
183
-
184
- <li><a href="../../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
185
-
186
- <li><a href="../../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
187
-
188
- <li><a href="../../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
189
-
190
- <li><a href="../../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
191
-
192
- <li><a href="../../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
193
-
194
- <li><a href="../../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
195
-
196
- <li><a href="../../Mu/Ddt.html">Mu::Ddt</a></li>
197
-
198
- <li><a href="../../Mu/Helper.html">Mu::Helper</a></li>
199
-
200
- <li><a href="../../Mu/Homepage.html">Mu::Homepage</a></li>
201
-
202
- <li><a href="../../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
203
-
204
- <li><a href="../../Mu/Muapi.html">Mu::Muapi</a></li>
205
-
206
- <li><a href="../../Mu/Netconfig.html">Mu::Netconfig</a></li>
207
-
208
- <li><a href="../../Mu/Scale.html">Mu::Scale</a></li>
209
-
210
- <li><a href="../../Mu/System.html">Mu::System</a></li>
211
-
212
- <li><a href="../../Test.html">Test</a></li>
213
-
214
- <li><a href="../../Test/Unit.html">Test::Unit</a></li>
215
-
216
- <li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
217
-
218
- <li><a href="../../Object.html">Object</a></li>
219
-
220
- <li><a href="../../TCTestMu.html">TCTestMu</a></li>
221
-
222
- </ul>
223
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
224
- </div>
225
-
226
-
227
- </div>
228
- </div>
229
-
230
- <div id="documentation">
231
- <h1 class="class">Mu::Command::Cmd_cli</h1>
232
-
233
- <div id="description">
234
-
235
- </div>
236
-
237
- <!-- Constants -->
238
-
239
-
240
- <!-- Attributes -->
241
-
242
- <div id="attribute-method-details" class="method-section section">
243
- <h3 class="section-header">Attributes</h3>
244
-
245
-
246
- <div id="host-attribute-method" class="method-detail">
247
- <a name="host"></a>
248
-
249
- <a name="host="></a>
250
-
251
- <div class="method-heading attribute-method-heading">
252
- <span class="method-name">host</span><span
253
- class="attribute-access-type">[RW]</span>
254
- </div>
255
-
256
- <div class="method-description">
257
-
258
-
259
-
260
- </div>
261
- </div>
262
-
263
- <div id="username-attribute-method" class="method-detail">
264
- <a name="username"></a>
265
-
266
- <a name="username="></a>
267
-
268
- <div class="method-heading attribute-method-heading">
269
- <span class="method-name">username</span><span
270
- class="attribute-access-type">[RW]</span>
271
- </div>
272
-
273
- <div class="method-description">
274
-
275
-
276
-
277
- </div>
278
- </div>
279
-
280
- <div id="password-attribute-method" class="method-detail">
281
- <a name="password"></a>
282
-
283
- <a name="password="></a>
284
-
285
- <div class="method-heading attribute-method-heading">
286
- <span class="method-name">password</span><span
287
- class="attribute-access-type">[RW]</span>
288
- </div>
289
-
290
- <div class="method-description">
291
-
292
-
293
-
294
- </div>
295
- </div>
296
-
297
- <div id="api-attribute-method" class="method-detail">
298
- <a name="api"></a>
299
-
300
- <a name="api="></a>
301
-
302
- <div class="method-heading attribute-method-heading">
303
- <span class="method-name">api</span><span
304
- class="attribute-access-type">[RW]</span>
305
- </div>
306
-
307
- <div class="method-description">
308
-
309
-
310
-
311
- </div>
312
- </div>
313
-
314
- </div>
315
-
316
-
317
- <!-- Methods -->
318
-
319
- <div id="public-instance-method-details" class="method-section section">
320
- <h3 class="section-header">Public Instance Methods</h3>
321
-
322
-
323
- <div id="cmd-cli-help-method" class="method-detail ">
324
- <a name="method-i-cmd_cli_help"></a>
325
-
326
- <div class="method-heading">
327
-
328
- <span class="method-name">cmd_cli_help</span><span
329
- class="method-args">(argv)</span>
330
- <span class="method-click-advice">click to toggle source</span>
331
-
332
- </div>
333
-
334
- <div class="method-description">
335
-
336
- <p>
337
- runs the cli help command
338
- </p>
339
- <pre>
340
- * argv = command-line arguments</pre>
341
-
342
-
343
-
344
- <div class="method-source-code"
345
- id="cmd-cli-help-source">
346
- <pre>
347
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 15</span>
348
- 15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_cli_help</span> <span class="ruby-identifier">argv</span>
349
- 16: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
350
- 17: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">run_cmd</span>(<span class="ruby-value str">&quot;help&quot;</span>)
351
- 18: <span class="ruby-keyword kw">end</span></pre>
352
- </div>
353
-
354
- </div>
355
-
356
-
357
-
358
-
359
- </div>
360
-
361
-
362
- <div id="cmd-help-method" class="method-detail ">
363
- <a name="method-i-cmd_help"></a>
364
-
365
- <div class="method-heading">
366
-
367
- <span class="method-name">cmd_help</span><span
368
- class="method-args">(argv)</span>
369
- <span class="method-click-advice">click to toggle source</span>
370
-
371
- </div>
372
-
373
- <div class="method-description">
374
-
375
- <p>
376
- displays command-line help
377
- </p>
378
-
379
-
380
-
381
- <div class="method-source-code"
382
- id="cmd-help-source">
383
- <pre>
384
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 9</span>
385
- 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
386
- 10: <span class="ruby-identifier">help</span>
387
- 11: <span class="ruby-keyword kw">end</span></pre>
388
- </div>
389
-
390
- </div>
391
-
392
-
393
-
394
-
395
- </div>
396
-
397
-
398
- <div id="cmd-history-method" class="method-detail ">
399
- <a name="method-i-cmd_history"></a>
400
-
401
- <div class="method-heading">
402
-
403
- <span class="method-name">cmd_history</span><span
404
- class="method-args">(argv)</span>
405
- <span class="method-click-advice">click to toggle source</span>
406
-
407
- </div>
408
-
409
- <div class="method-description">
410
-
411
- <p>
412
- displays the command line history for the current session
413
- </p>
414
- <pre>
415
- * argv = command-line arguments</pre>
416
-
417
-
418
-
419
- <div class="method-source-code"
420
- id="cmd-history-source">
421
- <pre>
422
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 29</span>
423
- 29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_history</span> <span class="ruby-identifier">argv</span>
424
- 30: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
425
- 31: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">run_cmd</span>(<span class="ruby-value str">&quot;history&quot;</span>)
426
- 32: <span class="ruby-keyword kw">end</span></pre>
427
- </div>
428
-
429
- </div>
430
-
431
-
432
-
433
-
434
- </div>
435
-
436
-
437
- <div id="cmd-ping-method" class="method-detail ">
438
- <a name="method-i-cmd_ping"></a>
439
-
440
- <div class="method-heading">
441
-
442
- <span class="method-name">cmd_ping</span><span
443
- class="method-args">(argv)</span>
444
- <span class="method-click-advice">click to toggle source</span>
445
-
446
- </div>
447
-
448
- <div class="method-description">
449
-
450
- <p>
451
- pings an ip address
452
- </p>
453
- <pre>
454
- * argv = command-line arguments, requires an ip address (-a) argument</pre>
455
-
456
-
457
-
458
- <div class="method-source-code"
459
- id="cmd-ping-source">
460
- <pre>
461
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 36</span>
462
- 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_ping</span> <span class="ruby-identifier">argv</span>
463
- 37: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
464
- 38: <span class="ruby-identifier">addr</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">&quot;address&quot;</span>]
465
- 39: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">run_cmd</span>(<span class="ruby-node">&quot;ping #{addr}&quot;</span>)
466
- 40: <span class="ruby-keyword kw">end</span></pre>
467
- </div>
468
-
469
- </div>
470
-
471
-
472
-
473
-
474
- </div>
475
-
476
-
477
- <div id="cmd-question-method" class="method-detail ">
478
- <a name="method-i-cmd_question"></a>
479
-
480
- <div class="method-heading">
481
-
482
- <span class="method-name">cmd_question</span><span
483
- class="method-args">(argv)</span>
484
- <span class="method-click-advice">click to toggle source</span>
485
-
486
- </div>
487
-
488
- <div class="method-description">
489
-
490
- <p>
491
- runs the cli command &#8217;?&#8220;
492
- </p>
493
- <pre>
494
- * argv = command-line arguments</pre>
495
-
496
-
497
-
498
- <div class="method-source-code"
499
- id="cmd-question-source">
500
- <pre>
501
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 22</span>
502
- 22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_question</span> <span class="ruby-identifier">argv</span>
503
- 23: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
504
- 24: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">run_cmd</span>(<span class="ruby-value str">&quot;?&quot;</span>)
505
- 25: <span class="ruby-keyword kw">end</span></pre>
506
- </div>
507
-
508
- </div>
509
-
510
-
511
-
512
-
513
- </div>
514
-
515
-
516
- <div id="cmd-traceroute-method" class="method-detail ">
517
- <a name="method-i-cmd_traceroute"></a>
518
-
519
- <div class="method-heading">
520
-
521
- <span class="method-name">cmd_traceroute</span><span
522
- class="method-args">(argv)</span>
523
- <span class="method-click-advice">click to toggle source</span>
524
-
525
- </div>
526
-
527
- <div class="method-description">
528
-
529
- <p>
530
- runs traceroute on an ip address
531
- </p>
532
- <pre>
533
- * argv = command-line arguments, requires an ip address (-a) argument</pre>
534
-
535
-
536
-
537
- <div class="method-source-code"
538
- id="cmd-traceroute-source">
539
- <pre>
540
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 44</span>
541
- 44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_traceroute</span> <span class="ruby-identifier">argv</span>
542
- 45: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
543
- 46: <span class="ruby-identifier">addr</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">&quot;address&quot;</span>]
544
- 47: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">run_cmd</span>(<span class="ruby-node">&quot;traceroute #{addr}&quot;</span>)
545
- 48: <span class="ruby-keyword kw">end</span></pre>
546
- </div>
547
-
548
- </div>
549
-
550
-
551
-
552
-
553
- </div>
554
-
555
-
556
- </div>
557
-
558
- <div id="private-instance-method-details" class="method-section section">
559
- <h3 class="section-header">Private Instance Methods</h3>
560
-
561
-
562
- <div id="help-method" class="method-detail ">
563
- <a name="method-i-help"></a>
564
-
565
- <div class="method-heading">
566
-
567
- <span class="method-name">help</span><span
568
- class="method-args">()</span>
569
- <span class="method-click-advice">click to toggle source</span>
570
-
571
- </div>
572
-
573
- <div class="method-description">
574
-
575
-
576
-
577
-
578
-
579
- <div class="method-source-code"
580
- id="help-source">
581
- <pre>
582
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 115</span>
583
- 115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
584
- 116: <span class="ruby-identifier">helps</span> = [
585
- 117: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-a'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--address'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'ip address to for ping or traceroute'</span> },
586
- 118: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-h'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--help'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Help on command line options'</span> },
587
- 119: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-o'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--output'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'output logging to this file'</span> },
588
- 120: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-m'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--mu_string'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'user, password, mu_ip in the form of admin:admin@10.9.8.7'</span> },
589
- 121: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-v'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--verbose'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'set Logger::DEBUG level'</span> }
590
- 122: ]
591
- 123:
592
- 124: <span class="ruby-identifier">cmds</span> = [
593
- 125: <span class="ruby-value str">&quot;mu cmd_cli:cli_help&quot;</span>,
594
- 126: <span class="ruby-value str">&quot;mu cmd_cli:history&quot;</span>,
595
- 127: <span class="ruby-value str">&quot;mu cmd_cli:ping -a &lt;address&gt;&quot;</span>,
596
- 128: <span class="ruby-value str">&quot;mu cmd_cli:question&quot;</span>,
597
- 129: <span class="ruby-value str">&quot;mu cmd_cli:traceroute -a &lt;address&gt;&quot;</span>,
598
- 130: ]
599
- 131:
600
- 132: <span class="ruby-identifier">max_long_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-value">:long</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
601
- 133: <span class="ruby-identifier">max_value_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-value">:value</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
602
- 134: <span class="ruby-identifier">puts</span>
603
- 135: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Usage: mu cmd_cli:&lt;command&gt; &lt;options&gt;&quot;</span>
604
- 136: <span class="ruby-identifier">puts</span>
605
- 137: <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span>
606
- 138: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;%-*s %*s %-*s %s&quot;</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">max_long_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:long</span>], <span class="ruby-value">2</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:short</span>], <span class="ruby-identifier">max_value_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:value</span>], <span class="ruby-identifier">h</span>[<span class="ruby-value">:help</span>]]
607
- 139: <span class="ruby-keyword kw">end</span>
608
- 140: <span class="ruby-identifier">puts</span>
609
- 141: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Available Commands&quot;</span>
610
- 142: <span class="ruby-identifier">puts</span>
611
- 143: <span class="ruby-identifier">cmds</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">|</span>
612
- 144: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
613
- 145: <span class="ruby-keyword kw">end</span>
614
- 146: <span class="ruby-identifier">puts</span>
615
- 147: <span class="ruby-keyword kw">end</span></pre>
616
- </div>
617
-
618
- </div>
619
-
620
-
621
-
622
-
623
- </div>
624
-
625
-
626
- <div id="parse-cli-method" class="method-detail ">
627
- <a name="method-i-parse_cli"></a>
628
-
629
- <div class="method-heading">
630
-
631
- <span class="method-name">parse_cli</span><span
632
- class="method-args">(argv)</span>
633
- <span class="method-click-advice">click to toggle source</span>
634
-
635
- </div>
636
-
637
- <div class="method-description">
638
-
639
-
640
-
641
-
642
-
643
- <div class="method-source-code"
644
- id="parse-cli-source">
645
- <pre>
646
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 72</span>
647
- 72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
648
- 73: <span class="ruby-ivar">@hash</span> = {}
649
- 74: <span class="ruby-identifier">args</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
650
- 75: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">empty?</span>
651
- 76: <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">first</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">'-'</span>
652
- 77:
653
- 78: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
654
- 79:
655
- 80: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-a'</span>, <span class="ruby-value str">'--address'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
656
- 81: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'address'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
657
- 82: <span class="ruby-keyword kw">next</span>
658
- 83: <span class="ruby-keyword kw">end</span>
659
- 84:
660
- 85: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-h'</span>, <span class="ruby-value str">'--help'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
661
- 86: <span class="ruby-identifier">help</span>
662
- 87: <span class="ruby-identifier">exit</span>
663
- 88: <span class="ruby-keyword kw">end</span>
664
- 89:
665
- 90: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-m'</span>, <span class="ruby-value str">'--mu_string'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
666
- 91: <span class="ruby-identifier">mu_string</span> = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
667
- 92: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mu_string</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.+?):(.+?)@(.*)/</span>
668
- 93: <span class="ruby-identifier">@@mu_admin_user</span> = <span class="ruby-node">$1</span>
669
- 94: <span class="ruby-identifier">@@mu_admin_pass</span> = <span class="ruby-node">$2</span>
670
- 95: <span class="ruby-identifier">@@mu_ip</span> = <span class="ruby-node">$3</span>
671
- 96: <span class="ruby-keyword kw">end</span>
672
- 97: <span class="ruby-keyword kw">next</span>
673
- 98: <span class="ruby-keyword kw">end</span>
674
- 99:
675
- 100: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-o'</span>, <span class="ruby-value str">'--output'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
676
- 101: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>), <span class="ruby-value str">&quot;w&quot;</span>)
677
- 102: <span class="ruby-keyword kw">next</span>
678
- 103: <span class="ruby-keyword kw">end</span>
679
- 104:
680
- 105: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-v'</span>, <span class="ruby-value str">'--verbose'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
681
- 106: <span class="ruby-identifier">$log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
682
- 107: <span class="ruby-keyword kw">next</span>
683
- 108: <span class="ruby-keyword kw">end</span>
684
- 109:
685
- 110: <span class="ruby-keyword kw">end</span>
686
- 111:
687
- 112: <span class="ruby-identifier">args</span>
688
- 113: <span class="ruby-keyword kw">end</span></pre>
689
- </div>
690
-
691
- </div>
692
-
693
-
694
-
695
-
696
- </div>
697
-
698
-
699
- <div id="run-cmd-method" class="method-detail ">
700
- <a name="method-i-run_cmd"></a>
701
-
702
- <div class="method-heading">
703
-
704
- <span class="method-name">run_cmd</span><span
705
- class="method-args">(command, prompt=@prompt)</span>
706
- <span class="method-click-advice">click to toggle source</span>
707
-
708
- </div>
709
-
710
- <div class="method-description">
711
-
712
- <p>
713
- runs the cli command
714
- </p>
715
-
716
-
717
-
718
- <div class="method-source-code"
719
- id="run-cmd-source">
720
- <pre>
721
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 53</span>
722
- 53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_cmd</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">prompt</span>=<span class="ruby-ivar">@prompt</span>)
723
- 54: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;run command #{command}&quot;</span>
724
- 55: <span class="ruby-ivar">@pipe</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">&quot;#{command}\r&quot;</span>)
725
- 56: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@pipe</span>.<span class="ruby-identifier">readline</span>(<span class="ruby-identifier">prompt</span>)
726
- 57: <span class="ruby-ivar">@pipe</span>.<span class="ruby-identifier">close</span>
727
- 58: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
728
- 59: <span class="ruby-keyword kw">end</span></pre>
729
- </div>
730
-
731
- </div>
732
-
733
-
734
-
735
-
736
- </div>
737
-
738
-
739
- <div id="setup-method" class="method-detail ">
740
- <a name="method-i-setup"></a>
741
-
742
- <div class="method-heading">
743
-
744
- <span class="method-name">setup</span><span
745
- class="method-args">(argv)</span>
746
- <span class="method-click-advice">click to toggle source</span>
747
-
748
- </div>
749
-
750
- <div class="method-description">
751
-
752
-
753
-
754
-
755
-
756
- <div class="method-source-code"
757
- id="setup-source">
758
- <pre>
759
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_cli.rb, line 61</span>
760
- 61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
761
- 62: <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
762
- 63: <span class="ruby-ivar">@host</span> = (<span class="ruby-identifier">@@mu_ip</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;127.0.0.1&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_ip</span>
763
- 64: <span class="ruby-ivar">@username</span> = (<span class="ruby-identifier">@@mu_admin_user</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;admin&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_admin_user</span>
764
- 65: <span class="ruby-ivar">@password</span> = (<span class="ruby-identifier">@@mu_admin_pass</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;admin&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_admin_pass</span>
765
- 66: <span class="ruby-ivar">@prompt</span> = <span class="ruby-value str">&quot;MU&gt;&quot;</span>
766
- 67: <span class="ruby-ivar">@pipe</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">popen</span>(<span class="ruby-node">&quot;./lib/mu/cli/muclish.tcl #{@host} #{@password} '#{@prompt}'&quot;</span>, <span class="ruby-value str">'w+'</span>)
767
- 68: <span class="ruby-ivar">@pipe</span>.<span class="ruby-identifier">sync</span> = <span class="ruby-keyword kw">true</span>
768
- 69: <span class="ruby-ivar">@banner</span> = <span class="ruby-ivar">@pipe</span>.<span class="ruby-identifier">readline</span>(<span class="ruby-ivar">@prompt</span>)
769
- 70: <span class="ruby-keyword kw">end</span></pre>
770
- </div>
771
-
772
- </div>
773
-
774
-
775
-
776
-
777
- </div>
778
-
779
-
780
- </div>
781
-
782
-
783
- </div>
784
-
785
-
786
- <div id="rdoc-debugging-section-dump" class="debugging-section">
787
-
788
- <p>Disabled; run with --debug to generate this.</p>
789
-
790
- </div>
791
-
792
- <div id="validator-badges">
793
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
794
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
795
- Rdoc Generator</a> 1.1.6</small>.</p>
796
- </div>
797
-
798
- </body>
799
- </html>
800
-