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,1363 +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_muapi</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_muapi_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/mu/command/cmd_muapi.rb">lib/mu/command/cmd_muapi.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_archive">#cmd_archive</a></li>
73
-
74
- <li><a href="#method-i-cmd_backup">#cmd_backup</a></li>
75
-
76
- <li><a href="#method-i-cmd_capture">#cmd_capture</a></li>
77
-
78
- <li><a href="#method-i-cmd_delete">#cmd_delete</a></li>
79
-
80
- <li><a href="#method-i-cmd_export_by_type_and_name">#cmd_export_by_type_and_name</a></li>
81
-
82
- <li><a href="#method-i-cmd_export_by_uuid">#cmd_export_by_uuid</a></li>
83
-
84
- <li><a href="#method-i-cmd_get_faults">#cmd_get_faults</a></li>
85
-
86
- <li><a href="#method-i-cmd_get_name">#cmd_get_name</a></li>
87
-
88
- <li><a href="#method-i-cmd_help">#cmd_help</a></li>
89
-
90
- <li><a href="#method-i-cmd_list">#cmd_list</a></li>
91
-
92
- <li><a href="#method-i-cmd_list_by_status">#cmd_list_by_status</a></li>
93
-
94
- <li><a href="#method-i-cmd_pause">#cmd_pause</a></li>
95
-
96
- <li><a href="#method-i-cmd_resume">#cmd_resume</a></li>
97
-
98
- <li><a href="#method-i-cmd_run">#cmd_run</a></li>
99
-
100
- <li><a href="#method-i-cmd_status">#cmd_status</a></li>
101
-
102
- <li><a href="#method-i-cmd_stop">#cmd_stop</a></li>
103
-
104
- <li><a href="#method-i-cmd_types">#cmd_types</a></li>
105
-
106
- <li><a href="#method-i-help">#help</a></li>
107
-
108
- <li><a href="#method-i-parse_cli">#parse_cli</a></li>
109
-
110
- <li><a href="#method-i-setup">#setup</a></li>
111
-
112
- </ul>
113
- </div>
114
-
115
-
116
- <!-- Included Modules -->
117
-
118
- </div>
119
-
120
- <div id="project-metadata">
121
-
122
-
123
- <div id="fileindex-section" class="section project-section">
124
- <h3 class="section-header">Files</h3>
125
- <ul>
126
-
127
- <li class="file"><a href="../../Gemfile.html">Gemfile</a></li>
128
-
129
- <li class="file"><a href="../../LICENSE_txt.html">LICENSE.txt</a></li>
130
-
131
- <li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
132
-
133
- <li class="file"><a href="../../Rakefile.html">Rakefile</a></li>
134
-
135
- <li class="file"><a href="../../VERSION.html">VERSION</a></li>
136
-
137
- </ul>
138
- </div>
139
-
140
-
141
- <div id="classindex-section" class="section project-section">
142
- <h3 class="section-header">Class Index
143
- <span class="search-toggle"><img src="../../images/find.png"
144
- height="16" width="16" alt="[+]"
145
- title="show/hide quicksearch" /></span></h3>
146
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
147
- <fieldset>
148
- <legend>Quicksearch</legend>
149
- <input type="text" name="quicksearch" value=""
150
- class="quicksearch-field" />
151
- </fieldset>
152
- </form>
153
-
154
- <ul class="link-list">
155
-
156
- <li><a href="../../Mu.html">Mu</a></li>
157
-
158
- <li><a href="../../Mu/Client.html">Mu::Client</a></li>
159
-
160
- <li><a href="../../Mu/Command.html">Mu::Command</a></li>
161
-
162
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
163
-
164
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
165
-
166
- <li><a href="../../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
167
-
168
- <li><a href="../../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
169
-
170
- <li><a href="../../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
171
-
172
- <li><a href="../../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
173
-
174
- <li><a href="../../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
175
-
176
- <li><a href="../../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
177
-
178
- <li><a href="../../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
179
-
180
- <li><a href="../../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
181
-
182
- <li><a href="../../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
183
-
184
- <li><a href="../../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
185
-
186
- <li><a href="../../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
187
-
188
- <li><a href="../../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
189
-
190
- <li><a href="../../Mu/Command/Help.html">Mu::Command::Help</a></li>
191
-
192
- <li><a href="../../Mu/Curl.html">Mu::Curl</a></li>
193
-
194
- <li><a href="../../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
195
-
196
- <li><a href="../../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
197
-
198
- <li><a href="../../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
199
-
200
- <li><a href="../../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
201
-
202
- <li><a href="../../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
203
-
204
- <li><a href="../../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
205
-
206
- <li><a href="../../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
207
-
208
- <li><a href="../../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
209
-
210
- <li><a href="../../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
211
-
212
- <li><a href="../../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
213
-
214
- <li><a href="../../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
215
-
216
- <li><a href="../../Mu/Ddt.html">Mu::Ddt</a></li>
217
-
218
- <li><a href="../../Mu/Helper.html">Mu::Helper</a></li>
219
-
220
- <li><a href="../../Mu/Homepage.html">Mu::Homepage</a></li>
221
-
222
- <li><a href="../../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
223
-
224
- <li><a href="../../Mu/Muapi.html">Mu::Muapi</a></li>
225
-
226
- <li><a href="../../Mu/Netconfig.html">Mu::Netconfig</a></li>
227
-
228
- <li><a href="../../Mu/Scale.html">Mu::Scale</a></li>
229
-
230
- <li><a href="../../Mu/System.html">Mu::System</a></li>
231
-
232
- <li><a href="../../Test.html">Test</a></li>
233
-
234
- <li><a href="../../Test/Unit.html">Test::Unit</a></li>
235
-
236
- <li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
237
-
238
- <li><a href="../../Object.html">Object</a></li>
239
-
240
- <li><a href="../../TCTestMu.html">TCTestMu</a></li>
241
-
242
- </ul>
243
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
244
- </div>
245
-
246
-
247
- </div>
248
- </div>
249
-
250
- <div id="documentation">
251
- <h1 class="class">Mu::Command::Cmd_muapi</h1>
252
-
253
- <div id="description">
254
-
255
- </div>
256
-
257
- <!-- Constants -->
258
-
259
-
260
- <!-- Attributes -->
261
-
262
- <div id="attribute-method-details" class="method-section section">
263
- <h3 class="section-header">Attributes</h3>
264
-
265
-
266
- <div id="host-attribute-method" class="method-detail">
267
- <a name="host"></a>
268
-
269
- <a name="host="></a>
270
-
271
- <div class="method-heading attribute-method-heading">
272
- <span class="method-name">host</span><span
273
- class="attribute-access-type">[RW]</span>
274
- </div>
275
-
276
- <div class="method-description">
277
-
278
-
279
-
280
- </div>
281
- </div>
282
-
283
- <div id="username-attribute-method" class="method-detail">
284
- <a name="username"></a>
285
-
286
- <a name="username="></a>
287
-
288
- <div class="method-heading attribute-method-heading">
289
- <span class="method-name">username</span><span
290
- class="attribute-access-type">[RW]</span>
291
- </div>
292
-
293
- <div class="method-description">
294
-
295
-
296
-
297
- </div>
298
- </div>
299
-
300
- <div id="password-attribute-method" class="method-detail">
301
- <a name="password"></a>
302
-
303
- <a name="password="></a>
304
-
305
- <div class="method-heading attribute-method-heading">
306
- <span class="method-name">password</span><span
307
- class="attribute-access-type">[RW]</span>
308
- </div>
309
-
310
- <div class="method-description">
311
-
312
-
313
-
314
- </div>
315
- </div>
316
-
317
- <div id="api-attribute-method" class="method-detail">
318
- <a name="api"></a>
319
-
320
- <a name="api="></a>
321
-
322
- <div class="method-heading attribute-method-heading">
323
- <span class="method-name">api</span><span
324
- class="attribute-access-type">[RW]</span>
325
- </div>
326
-
327
- <div class="method-description">
328
-
329
-
330
-
331
- </div>
332
- </div>
333
-
334
- <div id="docroot-attribute-method" class="method-detail">
335
- <a name="docroot"></a>
336
-
337
- <a name="docroot="></a>
338
-
339
- <div class="method-heading attribute-method-heading">
340
- <span class="method-name">docroot</span><span
341
- class="attribute-access-type">[RW]</span>
342
- </div>
343
-
344
- <div class="method-description">
345
-
346
-
347
-
348
- </div>
349
- </div>
350
-
351
- </div>
352
-
353
-
354
- <!-- Methods -->
355
-
356
- <div id="public-instance-method-details" class="method-section section">
357
- <h3 class="section-header">Public Instance Methods</h3>
358
-
359
-
360
- <div id="cmd-archive-method" class="method-detail ">
361
- <a name="method-i-cmd_archive"></a>
362
-
363
- <div class="method-heading">
364
-
365
- <span class="method-name">cmd_archive</span><span
366
- class="method-args">(argv)</span>
367
- <span class="method-click-advice">click to toggle source</span>
368
-
369
- </div>
370
-
371
- <div class="method-description">
372
-
373
- <p>
374
- archive has a set of three commands that are used to generate and download
375
- an archive of all data produced by a particular test ex:
376
- </p>
377
- <pre>
378
- * argv = command-line arguments, requires a command (-c) argument
379
- * command=run returns the job_id
380
- * command=status (called after 'run'), requires the job_id (-u) argument
381
- * command=get (called when status returns &quot;Finished&quot;), requires the job_id (-u) argument</pre>
382
-
383
-
384
-
385
- <div class="method-source-code"
386
- id="cmd-archive-source">
387
- <pre>
388
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 177</span>
389
- 177: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_archive</span> <span class="ruby-identifier">argv</span>
390
- 178: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
391
- 179: <span class="ruby-identifier">command</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'command'</span>]
392
- 180: <span class="ruby-identifier">job_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
393
- 181: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">archive</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">job_id</span>)
394
- 182: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
395
- 183: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
396
- 184: <span class="ruby-keyword kw">end</span></pre>
397
- </div>
398
-
399
- </div>
400
-
401
-
402
-
403
-
404
- </div>
405
-
406
-
407
- <div id="cmd-backup-method" class="method-detail ">
408
- <a name="method-i-cmd_backup"></a>
409
-
410
- <div class="method-heading">
411
-
412
- <span class="method-name">cmd_backup</span><span
413
- class="method-args">(argv)</span>
414
- <span class="method-click-advice">click to toggle source</span>
415
-
416
- </div>
417
-
418
- <div class="method-description">
419
-
420
- <p>
421
- backup has a set of three commands that are used to generate, query and
422
- retrieve a backup ex:
423
- </p>
424
- <pre>
425
- * argv = command-line arguments, requires a command (-c) argument
426
- * command=run returns the job_id
427
- * command=status (called after 'run')
428
- * command=get (called when status returns &quot;Finished&quot;), requires the name (-n) argument
429
- * name = backup file name (will be given a .dat extension)</pre>
430
-
431
-
432
-
433
- <div class="method-source-code"
434
- id="cmd-backup-source">
435
- <pre>
436
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 194</span>
437
- 194: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_backup</span> <span class="ruby-identifier">argv</span>
438
- 195: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
439
- 196: <span class="ruby-identifier">command</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'command'</span>]
440
- 197: <span class="ruby-identifier">name</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'name'</span>]
441
- 198: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">backup</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">name</span>)
442
- 199: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
443
- 200: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
444
- 201: <span class="ruby-keyword kw">end</span></pre>
445
- </div>
446
-
447
- </div>
448
-
449
-
450
-
451
-
452
- </div>
453
-
454
-
455
- <div id="cmd-capture-method" class="method-detail ">
456
- <a name="method-i-cmd_capture"></a>
457
-
458
- <div class="method-heading">
459
-
460
- <span class="method-name">cmd_capture</span><span
461
- class="method-args">(argv)</span>
462
- <span class="method-click-advice">click to toggle source</span>
463
-
464
- </div>
465
-
466
- <div class="method-description">
467
-
468
- <p>
469
- capture has a set of three commands that are used to generate packet
470
- captures, poll the status and return the resulting file ex:
471
- </p>
472
- <pre>
473
- * argv = command-line arguments, requires a command (-c) argument
474
- * command=run returns the job_id
475
- * command=status (called after 'run'), requires the job_id (-u) argument
476
- * command=get (called when status returns &quot;Finished&quot;), requires the job_id (-u) argument
477
- * port = the Mu interface on which to capture packets</pre>
478
-
479
-
480
-
481
- <div class="method-source-code"
482
- id="cmd-capture-source">
483
- <pre>
484
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 211</span>
485
- 211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_capture</span> <span class="ruby-identifier">argv</span>
486
- 212: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
487
- 213: <span class="ruby-identifier">command</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'command'</span>]
488
- 214: <span class="ruby-identifier">port</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'port'</span>]
489
- 215: <span class="ruby-identifier">job_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
490
- 216: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">capture</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">job_id</span>)
491
- 217: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
492
- 218: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
493
- 219: <span class="ruby-keyword kw">end</span></pre>
494
- </div>
495
-
496
- </div>
497
-
498
-
499
-
500
-
501
- </div>
502
-
503
-
504
- <div id="cmd-delete-method" class="method-detail ">
505
- <a name="method-i-cmd_delete"></a>
506
-
507
- <div class="method-heading">
508
-
509
- <span class="method-name">cmd_delete</span><span
510
- class="method-args">(argv)</span>
511
- <span class="method-click-advice">click to toggle source</span>
512
-
513
- </div>
514
-
515
- <div class="method-description">
516
-
517
- <p>
518
- delets an analysis or template of any type
519
- </p>
520
- <pre>
521
- * argv = command-line arguments, requires a uuid (-u) argument specifying the test</pre>
522
-
523
-
524
-
525
- <div class="method-source-code"
526
- id="cmd-delete-source">
527
- <pre>
528
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 89</span>
529
- 89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_delete</span> <span class="ruby-identifier">argv</span>
530
- 90: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
531
- 91: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
532
- 92: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">uuid</span>)
533
- 93: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
534
- 94: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
535
- 95: <span class="ruby-keyword kw">end</span></pre>
536
- </div>
537
-
538
- </div>
539
-
540
-
541
-
542
-
543
- </div>
544
-
545
-
546
- <div id="cmd-export-by-type-and-name-method" class="method-detail ">
547
- <a name="method-i-cmd_export_by_type_and_name"></a>
548
-
549
- <div class="method-heading">
550
-
551
- <span class="method-name">cmd_export_by_type_and_name</span><span
552
- class="method-args">(argv)</span>
553
- <span class="method-click-advice">click to toggle source</span>
554
-
555
- </div>
556
-
557
- <div class="method-description">
558
-
559
- <p>
560
- exports a template by type and name
561
- </p>
562
- <pre>
563
- * argv = command-line arguments, requires a template type (-t) and template name (-n) argument</pre>
564
-
565
-
566
-
567
- <div class="method-source-code"
568
- id="cmd-export-by-type-and-name-source">
569
- <pre>
570
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 150</span>
571
- 150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_export_by_type_and_name</span> <span class="ruby-identifier">argv</span>
572
- 151: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
573
- 152: <span class="ruby-identifier">type</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'type'</span>]
574
- 153: <span class="ruby-identifier">name</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'name'</span>]
575
- 154: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">export_by_type_and_name</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>)
576
- 155: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
577
- 156: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
578
- 157: <span class="ruby-keyword kw">end</span></pre>
579
- </div>
580
-
581
- </div>
582
-
583
-
584
-
585
-
586
- </div>
587
-
588
-
589
- <div id="cmd-export-by-uuid-method" class="method-detail ">
590
- <a name="method-i-cmd_export_by_uuid"></a>
591
-
592
- <div class="method-heading">
593
-
594
- <span class="method-name">cmd_export_by_uuid</span><span
595
- class="method-args">(argv)</span>
596
- <span class="method-click-advice">click to toggle source</span>
597
-
598
- </div>
599
-
600
- <div class="method-description">
601
-
602
- <p>
603
- exports a template by uuid
604
- </p>
605
- <pre>
606
- * argv = command-line arguments, requires a template uuid (-u) argument</pre>
607
-
608
-
609
-
610
- <div class="method-source-code"
611
- id="cmd-export-by-uuid-source">
612
- <pre>
613
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 161</span>
614
- 161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_export_by_uuid</span> <span class="ruby-identifier">argv</span>
615
- 162: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
616
- 163: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
617
- 164: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">export_by_uuid</span>(<span class="ruby-identifier">uuid</span>)
618
- 165: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
619
- 166: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
620
- 167: <span class="ruby-keyword kw">end</span></pre>
621
- </div>
622
-
623
- </div>
624
-
625
-
626
-
627
-
628
- </div>
629
-
630
-
631
- <div id="cmd-get-faults-method" class="method-detail ">
632
- <a name="method-i-cmd_get_faults"></a>
633
-
634
- <div class="method-heading">
635
-
636
- <span class="method-name">cmd_get_faults</span><span
637
- class="method-args">(argv)</span>
638
- <span class="method-click-advice">click to toggle source</span>
639
-
640
- </div>
641
-
642
- <div class="method-description">
643
-
644
- <p>
645
- returns a list of faults (if any) for the analysis
646
- </p>
647
- <pre>
648
- * argv = command-line arguments, requires a uuid (-u) argument specifying the test</pre>
649
-
650
-
651
-
652
- <div class="method-source-code"
653
- id="cmd-get-faults-source">
654
- <pre>
655
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 99</span>
656
- 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_get_faults</span> <span class="ruby-identifier">argv</span>
657
- 100: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
658
- 101: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
659
- 102: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">get_faults</span>(<span class="ruby-identifier">uuid</span>)
660
- 103: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
661
- 104: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">|</span>
662
- 105: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">r</span>
663
- 106: <span class="ruby-keyword kw">end</span>
664
- 107: <span class="ruby-keyword kw">else</span>
665
- 108: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
666
- 109: <span class="ruby-keyword kw">end</span>
667
- 110: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
668
- 111: <span class="ruby-keyword kw">end</span></pre>
669
- </div>
670
-
671
- </div>
672
-
673
-
674
-
675
-
676
- </div>
677
-
678
-
679
- <div id="cmd-get-name-method" class="method-detail ">
680
- <a name="method-i-cmd_get_name"></a>
681
-
682
- <div class="method-heading">
683
-
684
- <span class="method-name">cmd_get_name</span><span
685
- class="method-args">(argv)</span>
686
- <span class="method-click-advice">click to toggle source</span>
687
-
688
- </div>
689
-
690
- <div class="method-description">
691
-
692
- <p>
693
- returns the name of a test referenced by uuid
694
- </p>
695
- <pre>
696
- * argv = command-line arguments, requires a uuid (-u) argument specifying the test</pre>
697
-
698
-
699
-
700
- <div class="method-source-code"
701
- id="cmd-get-name-source">
702
- <pre>
703
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 115</span>
704
- 115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_get_name</span> <span class="ruby-identifier">argv</span>
705
- 116: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
706
- 117: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
707
- 118: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">get_name</span>(<span class="ruby-identifier">uuid</span>)
708
- 119: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
709
- 120: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
710
- 121: <span class="ruby-keyword kw">end</span></pre>
711
- </div>
712
-
713
- </div>
714
-
715
-
716
-
717
-
718
- </div>
719
-
720
-
721
- <div id="cmd-help-method" class="method-detail ">
722
- <a name="method-i-cmd_help"></a>
723
-
724
- <div class="method-heading">
725
-
726
- <span class="method-name">cmd_help</span><span
727
- class="method-args">(argv)</span>
728
- <span class="method-click-advice">click to toggle source</span>
729
-
730
- </div>
731
-
732
- <div class="method-description">
733
-
734
- <p>
735
- displays command-line help
736
- </p>
737
- <pre>
738
- * argv = command-line arguments</pre>
739
-
740
-
741
-
742
- <div class="method-source-code"
743
- id="cmd-help-source">
744
- <pre>
745
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 12</span>
746
- 12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
747
- 13: <span class="ruby-identifier">help</span>
748
- 14: <span class="ruby-keyword kw">end</span></pre>
749
- </div>
750
-
751
- </div>
752
-
753
-
754
-
755
-
756
- </div>
757
-
758
-
759
- <div id="cmd-list-method" class="method-detail ">
760
- <a name="method-i-cmd_list"></a>
761
-
762
- <div class="method-heading">
763
-
764
- <span class="method-name">cmd_list</span><span
765
- class="method-args">(argv)</span>
766
- <span class="method-click-advice">click to toggle source</span>
767
-
768
- </div>
769
-
770
- <div class="method-description">
771
-
772
- <p>
773
- lists all templates of the given type
774
- </p>
775
- <pre>
776
- * argv = command-line arguments, requires a type (-t) argument, such as 'scenario'</pre>
777
-
778
-
779
-
780
- <div class="method-source-code"
781
- id="cmd-list-source">
782
- <pre>
783
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 134</span>
784
- 134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_list</span> <span class="ruby-identifier">argv</span>
785
- 135: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
786
- 136: <span class="ruby-identifier">type</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'type'</span>]
787
- 137: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">list</span>(<span class="ruby-identifier">type</span>)
788
- 138: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
789
- 139: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">|</span>
790
- 140: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">r</span>
791
- 141: <span class="ruby-keyword kw">end</span>
792
- 142: <span class="ruby-keyword kw">else</span>
793
- 143: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
794
- 144: <span class="ruby-keyword kw">end</span>
795
- 145: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
796
- 146: <span class="ruby-keyword kw">end</span></pre>
797
- </div>
798
-
799
- </div>
800
-
801
-
802
-
803
-
804
- </div>
805
-
806
-
807
- <div id="cmd-list-by-status-method" class="method-detail ">
808
- <a name="method-i-cmd_list_by_status"></a>
809
-
810
- <div class="method-heading">
811
-
812
- <span class="method-name">cmd_list_by_status</span><span
813
- class="method-args">(argv)</span>
814
- <span class="method-click-advice">click to toggle source</span>
815
-
816
- </div>
817
-
818
- <div class="method-description">
819
-
820
- <p>
821
- for any of the possible status values, returns a list of analysis
822
- </p>
823
- <pre>
824
- * argv = command-line arguments, requires the status (-s) argument, specifying the values to query, such as 'running' or 'failed'</pre>
825
-
826
-
827
-
828
- <div class="method-source-code"
829
- id="cmd-list-by-status-source">
830
- <pre>
831
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 18</span>
832
- 18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_list_by_status</span> <span class="ruby-identifier">argv</span>
833
- 19: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
834
- 20: <span class="ruby-identifier">status</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'status'</span>]
835
- 21: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">list_by_status</span>(<span class="ruby-identifier">status</span>)
836
- 22: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
837
- 23: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">|</span>
838
- 24: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">r</span>
839
- 25: <span class="ruby-keyword kw">end</span>
840
- 26: <span class="ruby-keyword kw">else</span>
841
- 27: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
842
- 28: <span class="ruby-keyword kw">end</span>
843
- 29: <span class="ruby-keyword kw">end</span></pre>
844
- </div>
845
-
846
- </div>
847
-
848
-
849
-
850
-
851
- </div>
852
-
853
-
854
- <div id="cmd-pause-method" class="method-detail ">
855
- <a name="method-i-cmd_pause"></a>
856
-
857
- <div class="method-heading">
858
-
859
- <span class="method-name">cmd_pause</span><span
860
- class="method-args">(argv)</span>
861
- <span class="method-click-advice">click to toggle source</span>
862
-
863
- </div>
864
-
865
- <div class="method-description">
866
-
867
- <p>
868
- pauses a running analysis. Note that any queued analysis will NOT begin
869
- </p>
870
- <pre>
871
- * argv = command-line arguments, requires a uuid (-u) argument specifying the test</pre>
872
-
873
-
874
-
875
- <div class="method-source-code"
876
- id="cmd-pause-source">
877
- <pre>
878
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 69</span>
879
- 69: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_pause</span> <span class="ruby-identifier">argv</span>
880
- 70: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
881
- 71: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
882
- 72: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">pause</span>(<span class="ruby-identifier">uuid</span>)
883
- 73: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
884
- 74: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
885
- 75: <span class="ruby-keyword kw">end</span></pre>
886
- </div>
887
-
888
- </div>
889
-
890
-
891
-
892
-
893
- </div>
894
-
895
-
896
- <div id="cmd-resume-method" class="method-detail ">
897
- <a name="method-i-cmd_resume"></a>
898
-
899
- <div class="method-heading">
900
-
901
- <span class="method-name">cmd_resume</span><span
902
- class="method-args">(argv)</span>
903
- <span class="method-click-advice">click to toggle source</span>
904
-
905
- </div>
906
-
907
- <div class="method-description">
908
-
909
- <p>
910
- resumes a paused analysis
911
- </p>
912
- <pre>
913
- * argv = command-line arguments, requires a uuid (-u) argument specifying the test</pre>
914
-
915
-
916
-
917
- <div class="method-source-code"
918
- id="cmd-resume-source">
919
- <pre>
920
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 79</span>
921
- 79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_resume</span> <span class="ruby-identifier">argv</span>
922
- 80: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
923
- 81: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
924
- 82: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">resume</span>(<span class="ruby-identifier">uuid</span>)
925
- 83: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
926
- 84: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
927
- 85: <span class="ruby-keyword kw">end</span></pre>
928
- </div>
929
-
930
- </div>
931
-
932
-
933
-
934
-
935
- </div>
936
-
937
-
938
- <div id="cmd-run-method" class="method-detail ">
939
- <a name="method-i-cmd_run"></a>
940
-
941
- <div class="method-heading">
942
-
943
- <span class="method-name">cmd_run</span><span
944
- class="method-args">(argv)</span>
945
- <span class="method-click-advice">click to toggle source</span>
946
-
947
- </div>
948
-
949
- <div class="method-description">
950
-
951
- <p>
952
- runs an analysis, reference is the posted uuid ex: run(1234-1234-1234-1234,
953
- &#8220;new_name&#8220;)
954
- </p>
955
- <pre>
956
- * argv = command-line arguments, requires a uuid (-u) and an optional name such that each successive run of the same uuid yields a new name</pre>
957
-
958
-
959
-
960
- <div class="method-source-code"
961
- id="cmd-run-source">
962
- <pre>
963
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 44</span>
964
- 44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run</span> <span class="ruby-identifier">argv</span>
965
- 45: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
966
- 46: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
967
- 47: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'boolean'</span>].<span class="ruby-identifier">nil?</span>
968
- 48: <span class="ruby-identifier">rename</span> = <span class="ruby-value str">&quot;&quot;</span>
969
- 49: <span class="ruby-keyword kw">else</span>
970
- 50: <span class="ruby-identifier">rename</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'boolean'</span>]
971
- 51: <span class="ruby-keyword kw">end</span>
972
- 52: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">uuid</span>, <span class="ruby-identifier">rename</span>)
973
- 53: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
974
- 54: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
975
- 55: <span class="ruby-keyword kw">end</span></pre>
976
- </div>
977
-
978
- </div>
979
-
980
-
981
-
982
-
983
- </div>
984
-
985
-
986
- <div id="cmd-status-method" class="method-detail ">
987
- <a name="method-i-cmd_status"></a>
988
-
989
- <div class="method-heading">
990
-
991
- <span class="method-name">cmd_status</span><span
992
- class="method-args">(argv)</span>
993
- <span class="method-click-advice">click to toggle source</span>
994
-
995
- </div>
996
-
997
- <div class="method-description">
998
-
999
- <p>
1000
- returns the status of a particular analysis
1001
- </p>
1002
- <pre>
1003
- * argv = command-line argumentsm require a uuid (-u) argument, specifying a test on the Mu</pre>
1004
-
1005
-
1006
-
1007
- <div class="method-source-code"
1008
- id="cmd-status-source">
1009
- <pre>
1010
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 33</span>
1011
- 33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_status</span> <span class="ruby-identifier">argv</span>
1012
- 34: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1013
- 35: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
1014
- 36: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>(<span class="ruby-identifier">uuid</span>)
1015
- 37: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
1016
- 38: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
1017
- 39: <span class="ruby-keyword kw">end</span></pre>
1018
- </div>
1019
-
1020
- </div>
1021
-
1022
-
1023
-
1024
-
1025
- </div>
1026
-
1027
-
1028
- <div id="cmd-stop-method" class="method-detail ">
1029
- <a name="method-i-cmd_stop"></a>
1030
-
1031
- <div class="method-heading">
1032
-
1033
- <span class="method-name">cmd_stop</span><span
1034
- class="method-args">(argv)</span>
1035
- <span class="method-click-advice">click to toggle source</span>
1036
-
1037
- </div>
1038
-
1039
- <div class="method-description">
1040
-
1041
- <p>
1042
- aborts a running analysis. the next queued analysis will start
1043
- </p>
1044
- <pre>
1045
- * argv = command-line arguments, requires a uuid (-u) argument specifying the test</pre>
1046
-
1047
-
1048
-
1049
- <div class="method-source-code"
1050
- id="cmd-stop-source">
1051
- <pre>
1052
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 59</span>
1053
- 59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_stop</span> <span class="ruby-identifier">argv</span>
1054
- 60: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1055
- 61: <span class="ruby-identifier">uuid</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>]
1056
- 62: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">stop</span>(<span class="ruby-identifier">uuid</span>)
1057
- 63: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
1058
- 64: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
1059
- 65: <span class="ruby-keyword kw">end</span></pre>
1060
- </div>
1061
-
1062
- </div>
1063
-
1064
-
1065
-
1066
-
1067
- </div>
1068
-
1069
-
1070
- <div id="cmd-types-method" class="method-detail ">
1071
- <a name="method-i-cmd_types"></a>
1072
-
1073
- <div class="method-heading">
1074
-
1075
- <span class="method-name">cmd_types</span><span
1076
- class="method-args">(argv)</span>
1077
- <span class="method-click-advice">click to toggle source</span>
1078
-
1079
- </div>
1080
-
1081
- <div class="method-description">
1082
-
1083
- <p>
1084
- returns the types of templates on the <a href="../../Mu.html">Mu</a>
1085
- </p>
1086
- <pre>
1087
- * argv = command-line arguments</pre>
1088
-
1089
-
1090
-
1091
- <div class="method-source-code"
1092
- id="cmd-types-source">
1093
- <pre>
1094
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 125</span>
1095
- 125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_types</span> <span class="ruby-identifier">argv</span>
1096
- 126: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1097
- 127: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">types</span>
1098
- 128: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
1099
- 129: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
1100
- 130: <span class="ruby-keyword kw">end</span></pre>
1101
- </div>
1102
-
1103
- </div>
1104
-
1105
-
1106
-
1107
-
1108
- </div>
1109
-
1110
-
1111
- </div>
1112
-
1113
- <div id="private-instance-method-details" class="method-section section">
1114
- <h3 class="section-header">Private Instance Methods</h3>
1115
-
1116
-
1117
- <div id="help-method" class="method-detail ">
1118
- <a name="method-i-help"></a>
1119
-
1120
- <div class="method-heading">
1121
-
1122
- <span class="method-name">help</span><span
1123
- class="method-args">()</span>
1124
- <span class="method-click-advice">click to toggle source</span>
1125
-
1126
- </div>
1127
-
1128
- <div class="method-description">
1129
-
1130
-
1131
-
1132
-
1133
-
1134
- <div class="method-source-code"
1135
- id="help-source">
1136
- <pre>
1137
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 307</span>
1138
- 307: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
1139
- 308: <span class="ruby-identifier">helps</span> = [
1140
- 309: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-b'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--boolean'</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">'boolean arg'</span> },
1141
- 310: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-c'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--command'</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">'e.g. run|get|status'</span> },
1142
- 311: { <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> },
1143
- 312: { <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> },
1144
- 313: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-n'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--name'</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">'name for filtering'</span> },
1145
- 314: { <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> },
1146
- 315: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-p'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--port'</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">'port name'</span> },
1147
- 316: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-s'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--status'</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">'status, running|finished|aborted|queued|failed'</span> },
1148
- 317: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-t'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--type'</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">'template type'</span> },
1149
- 318: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-u'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--uuid'</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">'template uuid'</span> },
1150
- 319: { <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> }
1151
- 320: ]
1152
- 321:
1153
- 322: <span class="ruby-identifier">cmds</span> = [
1154
- 323: <span class="ruby-value str">&quot;mu cmd_muapi:archive -c &lt;command&gt; -u &lt;uuid&gt;&quot;</span>,
1155
- 324: <span class="ruby-value str">&quot;mu cmd_muapi:backup -c &lt;command&gt; [-n &lt;name&gt;]&quot;</span>,
1156
- 325: <span class="ruby-value str">&quot;mu cmd_muapi:capture -c &lt;command&gt; -p &lt;port&gt; [-u &lt;uuid&gt;]&quot;</span>,
1157
- 326: <span class="ruby-value str">&quot;mu cmd_muapi:delete -u &lt;uuid&gt;&quot;</span>,
1158
- 327: <span class="ruby-value str">&quot;mu cmd_muapi:export_by_type_and_name -t &lt;type&gt; -n &lt;name&gt;&quot;</span>,
1159
- 328: <span class="ruby-value str">&quot;mu cmd_muapi:export_by_uuid -u &lt;uuid&gt;&quot;</span>,
1160
- 329: <span class="ruby-value str">&quot;mu cmd_muapi:get_faults -u &lt;uuid&gt;&quot;</span>,
1161
- 330: <span class="ruby-value str">&quot;mu cmd_muapi:get_name -u &lt;uuid&gt;&quot;</span>,
1162
- 331: <span class="ruby-value str">&quot;mu cmd_muapi:help&quot;</span>,
1163
- 332: <span class="ruby-value str">&quot;mu cmd_muapi:list -t &lt;type&gt;&quot;</span>,
1164
- 333: <span class="ruby-value str">&quot;mu cmd_muapi:list_by_status -s &lt;status&gt;&quot;</span>,
1165
- 334: <span class="ruby-value str">&quot;mu cmd_muapi:pause -u &lt;uuid&gt;&quot;</span>,
1166
- 335: <span class="ruby-value str">&quot;mu cmd_muapi:resume -u &lt;uuid&gt;&quot;</span>,
1167
- 336: <span class="ruby-value str">&quot;mu cmd_muapi:run -u &lt;uuid&gt; [-b rename]&quot;</span>,
1168
- 337: <span class="ruby-value str">&quot;mu cmd_muapi:status -u &lt;uuid&gt;&quot;</span>,
1169
- 338: <span class="ruby-value str">&quot;mu cmd_muapi:stop -u &lt;uuid&gt;&quot;</span>,
1170
- 339: <span class="ruby-value str">&quot;mu cmd_muapi:types&quot;</span>,
1171
- 340: ]
1172
- 341:
1173
- 342: <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> }
1174
- 343: <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> }
1175
- 344: <span class="ruby-identifier">puts</span>
1176
- 345: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Usage: mu cmd_muapi &lt;options&gt;&quot;</span>
1177
- 346: <span class="ruby-identifier">puts</span>
1178
- 347: <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>
1179
- 348: <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>]]
1180
- 349: <span class="ruby-keyword kw">end</span>
1181
- 350: <span class="ruby-identifier">puts</span>
1182
- 351: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Available Commands&quot;</span>
1183
- 352: <span class="ruby-identifier">puts</span>
1184
- 353: <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>
1185
- 354: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
1186
- 355: <span class="ruby-keyword kw">end</span>
1187
- 356: <span class="ruby-identifier">puts</span>
1188
- 357: <span class="ruby-keyword kw">end</span></pre>
1189
- </div>
1190
-
1191
- </div>
1192
-
1193
-
1194
-
1195
-
1196
- </div>
1197
-
1198
-
1199
- <div id="parse-cli-method" class="method-detail ">
1200
- <a name="method-i-parse_cli"></a>
1201
-
1202
- <div class="method-heading">
1203
-
1204
- <span class="method-name">parse_cli</span><span
1205
- class="method-args">(argv)</span>
1206
- <span class="method-click-advice">click to toggle source</span>
1207
-
1208
- </div>
1209
-
1210
- <div class="method-description">
1211
-
1212
-
1213
-
1214
-
1215
-
1216
- <div class="method-source-code"
1217
- id="parse-cli-source">
1218
- <pre>
1219
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 235</span>
1220
- 235: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
1221
- 236: <span class="ruby-identifier">args</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
1222
- 237: <span class="ruby-ivar">@hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
1223
- 238: <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>
1224
- 239: <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>
1225
- 240:
1226
- 241: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
1227
- 242:
1228
- 243: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-b'</span>, <span class="ruby-value str">'--boolean'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1229
- 244: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'boolean'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1230
- 245: <span class="ruby-keyword kw">next</span>
1231
- 246: <span class="ruby-keyword kw">end</span>
1232
- 247:
1233
- 248: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-c'</span>, <span class="ruby-value str">'--command'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1234
- 249: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'command'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1235
- 250: <span class="ruby-keyword kw">next</span>
1236
- 251: <span class="ruby-keyword kw">end</span>
1237
- 252:
1238
- 253: <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>
1239
- 254: <span class="ruby-identifier">help</span>
1240
- 255: <span class="ruby-identifier">exit</span>
1241
- 256: <span class="ruby-keyword kw">end</span>
1242
- 257:
1243
- 258: <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>
1244
- 259: <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>)
1245
- 260: <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>
1246
- 261: <span class="ruby-identifier">@@mu_admin_user</span> = <span class="ruby-node">$1</span>
1247
- 262: <span class="ruby-identifier">@@mu_admin_pass</span> = <span class="ruby-node">$2</span>
1248
- 263: <span class="ruby-identifier">@@mu_ip</span> = <span class="ruby-node">$3</span>
1249
- 264: <span class="ruby-keyword kw">end</span>
1250
- 265: <span class="ruby-keyword kw">next</span>
1251
- 266: <span class="ruby-keyword kw">end</span>
1252
- 267:
1253
- 268: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-n'</span>, <span class="ruby-value str">'--name'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1254
- 269: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'name'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1255
- 270: <span class="ruby-keyword kw">next</span>
1256
- 271: <span class="ruby-keyword kw">end</span>
1257
- 272:
1258
- 273: <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>
1259
- 274: <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>)
1260
- 275: <span class="ruby-keyword kw">next</span>
1261
- 276: <span class="ruby-keyword kw">end</span>
1262
- 277:
1263
- 278: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-p'</span>, <span class="ruby-value str">'--port'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1264
- 279: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'port'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1265
- 280: <span class="ruby-keyword kw">next</span>
1266
- 281: <span class="ruby-keyword kw">end</span>
1267
- 282:
1268
- 283: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-s'</span>, <span class="ruby-value str">'--status'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1269
- 284: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'status'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1270
- 285: <span class="ruby-keyword kw">next</span>
1271
- 286: <span class="ruby-keyword kw">end</span>
1272
- 287:
1273
- 288: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-t'</span>, <span class="ruby-value str">'--type'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1274
- 289: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'type'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1275
- 290: <span class="ruby-keyword kw">next</span>
1276
- 291: <span class="ruby-keyword kw">end</span>
1277
- 292:
1278
- 293: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-u'</span>, <span class="ruby-value str">'--uuid'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1279
- 294: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'uuid'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1280
- 295: <span class="ruby-keyword kw">next</span>
1281
- 296: <span class="ruby-keyword kw">end</span>
1282
- 297:
1283
- 298: <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>
1284
- 299: <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>
1285
- 300: <span class="ruby-keyword kw">next</span>
1286
- 301: <span class="ruby-keyword kw">end</span>
1287
- 302: <span class="ruby-keyword kw">end</span>
1288
- 303:
1289
- 304: <span class="ruby-identifier">args</span>
1290
- 305: <span class="ruby-keyword kw">end</span></pre>
1291
- </div>
1292
-
1293
- </div>
1294
-
1295
-
1296
-
1297
-
1298
- </div>
1299
-
1300
-
1301
- <div id="setup-method" class="method-detail ">
1302
- <a name="method-i-setup"></a>
1303
-
1304
- <div class="method-heading">
1305
-
1306
- <span class="method-name">setup</span><span
1307
- class="method-args">(argv)</span>
1308
- <span class="method-click-advice">click to toggle source</span>
1309
-
1310
- </div>
1311
-
1312
- <div class="method-description">
1313
-
1314
-
1315
-
1316
-
1317
-
1318
- <div class="method-source-code"
1319
- id="setup-source">
1320
- <pre>
1321
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_muapi.rb, line 223</span>
1322
- 223: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1323
- 224: <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
1324
- 225: <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>
1325
- 226: <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>
1326
- 227: <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>
1327
- 228: <span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">&quot;/api/v3&quot;</span>
1328
- 229: <span class="ruby-ivar">@params</span> = <span class="ruby-keyword kw">nil</span>
1329
- 230: <span class="ruby-ivar">@expected_error</span> = <span class="ruby-keyword kw">nil</span>
1330
- 231: <span class="ruby-ivar">@api</span> = <span class="ruby-constant">Muapi</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@username</span>, <span class="ruby-ivar">@password</span>)
1331
- 232: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;Created API object to :#{@host}&quot;</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1332
- 233: <span class="ruby-keyword kw">end</span></pre>
1333
- </div>
1334
-
1335
- </div>
1336
-
1337
-
1338
-
1339
-
1340
- </div>
1341
-
1342
-
1343
- </div>
1344
-
1345
-
1346
- </div>
1347
-
1348
-
1349
- <div id="rdoc-debugging-section-dump" class="debugging-section">
1350
-
1351
- <p>Disabled; run with --debug to generate this.</p>
1352
-
1353
- </div>
1354
-
1355
- <div id="validator-badges">
1356
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1357
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1358
- Rdoc Generator</a> 1.1.6</small>.</p>
1359
- </div>
1360
-
1361
- </body>
1362
- </html>
1363
-