mu 5.7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Mu_Gem.html +1591 -0
- data/bin/mu +11 -0
- data/lib/mu.rb +65 -0
- data/lib/mu/api/ddt.rb +233 -0
- data/lib/mu/api/homepage.rb +54 -0
- data/lib/mu/api/muapi.rb +231 -0
- data/lib/mu/api/netconfig.rb +233 -0
- data/lib/mu/api/scale.rb +199 -0
- data/lib/mu/api/system.rb +40 -0
- data/lib/mu/client.rb +31 -0
- data/lib/mu/command.rb +28 -0
- data/lib/mu/command/api.rb +95 -0
- data/lib/mu/command/cmd_appid.rb +486 -0
- data/lib/mu/command/cmd_cli.rb +151 -0
- data/lib/mu/command/cmd_ddt.rb +449 -0
- data/lib/mu/command/cmd_homepage.rb +146 -0
- data/lib/mu/command/cmd_muapi.rb +361 -0
- data/lib/mu/command/cmd_netconfig.rb +262 -0
- data/lib/mu/command/cmd_runscale.rb +533 -0
- data/lib/mu/command/cmd_runscenario.rb +258 -0
- data/lib/mu/command/cmd_runverify.rb +336 -0
- data/lib/mu/command/cmd_scale.rb +333 -0
- data/lib/mu/command/cmd_system.rb +127 -0
- data/lib/mu/command/curl.rb +246 -0
- data/lib/mu/command/help.rb +29 -0
- data/lib/mu/curl/error.rb +54 -0
- data/lib/mu/curl/verify.rb +137 -0
- data/lib/mu/helper.rb +55 -0
- data/lib/mu/http_helper.rb +232 -0
- data/rdoc/classes/Mu.html +305 -0
- data/rdoc/classes/Mu/Client.html +265 -0
- data/rdoc/classes/Mu/Command.html +208 -0
- data/rdoc/classes/Mu/Command/API.html +524 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.html +934 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.html +515 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.html +1169 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.html +489 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.html +968 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +743 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +970 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.html +530 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.html +621 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.html +939 -0
- data/rdoc/classes/Mu/Command/Cmd_system.html +426 -0
- data/rdoc/classes/Mu/Command/Curl.html +524 -0
- data/rdoc/classes/Mu/Command/Help.html +166 -0
- data/rdoc/classes/Mu/Curl.html +116 -0
- data/rdoc/classes/Mu/Curl/Error.html +157 -0
- data/rdoc/classes/Mu/Curl/Error/Authorize.html +178 -0
- data/rdoc/classes/Mu/Curl/Error/Connect.html +149 -0
- data/rdoc/classes/Mu/Curl/Error/DNS.html +113 -0
- data/rdoc/classes/Mu/Curl/Error/Region.html +160 -0
- data/rdoc/classes/Mu/Curl/Error/Status.html +149 -0
- data/rdoc/classes/Mu/Curl/Error/Timeout.html +149 -0
- data/rdoc/classes/Mu/Curl/Verify.html +282 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.html +227 -0
- data/rdoc/classes/Mu/Curl/Verify/Response.html +187 -0
- data/rdoc/classes/Mu/Curl/Verify/Result.html +188 -0
- data/rdoc/classes/Mu/Ddt.html +914 -0
- data/rdoc/classes/Mu/Helper.html +308 -0
- data/rdoc/classes/Mu/Homepage.html +377 -0
- data/rdoc/classes/Mu/HttpHelper.html +639 -0
- data/rdoc/classes/Mu/Muapi.html +816 -0
- data/rdoc/classes/Mu/Netconfig.html +781 -0
- data/rdoc/classes/Mu/Scale.html +832 -0
- data/rdoc/classes/Mu/System.html +281 -0
- data/rdoc/classes/Object.html +148 -0
- data/rdoc/classes/TCTestMu.html +1793 -0
- data/rdoc/classes/Test.html +107 -0
- data/rdoc/classes/Test/Unit.html +107 -0
- data/rdoc/classes/Test/Unit/TestCase.html +113 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/lib/mu/api/ddt_rb.html +101 -0
- data/rdoc/files/lib/mu/api/homepage_rb.html +101 -0
- data/rdoc/files/lib/mu/api/muapi_rb.html +101 -0
- data/rdoc/files/lib/mu/api/netconfig_rb.html +101 -0
- data/rdoc/files/lib/mu/api/scale_rb.html +101 -0
- data/rdoc/files/lib/mu/api/system_rb.html +101 -0
- data/rdoc/files/lib/mu/client_rb.html +101 -0
- data/rdoc/files/lib/mu/command/api_rb.html +101 -0
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +119 -0
- data/rdoc/files/lib/mu/command/cmd_cli_rb.html +108 -0
- data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +117 -0
- data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +115 -0
- data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +116 -0
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +116 -0
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +119 -0
- data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +115 -0
- data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +117 -0
- data/rdoc/files/lib/mu/command/cmd_scale_rb.html +115 -0
- data/rdoc/files/lib/mu/command/cmd_system_rb.html +116 -0
- data/rdoc/files/lib/mu/command/curl_rb.html +101 -0
- data/rdoc/files/lib/mu/command/help_rb.html +101 -0
- data/rdoc/files/lib/mu/command_rb.html +107 -0
- data/rdoc/files/lib/mu/curl/error_rb.html +101 -0
- data/rdoc/files/lib/mu/curl/verify_rb.html +101 -0
- data/rdoc/files/lib/mu/helper_rb.html +101 -0
- data/rdoc/files/lib/mu/http_helper_rb.html +101 -0
- data/rdoc/files/lib/mu_rb.html +121 -0
- data/rdoc/files/test/helper_rb.html +112 -0
- data/rdoc/files/test/tc_test_mu_rb.html +111 -0
- data/rdoc/fr_class_index.html +68 -0
- data/rdoc/fr_file_index.html +55 -0
- data/rdoc/fr_method_index.html +374 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/test/data/app_id_stats.csv +1 -0
- data/test/data/data_cgi.msl +94 -0
- data/test/data/data_cgi.xml +322 -0
- data/test/data/default_test.csv +3 -0
- data/test/data/ftp_with_channel.xml +1643 -0
- data/test/data/irc.xml +3837 -0
- data/test/data/scale_configuration.json +25 -0
- data/test/data/test_data_cgi_error.xml +35 -0
- data/test/helper.rb +18 -0
- data/test/tc_test_mu.rb +716 -0
- metadata +322 -0
|
@@ -0,0 +1,832 @@
|
|
|
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::Scale</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::Scale</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/mu/api/scale_rb.html">
|
|
59
|
+
lib/mu/api/scale.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="#M000337">about</a>
|
|
92
|
+
<a href="#M000331">configure</a>
|
|
93
|
+
<a href="#M000340">data</a>
|
|
94
|
+
<a href="#M000346">delete_scale_engine</a>
|
|
95
|
+
<a href="#M000347">get</a>
|
|
96
|
+
<a href="#M000336">list</a>
|
|
97
|
+
<a href="#M000329">new</a>
|
|
98
|
+
<a href="#M000341">pattern</a>
|
|
99
|
+
<a href="#M000338">pcap</a>
|
|
100
|
+
<a href="#M000348">post</a>
|
|
101
|
+
<a href="#M000343">release</a>
|
|
102
|
+
<a href="#M000345">release_scale_engine</a>
|
|
103
|
+
<a href="#M000344">reserve_scale_engine</a>
|
|
104
|
+
<a href="#M000330">session</a>
|
|
105
|
+
<a href="#M000332">start</a>
|
|
106
|
+
<a href="#M000335">status</a>
|
|
107
|
+
<a href="#M000339">statuses</a>
|
|
108
|
+
<a href="#M000342">stop</a>
|
|
109
|
+
<a href="#M000334">update</a>
|
|
110
|
+
<a href="#M000333">verify</a>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<!-- if includes -->
|
|
118
|
+
<div id="includes">
|
|
119
|
+
<h3 class="section-bar">Included Modules</h3>
|
|
120
|
+
|
|
121
|
+
<div id="includes-list">
|
|
122
|
+
<span class="include-name"><a href="Helper.html">Helper</a></span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div id="section">
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<div id="attribute-list">
|
|
133
|
+
<h3 class="section-bar">Attributes</h3>
|
|
134
|
+
|
|
135
|
+
<div class="name-list">
|
|
136
|
+
<table>
|
|
137
|
+
<tr class="top-aligned-row context-row">
|
|
138
|
+
<td class="context-item-name">config_file</td>
|
|
139
|
+
<td class="context-item-value"> [RW] </td>
|
|
140
|
+
<td class="context-item-desc"></td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr class="top-aligned-row context-row">
|
|
143
|
+
<td class="context-item-name">configuration</td>
|
|
144
|
+
<td class="context-item-value"> [RW] </td>
|
|
145
|
+
<td class="context-item-desc"></td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr class="top-aligned-row context-row">
|
|
148
|
+
<td class="context-item-name">docroot</td>
|
|
149
|
+
<td class="context-item-value"> [RW] </td>
|
|
150
|
+
<td class="context-item-desc"></td>
|
|
151
|
+
</tr>
|
|
152
|
+
<tr class="top-aligned-row context-row">
|
|
153
|
+
<td class="context-item-name">host</td>
|
|
154
|
+
<td class="context-item-value"> [RW] </td>
|
|
155
|
+
<td class="context-item-desc"></td>
|
|
156
|
+
</tr>
|
|
157
|
+
<tr class="top-aligned-row context-row">
|
|
158
|
+
<td class="context-item-name">password</td>
|
|
159
|
+
<td class="context-item-value"> [RW] </td>
|
|
160
|
+
<td class="context-item-desc"></td>
|
|
161
|
+
</tr>
|
|
162
|
+
<tr class="top-aligned-row context-row">
|
|
163
|
+
<td class="context-item-name">username</td>
|
|
164
|
+
<td class="context-item-value"> [RW] </td>
|
|
165
|
+
<td class="context-item-desc"></td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr class="top-aligned-row context-row">
|
|
168
|
+
<td class="context-item-name">uuid</td>
|
|
169
|
+
<td class="context-item-value"> [RW] </td>
|
|
170
|
+
<td class="context-item-desc"></td>
|
|
171
|
+
</tr>
|
|
172
|
+
</table>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<!-- if method_list -->
|
|
179
|
+
<div id="methods">
|
|
180
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
181
|
+
|
|
182
|
+
<div id="method-M000329" class="method-detail">
|
|
183
|
+
<a name="M000329"></a>
|
|
184
|
+
|
|
185
|
+
<div class="method-heading">
|
|
186
|
+
<a href="#M000329" class="method-signature">
|
|
187
|
+
<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>
|
|
188
|
+
</a>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<div class="method-description">
|
|
192
|
+
<p><a class="source-toggle" href="#"
|
|
193
|
+
onclick="toggleCode('M000329-source');return false;">[Source]</a></p>
|
|
194
|
+
<div class="method-source-code" id="M000329-source">
|
|
195
|
+
<pre>
|
|
196
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 7</span>
|
|
197
|
+
<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>])
|
|
198
|
+
<span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
199
|
+
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
200
|
+
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
201
|
+
<span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">"/api/v5/scale/"</span>
|
|
202
|
+
<span class="ruby-ivar">@uuid</span> = <span class="ruby-keyword kw">nil</span>
|
|
203
|
+
<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>)
|
|
204
|
+
<span class="ruby-ivar">@config_file</span> = (<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'SCALE_CONFIG_FILE'</span>].<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">"scale.json"</span> <span class="ruby-operator">:</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'SCALE_CONFIG_FILE'</span>]
|
|
205
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span> <span class="ruby-ivar">@config_file</span>
|
|
206
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"reading config file: #{@config_file}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
207
|
+
<span class="ruby-ivar">@configuration</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@config_file</span>)
|
|
208
|
+
<span class="ruby-keyword kw">else</span>
|
|
209
|
+
<span class="ruby-ivar">@configuration</span> = {
|
|
210
|
+
<span class="ruby-value str">"hosts"</span>=<span class="ruby-operator">></span> {
|
|
211
|
+
<span class="ruby-value str">"host_0"</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"a1/*"</span>,
|
|
212
|
+
<span class="ruby-value str">"host_1"</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"a2/*"</span>
|
|
213
|
+
},
|
|
214
|
+
<span class="ruby-value str">"timeout"</span>=<span class="ruby-operator">></span> <span class="ruby-value">5000</span>,
|
|
215
|
+
<span class="ruby-value str">"delay"</span>=<span class="ruby-operator">></span> <span class="ruby-value">0</span>,
|
|
216
|
+
<span class="ruby-value str">"volume"</span>=<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
|
217
|
+
<span class="ruby-value str">"holdConcurrency"</span>=<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>,
|
|
218
|
+
<span class="ruby-value str">"limitConcurrency"</span>=<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>,
|
|
219
|
+
<span class="ruby-value str">"vectorAddressPairing"</span>=<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>,
|
|
220
|
+
<span class="ruby-value str">"musl"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>,
|
|
221
|
+
<span class="ruby-value str">"csv"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>,
|
|
222
|
+
<span class="ruby-value str">"pattern"</span> =<span class="ruby-operator">></span> {}
|
|
223
|
+
}
|
|
224
|
+
<span class="ruby-keyword kw">end</span>
|
|
225
|
+
<span class="ruby-ivar">@uuid</span> = <span class="ruby-identifier">session</span>
|
|
226
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Created Scale Api session [#{@uuid}] on :#{@host}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
227
|
+
<span class="ruby-keyword kw">end</span>
|
|
228
|
+
</pre>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
234
|
+
|
|
235
|
+
<div id="method-M000337" class="method-detail">
|
|
236
|
+
<a name="M000337"></a>
|
|
237
|
+
|
|
238
|
+
<div class="method-heading">
|
|
239
|
+
<a href="#M000337" class="method-signature">
|
|
240
|
+
<span class="method-name">about</span><span class="method-args">()</span>
|
|
241
|
+
</a>
|
|
242
|
+
</div>
|
|
243
|
+
|
|
244
|
+
<div class="method-description">
|
|
245
|
+
<p>
|
|
246
|
+
lists information <a href="Scale.html#M000337">about</a> the the <a
|
|
247
|
+
href="Scale.html">Scale</a> Player and all active and inactive <a
|
|
248
|
+
href="Scale.html">Scale</a> Engines
|
|
249
|
+
</p>
|
|
250
|
+
<p><a class="source-toggle" href="#"
|
|
251
|
+
onclick="toggleCode('M000337-source');return false;">[Source]</a></p>
|
|
252
|
+
<div class="method-source-code" id="M000337-source">
|
|
253
|
+
<pre>
|
|
254
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 101</span>
|
|
255
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">about</span>
|
|
256
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"about"</span>
|
|
257
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
258
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
259
|
+
<span class="ruby-keyword kw">end</span>
|
|
260
|
+
</pre>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
<div id="method-M000331" class="method-detail">
|
|
266
|
+
<a name="M000331"></a>
|
|
267
|
+
|
|
268
|
+
<div class="method-heading">
|
|
269
|
+
<a href="#M000331" class="method-signature">
|
|
270
|
+
<span class="method-name">configure</span><span class="method-args">(param, value)</span>
|
|
271
|
+
</a>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
<div class="method-description">
|
|
275
|
+
<p>
|
|
276
|
+
configures a parameter in the class @configuration object
|
|
277
|
+
</p>
|
|
278
|
+
<pre>
|
|
279
|
+
* param = the parameter to configure (e.g. volume)
|
|
280
|
+
* value = the parameter's value ( e.g. 100)
|
|
281
|
+
</pre>
|
|
282
|
+
<p><a class="source-toggle" href="#"
|
|
283
|
+
onclick="toggleCode('M000331-source');return false;">[Source]</a></p>
|
|
284
|
+
<div class="method-source-code" id="M000331-source">
|
|
285
|
+
<pre>
|
|
286
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 56</span>
|
|
287
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>(<span class="ruby-identifier">param</span>, <span class="ruby-identifier">value</span>)
|
|
288
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">param</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"pattern"</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
|
289
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">value</span>)
|
|
290
|
+
<span class="ruby-keyword kw">end</span>
|
|
291
|
+
<span class="ruby-ivar">@configuration</span>[<span class="ruby-identifier">param</span>] = <span class="ruby-identifier">value</span>
|
|
292
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">"scale_configuration.json"</span>,<span class="ruby-value str">'w'</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-ivar">@configuration</span>))}
|
|
293
|
+
<span class="ruby-keyword kw">end</span>
|
|
294
|
+
</pre>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
<div id="method-M000340" class="method-detail">
|
|
300
|
+
<a name="M000340"></a>
|
|
301
|
+
|
|
302
|
+
<div class="method-heading">
|
|
303
|
+
<a href="#M000340" class="method-signature">
|
|
304
|
+
<span class="method-name">data</span><span class="method-args">(view='TIMELINE', zoom="0", position="0", bot_id="")</span>
|
|
305
|
+
</a>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<div class="method-description">
|
|
309
|
+
<p>
|
|
310
|
+
gets chart <a href="Scale.html#M000340">data</a> for the <a
|
|
311
|
+
href="Scale.html">Scale</a> test
|
|
312
|
+
</p>
|
|
313
|
+
<pre>
|
|
314
|
+
* view = the TIMELINE or CALLGRAPH chart.
|
|
315
|
+
* zoom = the zoom level (0 to 1). 1 returns data for 100% of the time range, 0.5 returns data for 50% of the time range, and 0 returns only the last minute of data
|
|
316
|
+
* position = 0.
|
|
317
|
+
* bot_id = the scale engine id
|
|
318
|
+
</pre>
|
|
319
|
+
<p><a class="source-toggle" href="#"
|
|
320
|
+
onclick="toggleCode('M000340-source');return false;">[Source]</a></p>
|
|
321
|
+
<div class="method-source-code" id="M000340-source">
|
|
322
|
+
<pre>
|
|
323
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 128</span>
|
|
324
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">data</span>(<span class="ruby-identifier">view</span>=<span class="ruby-value str">'TIMELINE'</span>, <span class="ruby-identifier">zoom</span>=<span class="ruby-value str">"0"</span>, <span class="ruby-identifier">position</span>=<span class="ruby-value str">"0"</span>, <span class="ruby-identifier">bot_id</span>=<span class="ruby-value str">""</span>)
|
|
325
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"data"</span>, <span class="ruby-node">"view=#{view.upcase}&zoom=#{zoom}&position=#{position}&bot_id=#{bot_id}"</span>
|
|
326
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
327
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
328
|
+
<span class="ruby-keyword kw">end</span>
|
|
329
|
+
</pre>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<div id="method-M000346" class="method-detail">
|
|
335
|
+
<a name="M000346"></a>
|
|
336
|
+
|
|
337
|
+
<div class="method-heading">
|
|
338
|
+
<a href="#M000346" class="method-signature">
|
|
339
|
+
<span class="method-name">delete_scale_engine</span><span class="method-args">(bot_id)</span>
|
|
340
|
+
</a>
|
|
341
|
+
</div>
|
|
342
|
+
|
|
343
|
+
<div class="method-description">
|
|
344
|
+
<p>
|
|
345
|
+
removes a <a href="Scale.html">Scale</a> engine from the <a
|
|
346
|
+
href="Scale.html#M000336">list</a> of available engines
|
|
347
|
+
</p>
|
|
348
|
+
<pre>
|
|
349
|
+
* bot_id = the scale engine id
|
|
350
|
+
</pre>
|
|
351
|
+
<p><a class="source-toggle" href="#"
|
|
352
|
+
onclick="toggleCode('M000346-source');return false;">[Source]</a></p>
|
|
353
|
+
<div class="method-source-code" id="M000346-source">
|
|
354
|
+
<pre>
|
|
355
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 176</span>
|
|
356
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_scale_engine</span>(<span class="ruby-identifier">bot_id</span>)
|
|
357
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"deleteScaleEngine"</span>, <span class="ruby-node">"botId=#{bot_id}"</span>
|
|
358
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
359
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
360
|
+
<span class="ruby-keyword kw">end</span>
|
|
361
|
+
</pre>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
<div id="method-M000336" class="method-detail">
|
|
367
|
+
<a name="M000336"></a>
|
|
368
|
+
|
|
369
|
+
<div class="method-heading">
|
|
370
|
+
<a href="#M000336" class="method-signature">
|
|
371
|
+
<span class="method-name">list</span><span class="method-args">()</span>
|
|
372
|
+
</a>
|
|
373
|
+
</div>
|
|
374
|
+
|
|
375
|
+
<div class="method-description">
|
|
376
|
+
<p>
|
|
377
|
+
returns the current <a href="Scale.html">Scale</a> Player‘s <a
|
|
378
|
+
href="Scale.html#M000330">session</a> id
|
|
379
|
+
</p>
|
|
380
|
+
<p><a class="source-toggle" href="#"
|
|
381
|
+
onclick="toggleCode('M000336-source');return false;">[Source]</a></p>
|
|
382
|
+
<div class="method-source-code" id="M000336-source">
|
|
383
|
+
<pre>
|
|
384
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 94</span>
|
|
385
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>
|
|
386
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"list"</span>
|
|
387
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
388
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
389
|
+
<span class="ruby-keyword kw">end</span>
|
|
390
|
+
</pre>
|
|
391
|
+
</div>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div id="method-M000341" class="method-detail">
|
|
396
|
+
<a name="M000341"></a>
|
|
397
|
+
|
|
398
|
+
<div class="method-heading">
|
|
399
|
+
<a href="#M000341" class="method-signature">
|
|
400
|
+
<span class="method-name">pattern</span><span class="method-args">(zoom="0", position="0")</span>
|
|
401
|
+
</a>
|
|
402
|
+
</div>
|
|
403
|
+
|
|
404
|
+
<div class="method-description">
|
|
405
|
+
<p>
|
|
406
|
+
returns scale test <a href="Scale.html#M000340">data</a> for charting
|
|
407
|
+
</p>
|
|
408
|
+
<pre>
|
|
409
|
+
* command-line args require a zoom level and position(0)
|
|
410
|
+
* zoom = the zoom level (0 to 1). 1 returns data for 100% of the time range, 0.5 returns data for 50% of the time range, and 0 returns only the last minute of data
|
|
411
|
+
* position = 0.
|
|
412
|
+
</pre>
|
|
413
|
+
<p><a class="source-toggle" href="#"
|
|
414
|
+
onclick="toggleCode('M000341-source');return false;">[Source]</a></p>
|
|
415
|
+
<div class="method-source-code" id="M000341-source">
|
|
416
|
+
<pre>
|
|
417
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 138</span>
|
|
418
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pattern</span>(<span class="ruby-identifier">zoom</span>=<span class="ruby-value str">"0"</span>, <span class="ruby-identifier">position</span>=<span class="ruby-value str">"0"</span>)
|
|
419
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"pattern"</span>, <span class="ruby-node">"zoom=#{zoom}&position=#{position}"</span>
|
|
420
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
421
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
422
|
+
<span class="ruby-keyword kw">end</span>
|
|
423
|
+
</pre>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
|
|
428
|
+
<div id="method-M000338" class="method-detail">
|
|
429
|
+
<a name="M000338"></a>
|
|
430
|
+
|
|
431
|
+
<div class="method-heading">
|
|
432
|
+
<a href="#M000338" class="method-signature">
|
|
433
|
+
<span class="method-name">pcap</span><span class="method-args">(bot_id, file)</span>
|
|
434
|
+
</a>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
<div class="method-description">
|
|
438
|
+
<p>
|
|
439
|
+
returns a packet capture file from scale <a
|
|
440
|
+
href="Scale.html#M000333">verify</a>
|
|
441
|
+
</p>
|
|
442
|
+
<pre>
|
|
443
|
+
* bot_id = the id of the scale engine
|
|
444
|
+
* file = the name of the pcap file to retrieve
|
|
445
|
+
</pre>
|
|
446
|
+
<p><a class="source-toggle" href="#"
|
|
447
|
+
onclick="toggleCode('M000338-source');return false;">[Source]</a></p>
|
|
448
|
+
<div class="method-source-code" id="M000338-source">
|
|
449
|
+
<pre>
|
|
450
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 110</span>
|
|
451
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pcap</span>(<span class="ruby-identifier">bot_id</span>, <span class="ruby-identifier">file</span>)
|
|
452
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"pcap"</span>, <span class="ruby-node">"botId=#{bot_id}&file=#{file}"</span>
|
|
453
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
454
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
455
|
+
<span class="ruby-keyword kw">end</span>
|
|
456
|
+
</pre>
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
|
|
461
|
+
<div id="method-M000343" class="method-detail">
|
|
462
|
+
<a name="M000343"></a>
|
|
463
|
+
|
|
464
|
+
<div class="method-heading">
|
|
465
|
+
<a href="#M000343" class="method-signature">
|
|
466
|
+
<span class="method-name">release</span><span class="method-args">()</span>
|
|
467
|
+
</a>
|
|
468
|
+
</div>
|
|
469
|
+
|
|
470
|
+
<div class="method-description">
|
|
471
|
+
<p>
|
|
472
|
+
releases the scale player
|
|
473
|
+
</p>
|
|
474
|
+
<p><a class="source-toggle" href="#"
|
|
475
|
+
onclick="toggleCode('M000343-source');return false;">[Source]</a></p>
|
|
476
|
+
<div class="method-source-code" id="M000343-source">
|
|
477
|
+
<pre>
|
|
478
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 152</span>
|
|
479
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">release</span>
|
|
480
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"release"</span>
|
|
481
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
482
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
483
|
+
<span class="ruby-keyword kw">end</span>
|
|
484
|
+
</pre>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
|
|
489
|
+
<div id="method-M000345" class="method-detail">
|
|
490
|
+
<a name="M000345"></a>
|
|
491
|
+
|
|
492
|
+
<div class="method-heading">
|
|
493
|
+
<a href="#M000345" class="method-signature">
|
|
494
|
+
<span class="method-name">release_scale_engine</span><span class="method-args">(bot_id)</span>
|
|
495
|
+
</a>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
<div class="method-description">
|
|
499
|
+
<p>
|
|
500
|
+
marks the specified <a href="Scale.html">Scale</a> Engine as inactive (will
|
|
501
|
+
not participate in a <a href="Scale.html">Scale</a> test)
|
|
502
|
+
</p>
|
|
503
|
+
<pre>
|
|
504
|
+
* bot_id = the scale engine id
|
|
505
|
+
</pre>
|
|
506
|
+
<p><a class="source-toggle" href="#"
|
|
507
|
+
onclick="toggleCode('M000345-source');return false;">[Source]</a></p>
|
|
508
|
+
<div class="method-source-code" id="M000345-source">
|
|
509
|
+
<pre>
|
|
510
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 168</span>
|
|
511
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">release_scale_engine</span>(<span class="ruby-identifier">bot_id</span>)
|
|
512
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"releaseScaleEngine"</span>, <span class="ruby-node">"botId=#{bot_id}"</span>
|
|
513
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
514
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
515
|
+
<span class="ruby-keyword kw">end</span>
|
|
516
|
+
</pre>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
|
|
521
|
+
<div id="method-M000344" class="method-detail">
|
|
522
|
+
<a name="M000344"></a>
|
|
523
|
+
|
|
524
|
+
<div class="method-heading">
|
|
525
|
+
<a href="#M000344" class="method-signature">
|
|
526
|
+
<span class="method-name">reserve_scale_engine</span><span class="method-args">(bot_id)</span>
|
|
527
|
+
</a>
|
|
528
|
+
</div>
|
|
529
|
+
|
|
530
|
+
<div class="method-description">
|
|
531
|
+
<p>
|
|
532
|
+
marks the specified <a href="Scale.html">Scale</a> Engine as active (will
|
|
533
|
+
participate in a <a href="Scale.html">Scale</a> test
|
|
534
|
+
</p>
|
|
535
|
+
<pre>
|
|
536
|
+
* bot_id = the scale engine id
|
|
537
|
+
</pre>
|
|
538
|
+
<p><a class="source-toggle" href="#"
|
|
539
|
+
onclick="toggleCode('M000344-source');return false;">[Source]</a></p>
|
|
540
|
+
<div class="method-source-code" id="M000344-source">
|
|
541
|
+
<pre>
|
|
542
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 160</span>
|
|
543
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reserve_scale_engine</span>(<span class="ruby-identifier">bot_id</span>)
|
|
544
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"reserveScaleEngine"</span>, <span class="ruby-node">"botId=#{bot_id}"</span>
|
|
545
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
546
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
547
|
+
<span class="ruby-keyword kw">end</span>
|
|
548
|
+
</pre>
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
|
|
553
|
+
<div id="method-M000330" class="method-detail">
|
|
554
|
+
<a name="M000330"></a>
|
|
555
|
+
|
|
556
|
+
<div class="method-heading">
|
|
557
|
+
<a href="#M000330" class="method-signature">
|
|
558
|
+
<span class="method-name">session</span><span class="method-args">()</span>
|
|
559
|
+
</a>
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
<div class="method-description">
|
|
563
|
+
<p>
|
|
564
|
+
creates a <a href="Scale.html#M000329">new</a> Studio <a
|
|
565
|
+
href="Scale.html">Scale</a> <a href="Scale.html#M000330">session</a>,
|
|
566
|
+
returning the <a href="Scale.html#M000330">session</a> id
|
|
567
|
+
</p>
|
|
568
|
+
<p><a class="source-toggle" href="#"
|
|
569
|
+
onclick="toggleCode('M000330-source');return false;">[Source]</a></p>
|
|
570
|
+
<div class="method-source-code" id="M000330-source">
|
|
571
|
+
<pre>
|
|
572
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 40</span>
|
|
573
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">session</span>
|
|
574
|
+
<span class="ruby-identifier">uuid</span> = <span class="ruby-keyword kw">nil</span>
|
|
575
|
+
<span class="ruby-identifier">list</span> = <span class="ruby-identifier">get</span>(<span class="ruby-value str">"list"</span>)
|
|
576
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">list</span>.<span class="ruby-identifier">empty?</span>
|
|
577
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">list</span>
|
|
578
|
+
<span class="ruby-identifier">uuid</span> = <span class="ruby-identifier">list</span>[<span class="ruby-value">0</span>] <span class="ruby-comment cmt"># return existing session identifier if there is one</span>
|
|
579
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uuid</span>
|
|
580
|
+
<span class="ruby-keyword kw">end</span>
|
|
581
|
+
<span class="ruby-identifier">uuid</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"new"</span> <span class="ruby-comment cmt"># return a new session identifier</span>
|
|
582
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"uuid from /new = #{uuid}"</span>
|
|
583
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uuid</span>
|
|
584
|
+
<span class="ruby-keyword kw">end</span>
|
|
585
|
+
</pre>
|
|
586
|
+
</div>
|
|
587
|
+
</div>
|
|
588
|
+
</div>
|
|
589
|
+
|
|
590
|
+
<div id="method-M000332" class="method-detail">
|
|
591
|
+
<a name="M000332"></a>
|
|
592
|
+
|
|
593
|
+
<div class="method-heading">
|
|
594
|
+
<a href="#M000332" class="method-signature">
|
|
595
|
+
<span class="method-name">start</span><span class="method-args">()</span>
|
|
596
|
+
</a>
|
|
597
|
+
</div>
|
|
598
|
+
|
|
599
|
+
<div class="method-description">
|
|
600
|
+
<p>
|
|
601
|
+
starts a scale test with the class @configuration object
|
|
602
|
+
</p>
|
|
603
|
+
<p><a class="source-toggle" href="#"
|
|
604
|
+
onclick="toggleCode('M000332-source');return false;">[Source]</a></p>
|
|
605
|
+
<div class="method-source-code" id="M000332-source">
|
|
606
|
+
<pre>
|
|
607
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 65</span>
|
|
608
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
|
|
609
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">post</span> <span class="ruby-value str">"start"</span>, {<span class="ruby-value str">"request"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@configuration</span>}
|
|
610
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
611
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
612
|
+
<span class="ruby-keyword kw">end</span>
|
|
613
|
+
</pre>
|
|
614
|
+
</div>
|
|
615
|
+
</div>
|
|
616
|
+
</div>
|
|
617
|
+
|
|
618
|
+
<div id="method-M000335" class="method-detail">
|
|
619
|
+
<a name="M000335"></a>
|
|
620
|
+
|
|
621
|
+
<div class="method-heading">
|
|
622
|
+
<a href="#M000335" class="method-signature">
|
|
623
|
+
<span class="method-name">status</span><span class="method-args">()</span>
|
|
624
|
+
</a>
|
|
625
|
+
</div>
|
|
626
|
+
|
|
627
|
+
<div class="method-description">
|
|
628
|
+
<p>
|
|
629
|
+
gets information <a href="Scale.html#M000337">about</a> the currently
|
|
630
|
+
running <a href="Scale.html">Scale</a> test.
|
|
631
|
+
</p>
|
|
632
|
+
<p><a class="source-toggle" href="#"
|
|
633
|
+
onclick="toggleCode('M000335-source');return false;">[Source]</a></p>
|
|
634
|
+
<div class="method-source-code" id="M000335-source">
|
|
635
|
+
<pre>
|
|
636
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 87</span>
|
|
637
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>
|
|
638
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"status"</span>
|
|
639
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
640
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
641
|
+
<span class="ruby-keyword kw">end</span>
|
|
642
|
+
</pre>
|
|
643
|
+
</div>
|
|
644
|
+
</div>
|
|
645
|
+
</div>
|
|
646
|
+
|
|
647
|
+
<div id="method-M000339" class="method-detail">
|
|
648
|
+
<a name="M000339"></a>
|
|
649
|
+
|
|
650
|
+
<div class="method-heading">
|
|
651
|
+
<a href="#M000339" class="method-signature">
|
|
652
|
+
<span class="method-name">statuses</span><span class="method-args">()</span>
|
|
653
|
+
</a>
|
|
654
|
+
</div>
|
|
655
|
+
|
|
656
|
+
<div class="method-description">
|
|
657
|
+
<p>
|
|
658
|
+
gets the <a href="Scale.html#M000335">status</a> of all active and inactive
|
|
659
|
+
<a href="Scale.html">Scale</a> engines
|
|
660
|
+
</p>
|
|
661
|
+
<p><a class="source-toggle" href="#"
|
|
662
|
+
onclick="toggleCode('M000339-source');return false;">[Source]</a></p>
|
|
663
|
+
<div class="method-source-code" id="M000339-source">
|
|
664
|
+
<pre>
|
|
665
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 117</span>
|
|
666
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">statuses</span>
|
|
667
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"statuses"</span>
|
|
668
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
669
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
670
|
+
<span class="ruby-keyword kw">end</span>
|
|
671
|
+
</pre>
|
|
672
|
+
</div>
|
|
673
|
+
</div>
|
|
674
|
+
</div>
|
|
675
|
+
|
|
676
|
+
<div id="method-M000342" class="method-detail">
|
|
677
|
+
<a name="M000342"></a>
|
|
678
|
+
|
|
679
|
+
<div class="method-heading">
|
|
680
|
+
<a href="#M000342" class="method-signature">
|
|
681
|
+
<span class="method-name">stop</span><span class="method-args">()</span>
|
|
682
|
+
</a>
|
|
683
|
+
</div>
|
|
684
|
+
|
|
685
|
+
<div class="method-description">
|
|
686
|
+
<p>
|
|
687
|
+
stops a scale test
|
|
688
|
+
</p>
|
|
689
|
+
<p><a class="source-toggle" href="#"
|
|
690
|
+
onclick="toggleCode('M000342-source');return false;">[Source]</a></p>
|
|
691
|
+
<div class="method-source-code" id="M000342-source">
|
|
692
|
+
<pre>
|
|
693
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 145</span>
|
|
694
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
|
|
695
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"stop"</span>
|
|
696
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
697
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
698
|
+
<span class="ruby-keyword kw">end</span>
|
|
699
|
+
</pre>
|
|
700
|
+
</div>
|
|
701
|
+
</div>
|
|
702
|
+
</div>
|
|
703
|
+
|
|
704
|
+
<div id="method-M000334" class="method-detail">
|
|
705
|
+
<a name="M000334"></a>
|
|
706
|
+
|
|
707
|
+
<div class="method-heading">
|
|
708
|
+
<a href="#M000334" class="method-signature">
|
|
709
|
+
<span class="method-name">update</span><span class="method-args">(params)</span>
|
|
710
|
+
</a>
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
<div class="method-description">
|
|
714
|
+
<p>
|
|
715
|
+
updates a running scale test, as long as the test <a
|
|
716
|
+
href="Scale.html#M000341">pattern</a> is ‘none‘
|
|
717
|
+
</p>
|
|
718
|
+
<pre>
|
|
719
|
+
* params = a json object containing the information to update, such as { "volume" : 100 }
|
|
720
|
+
</pre>
|
|
721
|
+
<p><a class="source-toggle" href="#"
|
|
722
|
+
onclick="toggleCode('M000334-source');return false;">[Source]</a></p>
|
|
723
|
+
<div class="method-source-code" id="M000334-source">
|
|
724
|
+
<pre>
|
|
725
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 80</span>
|
|
726
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">params</span>)
|
|
727
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"update"</span>, <span class="ruby-identifier">params</span>
|
|
728
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
729
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
730
|
+
<span class="ruby-keyword kw">end</span>
|
|
731
|
+
</pre>
|
|
732
|
+
</div>
|
|
733
|
+
</div>
|
|
734
|
+
</div>
|
|
735
|
+
|
|
736
|
+
<div id="method-M000333" class="method-detail">
|
|
737
|
+
<a name="M000333"></a>
|
|
738
|
+
|
|
739
|
+
<div class="method-heading">
|
|
740
|
+
<a href="#M000333" class="method-signature">
|
|
741
|
+
<span class="method-name">verify</span><span class="method-args">()</span>
|
|
742
|
+
</a>
|
|
743
|
+
</div>
|
|
744
|
+
|
|
745
|
+
<div class="method-description">
|
|
746
|
+
<p>
|
|
747
|
+
verifies the class @configuration object
|
|
748
|
+
</p>
|
|
749
|
+
<p><a class="source-toggle" href="#"
|
|
750
|
+
onclick="toggleCode('M000333-source');return false;">[Source]</a></p>
|
|
751
|
+
<div class="method-source-code" id="M000333-source">
|
|
752
|
+
<pre>
|
|
753
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 72</span>
|
|
754
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify</span>
|
|
755
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">post</span> <span class="ruby-value str">"verify"</span>, {<span class="ruby-value str">"request"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@configuration</span>}
|
|
756
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
757
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
758
|
+
<span class="ruby-keyword kw">end</span>
|
|
759
|
+
</pre>
|
|
760
|
+
</div>
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
763
|
+
|
|
764
|
+
<h3 class="section-bar">Private Instance methods</h3>
|
|
765
|
+
|
|
766
|
+
<div id="method-M000347" class="method-detail">
|
|
767
|
+
<a name="M000347"></a>
|
|
768
|
+
|
|
769
|
+
<div class="method-heading">
|
|
770
|
+
<a href="#M000347" class="method-signature">
|
|
771
|
+
<span class="method-name">get</span><span class="method-args">(e=@element, params=nil)</span>
|
|
772
|
+
</a>
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
<div class="method-description">
|
|
776
|
+
<p><a class="source-toggle" href="#"
|
|
777
|
+
onclick="toggleCode('M000347-source');return false;">[Source]</a></p>
|
|
778
|
+
<div class="method-source-code" id="M000347-source">
|
|
779
|
+
<pre>
|
|
780
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 184</span>
|
|
781
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">e</span>=<span class="ruby-ivar">@element</span>, <span class="ruby-identifier">params</span>=<span class="ruby-keyword kw">nil</span>)
|
|
782
|
+
<span class="ruby-identifier">element</span> = <span class="ruby-identifier">e</span>
|
|
783
|
+
<span class="ruby-identifier">element</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"?uuid=#{@uuid}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@uuid</span>.<span class="ruby-identifier">nil?</span>
|
|
784
|
+
<span class="ruby-identifier">element</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"&#{params}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">nil?</span>
|
|
785
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_json</span>(<span class="ruby-identifier">element</span>)
|
|
786
|
+
<span class="ruby-keyword kw">end</span>
|
|
787
|
+
</pre>
|
|
788
|
+
</div>
|
|
789
|
+
</div>
|
|
790
|
+
</div>
|
|
791
|
+
|
|
792
|
+
<div id="method-M000348" class="method-detail">
|
|
793
|
+
<a name="M000348"></a>
|
|
794
|
+
|
|
795
|
+
<div class="method-heading">
|
|
796
|
+
<a href="#M000348" class="method-signature">
|
|
797
|
+
<span class="method-name">post</span><span class="method-args">(e, json='{}')</span>
|
|
798
|
+
</a>
|
|
799
|
+
</div>
|
|
800
|
+
|
|
801
|
+
<div class="method-description">
|
|
802
|
+
<p>
|
|
803
|
+
POST method
|
|
804
|
+
</p>
|
|
805
|
+
<p><a class="source-toggle" href="#"
|
|
806
|
+
onclick="toggleCode('M000348-source');return false;">[Source]</a></p>
|
|
807
|
+
<div class="method-source-code" id="M000348-source">
|
|
808
|
+
<pre>
|
|
809
|
+
<span class="ruby-comment cmt"># File lib/mu/api/scale.rb, line 192</span>
|
|
810
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>=<span class="ruby-value str">'{}'</span>)
|
|
811
|
+
<span class="ruby-identifier">element</span> = <span class="ruby-identifier">e</span>
|
|
812
|
+
<span class="ruby-identifier">element</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"?uuid=#{@uuid}"</span>
|
|
813
|
+
<span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post_json</span>(<span class="ruby-identifier">element</span>, <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">generate</span>(<span class="ruby-identifier">json</span>))
|
|
814
|
+
<span class="ruby-keyword kw">end</span>
|
|
815
|
+
</pre>
|
|
816
|
+
</div>
|
|
817
|
+
</div>
|
|
818
|
+
</div>
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
</div>
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
</div>
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
<div id="validator-badges">
|
|
828
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
829
|
+
</div>
|
|
830
|
+
|
|
831
|
+
</body>
|
|
832
|
+
</html>
|