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