mu 5.7.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/Mu_Gem.html +1591 -0
  2. data/bin/mu +11 -0
  3. data/lib/mu.rb +65 -0
  4. data/lib/mu/api/ddt.rb +233 -0
  5. data/lib/mu/api/homepage.rb +54 -0
  6. data/lib/mu/api/muapi.rb +231 -0
  7. data/lib/mu/api/netconfig.rb +233 -0
  8. data/lib/mu/api/scale.rb +199 -0
  9. data/lib/mu/api/system.rb +40 -0
  10. data/lib/mu/client.rb +31 -0
  11. data/lib/mu/command.rb +28 -0
  12. data/lib/mu/command/api.rb +95 -0
  13. data/lib/mu/command/cmd_appid.rb +486 -0
  14. data/lib/mu/command/cmd_cli.rb +151 -0
  15. data/lib/mu/command/cmd_ddt.rb +449 -0
  16. data/lib/mu/command/cmd_homepage.rb +146 -0
  17. data/lib/mu/command/cmd_muapi.rb +361 -0
  18. data/lib/mu/command/cmd_netconfig.rb +262 -0
  19. data/lib/mu/command/cmd_runscale.rb +533 -0
  20. data/lib/mu/command/cmd_runscenario.rb +258 -0
  21. data/lib/mu/command/cmd_runverify.rb +336 -0
  22. data/lib/mu/command/cmd_scale.rb +333 -0
  23. data/lib/mu/command/cmd_system.rb +127 -0
  24. data/lib/mu/command/curl.rb +246 -0
  25. data/lib/mu/command/help.rb +29 -0
  26. data/lib/mu/curl/error.rb +54 -0
  27. data/lib/mu/curl/verify.rb +137 -0
  28. data/lib/mu/helper.rb +55 -0
  29. data/lib/mu/http_helper.rb +232 -0
  30. data/rdoc/classes/Mu.html +305 -0
  31. data/rdoc/classes/Mu/Client.html +265 -0
  32. data/rdoc/classes/Mu/Command.html +208 -0
  33. data/rdoc/classes/Mu/Command/API.html +524 -0
  34. data/rdoc/classes/Mu/Command/Cmd_appid.html +934 -0
  35. data/rdoc/classes/Mu/Command/Cmd_cli.html +515 -0
  36. data/rdoc/classes/Mu/Command/Cmd_ddt.html +1169 -0
  37. data/rdoc/classes/Mu/Command/Cmd_homepage.html +489 -0
  38. data/rdoc/classes/Mu/Command/Cmd_muapi.html +968 -0
  39. data/rdoc/classes/Mu/Command/Cmd_netconfig.html +743 -0
  40. data/rdoc/classes/Mu/Command/Cmd_runscale.html +970 -0
  41. data/rdoc/classes/Mu/Command/Cmd_runscenario.html +530 -0
  42. data/rdoc/classes/Mu/Command/Cmd_runverify.html +621 -0
  43. data/rdoc/classes/Mu/Command/Cmd_scale.html +939 -0
  44. data/rdoc/classes/Mu/Command/Cmd_system.html +426 -0
  45. data/rdoc/classes/Mu/Command/Curl.html +524 -0
  46. data/rdoc/classes/Mu/Command/Help.html +166 -0
  47. data/rdoc/classes/Mu/Curl.html +116 -0
  48. data/rdoc/classes/Mu/Curl/Error.html +157 -0
  49. data/rdoc/classes/Mu/Curl/Error/Authorize.html +178 -0
  50. data/rdoc/classes/Mu/Curl/Error/Connect.html +149 -0
  51. data/rdoc/classes/Mu/Curl/Error/DNS.html +113 -0
  52. data/rdoc/classes/Mu/Curl/Error/Region.html +160 -0
  53. data/rdoc/classes/Mu/Curl/Error/Status.html +149 -0
  54. data/rdoc/classes/Mu/Curl/Error/Timeout.html +149 -0
  55. data/rdoc/classes/Mu/Curl/Verify.html +282 -0
  56. data/rdoc/classes/Mu/Curl/Verify/Request.html +227 -0
  57. data/rdoc/classes/Mu/Curl/Verify/Response.html +187 -0
  58. data/rdoc/classes/Mu/Curl/Verify/Result.html +188 -0
  59. data/rdoc/classes/Mu/Ddt.html +914 -0
  60. data/rdoc/classes/Mu/Helper.html +308 -0
  61. data/rdoc/classes/Mu/Homepage.html +377 -0
  62. data/rdoc/classes/Mu/HttpHelper.html +639 -0
  63. data/rdoc/classes/Mu/Muapi.html +816 -0
  64. data/rdoc/classes/Mu/Netconfig.html +781 -0
  65. data/rdoc/classes/Mu/Scale.html +832 -0
  66. data/rdoc/classes/Mu/System.html +281 -0
  67. data/rdoc/classes/Object.html +148 -0
  68. data/rdoc/classes/TCTestMu.html +1793 -0
  69. data/rdoc/classes/Test.html +107 -0
  70. data/rdoc/classes/Test/Unit.html +107 -0
  71. data/rdoc/classes/Test/Unit/TestCase.html +113 -0
  72. data/rdoc/created.rid +1 -0
  73. data/rdoc/files/lib/mu/api/ddt_rb.html +101 -0
  74. data/rdoc/files/lib/mu/api/homepage_rb.html +101 -0
  75. data/rdoc/files/lib/mu/api/muapi_rb.html +101 -0
  76. data/rdoc/files/lib/mu/api/netconfig_rb.html +101 -0
  77. data/rdoc/files/lib/mu/api/scale_rb.html +101 -0
  78. data/rdoc/files/lib/mu/api/system_rb.html +101 -0
  79. data/rdoc/files/lib/mu/client_rb.html +101 -0
  80. data/rdoc/files/lib/mu/command/api_rb.html +101 -0
  81. data/rdoc/files/lib/mu/command/cmd_appid_rb.html +119 -0
  82. data/rdoc/files/lib/mu/command/cmd_cli_rb.html +108 -0
  83. data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +117 -0
  84. data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +115 -0
  85. data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +116 -0
  86. data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +116 -0
  87. data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +119 -0
  88. data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +115 -0
  89. data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +117 -0
  90. data/rdoc/files/lib/mu/command/cmd_scale_rb.html +115 -0
  91. data/rdoc/files/lib/mu/command/cmd_system_rb.html +116 -0
  92. data/rdoc/files/lib/mu/command/curl_rb.html +101 -0
  93. data/rdoc/files/lib/mu/command/help_rb.html +101 -0
  94. data/rdoc/files/lib/mu/command_rb.html +107 -0
  95. data/rdoc/files/lib/mu/curl/error_rb.html +101 -0
  96. data/rdoc/files/lib/mu/curl/verify_rb.html +101 -0
  97. data/rdoc/files/lib/mu/helper_rb.html +101 -0
  98. data/rdoc/files/lib/mu/http_helper_rb.html +101 -0
  99. data/rdoc/files/lib/mu_rb.html +121 -0
  100. data/rdoc/files/test/helper_rb.html +112 -0
  101. data/rdoc/files/test/tc_test_mu_rb.html +111 -0
  102. data/rdoc/fr_class_index.html +68 -0
  103. data/rdoc/fr_file_index.html +55 -0
  104. data/rdoc/fr_method_index.html +374 -0
  105. data/rdoc/index.html +24 -0
  106. data/rdoc/rdoc-style.css +208 -0
  107. data/test/data/app_id_stats.csv +1 -0
  108. data/test/data/data_cgi.msl +94 -0
  109. data/test/data/data_cgi.xml +322 -0
  110. data/test/data/default_test.csv +3 -0
  111. data/test/data/ftp_with_channel.xml +1643 -0
  112. data/test/data/irc.xml +3837 -0
  113. data/test/data/scale_configuration.json +25 -0
  114. data/test/data/test_data_cgi_error.xml +35 -0
  115. data/test/helper.rb +18 -0
  116. data/test/tc_test_mu.rb +716 -0
  117. metadata +322 -0
@@ -0,0 +1,816 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mu::Muapi</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mu::Muapi</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mu/api/muapi_rb.html">
59
+ lib/mu/api/muapi.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="../Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000098">archive</a>&nbsp;&nbsp;
92
+ <a href="#M000099">backup</a>&nbsp;&nbsp;
93
+ <a href="#M000100">capture</a>&nbsp;&nbsp;
94
+ <a href="#M000091">delete</a>&nbsp;&nbsp;
95
+ <a href="#M000096">export_by_type_and_name</a>&nbsp;&nbsp;
96
+ <a href="#M000097">export_by_uuid</a>&nbsp;&nbsp;
97
+ <a href="#M000092">get_faults</a>&nbsp;&nbsp;
98
+ <a href="#M000093">get_name</a>&nbsp;&nbsp;
99
+ <a href="#M000094">list</a>&nbsp;&nbsp;
100
+ <a href="#M000085">list_by_status</a>&nbsp;&nbsp;
101
+ <a href="#M000084">new</a>&nbsp;&nbsp;
102
+ <a href="#M000089">pause</a>&nbsp;&nbsp;
103
+ <a href="#M000090">resume</a>&nbsp;&nbsp;
104
+ <a href="#M000087">run</a>&nbsp;&nbsp;
105
+ <a href="#M000086">status</a>&nbsp;&nbsp;
106
+ <a href="#M000088">stop</a>&nbsp;&nbsp;
107
+ <a href="#M000095">types</a>&nbsp;&nbsp;
108
+ </div>
109
+ </div>
110
+
111
+ </div>
112
+
113
+
114
+ <!-- if includes -->
115
+ <div id="includes">
116
+ <h3 class="section-bar">Included Modules</h3>
117
+
118
+ <div id="includes-list">
119
+ <span class="include-name"><a href="Helper.html">Helper</a></span>
120
+ </div>
121
+ </div>
122
+
123
+ <div id="section">
124
+
125
+
126
+
127
+
128
+
129
+ <div id="attribute-list">
130
+ <h3 class="section-bar">Attributes</h3>
131
+
132
+ <div class="name-list">
133
+ <table>
134
+ <tr class="top-aligned-row context-row">
135
+ <td class="context-item-name">docroot</td>
136
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
137
+ <td class="context-item-desc"></td>
138
+ </tr>
139
+ <tr class="top-aligned-row context-row">
140
+ <td class="context-item-name">expected_error</td>
141
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
142
+ <td class="context-item-desc"></td>
143
+ </tr>
144
+ <tr class="top-aligned-row context-row">
145
+ <td class="context-item-name">host</td>
146
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
147
+ <td class="context-item-desc"></td>
148
+ </tr>
149
+ <tr class="top-aligned-row context-row">
150
+ <td class="context-item-name">job_id</td>
151
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
152
+ <td class="context-item-desc"></td>
153
+ </tr>
154
+ <tr class="top-aligned-row context-row">
155
+ <td class="context-item-name">params</td>
156
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
157
+ <td class="context-item-desc"></td>
158
+ </tr>
159
+ <tr class="top-aligned-row context-row">
160
+ <td class="context-item-name">password</td>
161
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
162
+ <td class="context-item-desc"></td>
163
+ </tr>
164
+ <tr class="top-aligned-row context-row">
165
+ <td class="context-item-name">posted_uuid</td>
166
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
167
+ <td class="context-item-desc"></td>
168
+ </tr>
169
+ <tr class="top-aligned-row context-row">
170
+ <td class="context-item-name">run_uuid</td>
171
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
172
+ <td class="context-item-desc"></td>
173
+ </tr>
174
+ <tr class="top-aligned-row context-row">
175
+ <td class="context-item-name">username</td>
176
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
177
+ <td class="context-item-desc"></td>
178
+ </tr>
179
+ </table>
180
+ </div>
181
+ </div>
182
+
183
+
184
+
185
+ <!-- if method_list -->
186
+ <div id="methods">
187
+ <h3 class="section-bar">Public Class methods</h3>
188
+
189
+ <div id="method-M000084" class="method-detail">
190
+ <a name="M000084"></a>
191
+
192
+ <div class="method-heading">
193
+ <a href="#M000084" class="method-signature">
194
+ <span class="method-name">new</span><span class="method-args">(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])</span>
195
+ </a>
196
+ </div>
197
+
198
+ <div class="method-description">
199
+ <p><a class="source-toggle" href="#"
200
+ onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
201
+ <div class="method-source-code" id="M000084-source">
202
+ <pre>
203
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 7</span>
204
+ <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>])
205
+ <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
206
+ <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
207
+ <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
208
+ <span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">&quot;/api/v3/&quot;</span>
209
+ <span class="ruby-ivar">@params</span> = <span class="ruby-keyword kw">nil</span>
210
+ <span class="ruby-ivar">@expected_error</span> = <span class="ruby-keyword kw">nil</span>
211
+ <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>)
212
+ <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>
213
+ <span class="ruby-keyword kw">end</span>
214
+ </pre>
215
+ </div>
216
+ </div>
217
+ </div>
218
+
219
+ <h3 class="section-bar">Public Instance methods</h3>
220
+
221
+ <div id="method-M000098" class="method-detail">
222
+ <a name="M000098"></a>
223
+
224
+ <div class="method-heading">
225
+ <a href="#M000098" class="method-signature">
226
+ <span class="method-name">archive</span><span class="method-args">(command=&quot;run&quot;, id=@run_uuid)</span>
227
+ </a>
228
+ </div>
229
+
230
+ <div class="method-description">
231
+ <p>
232
+ performs <a href="Muapi.html#M000098">archive</a> operations
233
+ </p>
234
+ <pre>
235
+ * command=run to create a test archive
236
+ * command=status to view the status of a test archive job
237
+ * command=get to download a test archive job
238
+ * uuid = the uuid of the test
239
+ </pre>
240
+ <p><a class="source-toggle" href="#"
241
+ onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
242
+ <div class="method-source-code" id="M000098-source">
243
+ <pre>
244
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 157</span>
245
+ <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>)
246
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">command</span>
247
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'run'</span>
248
+ <span class="ruby-identifier">request_string</span> = <span class="ruby-node">&quot;archive/run?uuid=#{id}&quot;</span>
249
+ <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>
250
+ <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>)
251
+ <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>
252
+ <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>)
253
+ <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;job_id = #{@job_id}&quot;</span>
254
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@job_id</span>
255
+ <span class="ruby-keyword kw">end</span>
256
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
257
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'status'</span>
258
+ <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>)
259
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
260
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'get'</span>
261
+ <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>)
262
+ <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;#{id}.zip file size = #{file_size}&quot;</span>
263
+ <span class="ruby-keyword kw">end</span>
264
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
265
+ <span class="ruby-keyword kw">end</span>
266
+ </pre>
267
+ </div>
268
+ </div>
269
+ </div>
270
+
271
+ <div id="method-M000099" class="method-detail">
272
+ <a name="M000099"></a>
273
+
274
+ <div class="method-heading">
275
+ <a href="#M000099" class="method-signature">
276
+ <span class="method-name">backup</span><span class="method-args">(command=&quot;run&quot;, name=&quot;&quot;)</span>
277
+ </a>
278
+ </div>
279
+
280
+ <div class="method-description">
281
+ <p>
282
+ performs <a href="Muapi.html#M000099">backup</a> operations
283
+ </p>
284
+ <pre>
285
+ * command=run to create a system backup file.
286
+ * command=status to view the status of a backup job. If no backup job is running, gets the date of the most recent backup.
287
+ * command=get to retrieve the backup file
288
+ * name = backup file name
289
+ </pre>
290
+ <p><a class="source-toggle" href="#"
291
+ onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
292
+ <div class="method-source-code" id="M000099-source">
293
+ <pre>
294
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 184</span>
295
+ <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>)
296
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">command</span>
297
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'run'</span>
298
+ <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>)
299
+ <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>
300
+ <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>)
301
+ <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;job_id = #{@job_id}&quot;</span>
302
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@job_id</span>
303
+ <span class="ruby-keyword kw">end</span>
304
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
305
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'status'</span>
306
+ <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>)
307
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
308
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'get'</span>
309
+ <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>)
310
+ <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;#{name}.dat file size = #{file_size}&quot;</span>
311
+ <span class="ruby-keyword kw">end</span>
312
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
313
+ <span class="ruby-keyword kw">end</span>
314
+ </pre>
315
+ </div>
316
+ </div>
317
+ </div>
318
+
319
+ <div id="method-M000100" class="method-detail">
320
+ <a name="M000100"></a>
321
+
322
+ <div class="method-heading">
323
+ <a href="#M000100" class="method-signature">
324
+ <span class="method-name">capture</span><span class="method-args">(command='run', port='a1', id=@job_id)</span>
325
+ </a>
326
+ </div>
327
+
328
+ <div class="method-description">
329
+ <p>
330
+ packet <a href="Muapi.html#M000100">capture</a> operations
331
+ </p>
332
+ <pre>
333
+ * command=run to start capturing packets on the specified Mu appliance port
334
+ * command=status tp view the status of packet capture activity
335
+ * command=get to download the pcap file generated during packet capture
336
+ * port = the Mu appliance port
337
+ * id = job_id for status and get commands
338
+ </pre>
339
+ <p><a class="source-toggle" href="#"
340
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
341
+ <div class="method-source-code" id="M000100-source">
342
+ <pre>
343
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 210</span>
344
+ <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>)
345
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">command</span>
346
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'run'</span>
347
+ <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>)
348
+ <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>
349
+ <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>)
350
+ <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;job_id = #{@job_id}&quot;</span>
351
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@job_id</span>
352
+ <span class="ruby-keyword kw">end</span>
353
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
354
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'status'</span>
355
+ <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>)
356
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
357
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'get'</span>
358
+ <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>)
359
+ <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;#{id}.pcap file size = #{file_size}&quot;</span>
360
+ <span class="ruby-keyword kw">end</span>
361
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
362
+ <span class="ruby-keyword kw">end</span>
363
+ </pre>
364
+ </div>
365
+ </div>
366
+ </div>
367
+
368
+ <div id="method-M000091" class="method-detail">
369
+ <a name="M000091"></a>
370
+
371
+ <div class="method-heading">
372
+ <a href="#M000091" class="method-signature">
373
+ <span class="method-name">delete</span><span class="method-args">(uuid=@run_uuid)</span>
374
+ </a>
375
+ </div>
376
+
377
+ <div class="method-description">
378
+ <p>
379
+ deletes the specified test
380
+ </p>
381
+ <pre>
382
+ * uuid = the uuid of the test
383
+ </pre>
384
+ <p><a class="source-toggle" href="#"
385
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
386
+ <div class="method-source-code" id="M000091-source">
387
+ <pre>
388
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 95</span>
389
+ <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>)
390
+ <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>)
391
+ <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>
392
+ <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>)
393
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
394
+ <span class="ruby-keyword kw">end</span>
395
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
396
+ <span class="ruby-keyword kw">end</span>
397
+ </pre>
398
+ </div>
399
+ </div>
400
+ </div>
401
+
402
+ <div id="method-M000096" class="method-detail">
403
+ <a name="M000096"></a>
404
+
405
+ <div class="method-heading">
406
+ <a href="#M000096" class="method-signature">
407
+ <span class="method-name">export_by_type_and_name</span><span class="method-args">(type, name)</span>
408
+ </a>
409
+ </div>
410
+
411
+ <div class="method-description">
412
+ <p>
413
+ exports a template from the <a href="../Mu.html">Mu</a> system using the
414
+ template type and template name
415
+ </p>
416
+ <pre>
417
+ * name = the template name
418
+ </pre>
419
+ <p><a class="source-toggle" href="#"
420
+ onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
421
+ <div class="method-source-code" id="M000096-source">
422
+ <pre>
423
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 142</span>
424
+ <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>)
425
+ <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>)
426
+ <span class="ruby-keyword kw">end</span>
427
+ </pre>
428
+ </div>
429
+ </div>
430
+ </div>
431
+
432
+ <div id="method-M000097" class="method-detail">
433
+ <a name="M000097"></a>
434
+
435
+ <div class="method-heading">
436
+ <a href="#M000097" class="method-signature">
437
+ <span class="method-name">export_by_uuid</span><span class="method-args">(uuid)</span>
438
+ </a>
439
+ </div>
440
+
441
+ <div class="method-description">
442
+ <p>
443
+ exports a template from the <a href="../Mu.html">Mu</a> system using the
444
+ template uuid
445
+ </p>
446
+ <pre>
447
+ * uuid = the template uuid
448
+ </pre>
449
+ <p><a class="source-toggle" href="#"
450
+ onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
451
+ <div class="method-source-code" id="M000097-source">
452
+ <pre>
453
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 148</span>
454
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">export_by_uuid</span>(<span class="ruby-identifier">uuid</span>)
455
+ <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>)
456
+ <span class="ruby-keyword kw">end</span>
457
+ </pre>
458
+ </div>
459
+ </div>
460
+ </div>
461
+
462
+ <div id="method-M000092" class="method-detail">
463
+ <a name="M000092"></a>
464
+
465
+ <div class="method-heading">
466
+ <a href="#M000092" class="method-signature">
467
+ <span class="method-name">get_faults</span><span class="method-args">(uuid=@run_uuid)</span>
468
+ </a>
469
+ </div>
470
+
471
+ <div class="method-description">
472
+ <p>
473
+ returns a <a href="Muapi.html#M000094">list</a> of faults from the
474
+ specified test
475
+ </p>
476
+ <pre>
477
+ * uuid = the uuid of the test
478
+ </pre>
479
+ <p><a class="source-toggle" href="#"
480
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
481
+ <div class="method-source-code" id="M000092-source">
482
+ <pre>
483
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 106</span>
484
+ <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>)
485
+ <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>)
486
+ <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>
487
+ <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>)
488
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">faults</span>
489
+ <span class="ruby-keyword kw">end</span>
490
+ <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;error: no analysis with uuid: #{uuid} found&quot;</span>
491
+ <span class="ruby-keyword kw">end</span>
492
+ </pre>
493
+ </div>
494
+ </div>
495
+ </div>
496
+
497
+ <div id="method-M000093" class="method-detail">
498
+ <a name="M000093"></a>
499
+
500
+ <div class="method-heading">
501
+ <a href="#M000093" class="method-signature">
502
+ <span class="method-name">get_name</span><span class="method-args">(uuid=@run_uuid)</span>
503
+ </a>
504
+ </div>
505
+
506
+ <div class="method-description">
507
+ <p>
508
+ returns the name of an test
509
+ </p>
510
+ <pre>
511
+ * uuid = the uuid of the test
512
+ </pre>
513
+ <p><a class="source-toggle" href="#"
514
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
515
+ <div class="method-source-code" id="M000093-source">
516
+ <pre>
517
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 117</span>
518
+ <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>)
519
+ <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>)
520
+ <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>
521
+ <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>)
522
+ <span class="ruby-keyword kw">end</span>
523
+ <span class="ruby-keyword kw">return</span>
524
+ <span class="ruby-keyword kw">end</span>
525
+ </pre>
526
+ </div>
527
+ </div>
528
+ </div>
529
+
530
+ <div id="method-M000094" class="method-detail">
531
+ <a name="M000094"></a>
532
+
533
+ <div class="method-heading">
534
+ <a href="#M000094" class="method-signature">
535
+ <span class="method-name">list</span><span class="method-args">(type)</span>
536
+ </a>
537
+ </div>
538
+
539
+ <div class="method-description">
540
+ <p>
541
+ lists the templates on the <a href="../Mu.html">Mu</a> system using the
542
+ template type and template name:
543
+ </p>
544
+ <pre>
545
+ * type = the template type, such as 'scenario' or 'monitor'
546
+ </pre>
547
+ <p><a class="source-toggle" href="#"
548
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
549
+ <div class="method-source-code" id="M000094-source">
550
+ <pre>
551
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 127</span>
552
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-identifier">type</span>)
553
+ <span class="ruby-identifier">names</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
554
+ <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>)
555
+ <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>) }
556
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">names</span>
557
+ <span class="ruby-keyword kw">end</span>
558
+ </pre>
559
+ </div>
560
+ </div>
561
+ </div>
562
+
563
+ <div id="method-M000085" class="method-detail">
564
+ <a name="M000085"></a>
565
+
566
+ <div class="method-heading">
567
+ <a href="#M000085" class="method-signature">
568
+ <span class="method-name">list_by_status</span><span class="method-args">(status=&quot;&quot;)</span>
569
+ </a>
570
+ </div>
571
+
572
+ <div class="method-description">
573
+ <p>
574
+ lists the statuses of tests
575
+ </p>
576
+ <pre>
577
+ * status = the status type, such as 'running' or 'failed'
578
+ </pre>
579
+ <p><a class="source-toggle" href="#"
580
+ onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
581
+ <div class="method-source-code" id="M000085-source">
582
+ <pre>
583
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 20</span>
584
+ <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>)
585
+ <span class="ruby-identifier">uuid_list</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>()
586
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">empty?</span>
587
+ <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>)
588
+ <span class="ruby-keyword kw">else</span>
589
+ <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>)
590
+ <span class="ruby-keyword kw">end</span>
591
+ <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>
592
+ <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>) }
593
+ <span class="ruby-keyword kw">end</span>
594
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uuid_list</span>
595
+ <span class="ruby-keyword kw">end</span>
596
+ </pre>
597
+ </div>
598
+ </div>
599
+ </div>
600
+
601
+ <div id="method-M000089" class="method-detail">
602
+ <a name="M000089"></a>
603
+
604
+ <div class="method-heading">
605
+ <a href="#M000089" class="method-signature">
606
+ <span class="method-name">pause</span><span class="method-args">(uuid=@run_uuid)</span>
607
+ </a>
608
+ </div>
609
+
610
+ <div class="method-description">
611
+ <p>
612
+ pauses a running test
613
+ </p>
614
+ <pre>
615
+ * uuid = the uuid of the test
616
+ </pre>
617
+ <p><a class="source-toggle" href="#"
618
+ onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
619
+ <div class="method-source-code" id="M000089-source">
620
+ <pre>
621
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 73</span>
622
+ <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>)
623
+ <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>)
624
+ <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>
625
+ <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>)
626
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
627
+ <span class="ruby-keyword kw">end</span>
628
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
629
+ <span class="ruby-keyword kw">end</span>
630
+ </pre>
631
+ </div>
632
+ </div>
633
+ </div>
634
+
635
+ <div id="method-M000090" class="method-detail">
636
+ <a name="M000090"></a>
637
+
638
+ <div class="method-heading">
639
+ <a href="#M000090" class="method-signature">
640
+ <span class="method-name">resume</span><span class="method-args">(uuid=@run_uuid)</span>
641
+ </a>
642
+ </div>
643
+
644
+ <div class="method-description">
645
+ <p>
646
+ resumes a suspended test
647
+ </p>
648
+ <pre>
649
+ * uuid = the uuid of the test
650
+ </pre>
651
+ <p><a class="source-toggle" href="#"
652
+ onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
653
+ <div class="method-source-code" id="M000090-source">
654
+ <pre>
655
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 84</span>
656
+ <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>)
657
+ <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>)
658
+ <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>
659
+ <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>)
660
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
661
+ <span class="ruby-keyword kw">end</span>
662
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
663
+ <span class="ruby-keyword kw">end</span>
664
+ </pre>
665
+ </div>
666
+ </div>
667
+ </div>
668
+
669
+ <div id="method-M000087" class="method-detail">
670
+ <a name="M000087"></a>
671
+
672
+ <div class="method-heading">
673
+ <a href="#M000087" class="method-signature">
674
+ <span class="method-name">run</span><span class="method-args">(uuid, rename=&quot;&quot;)</span>
675
+ </a>
676
+ </div>
677
+
678
+ <div class="method-description">
679
+ <p>
680
+ starts a test
681
+ </p>
682
+ <pre>
683
+ * uuid = the uuid of the test
684
+ </pre>
685
+ <p><a class="source-toggle" href="#"
686
+ onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
687
+ <div class="method-source-code" id="M000087-source">
688
+ <pre>
689
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 47</span>
690
+ <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>)
691
+ <span class="ruby-identifier">req</span> = <span class="ruby-node">&quot;analysis/run?uuid=#{uuid}&quot;</span>
692
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">rename</span>.<span class="ruby-identifier">empty?</span>
693
+ <span class="ruby-identifier">req</span> = <span class="ruby-node">&quot;#{req}&amp;rename=#{rename}&quot;</span>
694
+ <span class="ruby-keyword kw">end</span>
695
+ <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>)
696
+ <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>
697
+ <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>)
698
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@run_uuid</span>
699
+ <span class="ruby-keyword kw">end</span>
700
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@run_uuid</span>
701
+ <span class="ruby-keyword kw">end</span>
702
+ </pre>
703
+ </div>
704
+ </div>
705
+ </div>
706
+
707
+ <div id="method-M000086" class="method-detail">
708
+ <a name="M000086"></a>
709
+
710
+ <div class="method-heading">
711
+ <a href="#M000086" class="method-signature">
712
+ <span class="method-name">status</span><span class="method-args">(uuid=@run_uuid)</span>
713
+ </a>
714
+ </div>
715
+
716
+ <div class="method-description">
717
+ <p>
718
+ returns the <a href="Muapi.html#M000086">status</a> of a test
719
+ </p>
720
+ <pre>
721
+ * uuid = the uuid of the test
722
+ </pre>
723
+ <p><a class="source-toggle" href="#"
724
+ onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
725
+ <div class="method-source-code" id="M000086-source">
726
+ <pre>
727
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 35</span>
728
+ <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>)
729
+ <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>)
730
+ <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>
731
+ <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>
732
+ <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>
733
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
734
+ <span class="ruby-keyword kw">end</span>
735
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
736
+ <span class="ruby-keyword kw">end</span>
737
+ </pre>
738
+ </div>
739
+ </div>
740
+ </div>
741
+
742
+ <div id="method-M000088" class="method-detail">
743
+ <a name="M000088"></a>
744
+
745
+ <div class="method-heading">
746
+ <a href="#M000088" class="method-signature">
747
+ <span class="method-name">stop</span><span class="method-args">(uuid=@run_uuid)</span>
748
+ </a>
749
+ </div>
750
+
751
+ <div class="method-description">
752
+ <p>
753
+ stops a running test
754
+ </p>
755
+ <pre>
756
+ * uuid = the uuid of the test
757
+ </pre>
758
+ <p><a class="source-toggle" href="#"
759
+ onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
760
+ <div class="method-source-code" id="M000088-source">
761
+ <pre>
762
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 62</span>
763
+ <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>)
764
+ <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>)
765
+ <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>
766
+ <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>)
767
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
768
+ <span class="ruby-keyword kw">end</span>
769
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
770
+ <span class="ruby-keyword kw">end</span>
771
+ </pre>
772
+ </div>
773
+ </div>
774
+ </div>
775
+
776
+ <div id="method-M000095" class="method-detail">
777
+ <a name="M000095"></a>
778
+
779
+ <div class="method-heading">
780
+ <a href="#M000095" class="method-signature">
781
+ <span class="method-name">types</span><span class="method-args">()</span>
782
+ </a>
783
+ </div>
784
+
785
+ <div class="method-description">
786
+ <p>
787
+ lists the <a href="Muapi.html#M000095">types</a> of templates on the <a
788
+ href="../Mu.html">Mu</a> system
789
+ </p>
790
+ <p><a class="source-toggle" href="#"
791
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
792
+ <div class="method-source-code" id="M000095-source">
793
+ <pre>
794
+ <span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 135</span>
795
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">types</span>
796
+ <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>)
797
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
798
+ <span class="ruby-keyword kw">end</span>
799
+ </pre>
800
+ </div>
801
+ </div>
802
+ </div>
803
+
804
+
805
+ </div>
806
+
807
+
808
+ </div>
809
+
810
+
811
+ <div id="validator-badges">
812
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
813
+ </div>
814
+
815
+ </body>
816
+ </html>