mu 5.7.8 → 5.7.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/lib/mu.rb +1 -1
  2. data/lib/mu/command.rb +18 -2
  3. data/lib/mu/command/cmd_musl.rb +165 -0
  4. data/lib/mu/command/cmd_runscale.rb +12 -8
  5. data/lib/mu/command/help.rb +1 -0
  6. data/lib/mu/har.rb +449 -0
  7. data/lib/mu/libxml.rb +21 -0
  8. data/lib/mu/maker.rb +288 -0
  9. data/lib/mu/xmlizable.rb +559 -0
  10. metadata +78 -267
  11. data/rdoc/Gemfile.html +0 -194
  12. data/rdoc/LICENSE_txt.html +0 -201
  13. data/rdoc/Mu.html +0 -478
  14. data/rdoc/Mu/Client.html +0 -461
  15. data/rdoc/Mu/Command.html +0 -338
  16. data/rdoc/Mu/Command/API.html +0 -844
  17. data/rdoc/Mu/Command/Cmd_appid.html +0 -1341
  18. data/rdoc/Mu/Command/Cmd_cli.html +0 -800
  19. data/rdoc/Mu/Command/Cmd_ddt.html +0 -1612
  20. data/rdoc/Mu/Command/Cmd_homepage.html +0 -762
  21. data/rdoc/Mu/Command/Cmd_muapi.html +0 -1363
  22. data/rdoc/Mu/Command/Cmd_netconfig.html +0 -1077
  23. data/rdoc/Mu/Command/Cmd_runscale.html +0 -1441
  24. data/rdoc/Mu/Command/Cmd_runscenario.html +0 -787
  25. data/rdoc/Mu/Command/Cmd_runverify.html +0 -893
  26. data/rdoc/Mu/Command/Cmd_scale.html +0 -1323
  27. data/rdoc/Mu/Command/Cmd_system.html +0 -677
  28. data/rdoc/Mu/Command/Curl.html +0 -751
  29. data/rdoc/Mu/Command/Help.html +0 -305
  30. data/rdoc/Mu/Curl.html +0 -243
  31. data/rdoc/Mu/Curl/Error.html +0 -304
  32. data/rdoc/Mu/Curl/Error/Authorize.html +0 -355
  33. data/rdoc/Mu/Curl/Error/Connect.html +0 -286
  34. data/rdoc/Mu/Curl/Error/DNS.html +0 -236
  35. data/rdoc/Mu/Curl/Error/Region.html +0 -307
  36. data/rdoc/Mu/Curl/Error/Status.html +0 -286
  37. data/rdoc/Mu/Curl/Error/Timeout.html +0 -286
  38. data/rdoc/Mu/Curl/Verify.html +0 -472
  39. data/rdoc/Mu/Curl/Verify/Request.html +0 -424
  40. data/rdoc/Mu/Curl/Verify/Response.html +0 -372
  41. data/rdoc/Mu/Curl/Verify/Result.html +0 -373
  42. data/rdoc/Mu/Ddt.html +0 -1347
  43. data/rdoc/Mu/Helper.html +0 -517
  44. data/rdoc/Mu/Homepage.html +0 -719
  45. data/rdoc/Mu/HttpHelper.html +0 -890
  46. data/rdoc/Mu/Muapi.html +0 -1226
  47. data/rdoc/Mu/Netconfig.html +0 -1178
  48. data/rdoc/Mu/Scale.html +0 -1359
  49. data/rdoc/Mu/System.html +0 -504
  50. data/rdoc/Object.html +0 -285
  51. data/rdoc/README_rdoc.html +0 -892
  52. data/rdoc/Rakefile.html +0 -257
  53. data/rdoc/TCTestMu.html +0 -2583
  54. data/rdoc/Test.html +0 -235
  55. data/rdoc/Test/Unit.html +0 -235
  56. data/rdoc/Test/Unit/TestCase.html +0 -236
  57. data/rdoc/Test/helper_rb.html +0 -62
  58. data/rdoc/Test/tc_test_mu_rb.html +0 -60
  59. data/rdoc/VERSION.html +0 -179
  60. data/rdoc/bin/mu.html +0 -54
  61. data/rdoc/classes/Mu.html +0 -132
  62. data/rdoc/classes/Mu/Client.html +0 -214
  63. data/rdoc/classes/Mu/Command.html +0 -129
  64. data/rdoc/classes/Mu/Command/API.html +0 -362
  65. data/rdoc/classes/Mu/Command/Cmd_appid.html +0 -238
  66. data/rdoc/classes/Mu/Command/Cmd_cli.html +0 -273
  67. data/rdoc/classes/Mu/Command/Cmd_ddt.html +0 -639
  68. data/rdoc/classes/Mu/Command/Cmd_homepage.html +0 -276
  69. data/rdoc/classes/Mu/Command/Cmd_muapi.html +0 -527
  70. data/rdoc/classes/Mu/Command/Cmd_netconfig.html +0 -399
  71. data/rdoc/classes/Mu/Command/Cmd_runscale.html +0 -220
  72. data/rdoc/classes/Mu/Command/Cmd_runscenario.html +0 -197
  73. data/rdoc/classes/Mu/Command/Cmd_runverify.html +0 -196
  74. data/rdoc/classes/Mu/Command/Cmd_scale.html +0 -511
  75. data/rdoc/classes/Mu/Command/Cmd_system.html +0 -236
  76. data/rdoc/classes/Mu/Command/Curl.html +0 -182
  77. data/rdoc/classes/Mu/Command/Help.html +0 -137
  78. data/rdoc/classes/Mu/Curl.html +0 -116
  79. data/rdoc/classes/Mu/Curl/Error.html +0 -148
  80. data/rdoc/classes/Mu/Curl/Error/Authorize.html +0 -165
  81. data/rdoc/classes/Mu/Curl/Error/Connect.html +0 -139
  82. data/rdoc/classes/Mu/Curl/Error/DNS.html +0 -113
  83. data/rdoc/classes/Mu/Curl/Error/Region.html +0 -150
  84. data/rdoc/classes/Mu/Curl/Error/Status.html +0 -139
  85. data/rdoc/classes/Mu/Curl/Error/Timeout.html +0 -139
  86. data/rdoc/classes/Mu/Curl/Verify.html +0 -207
  87. data/rdoc/classes/Mu/Curl/Verify/Request.html +0 -187
  88. data/rdoc/classes/Mu/Curl/Verify/Response.html +0 -172
  89. data/rdoc/classes/Mu/Curl/Verify/Result.html +0 -172
  90. data/rdoc/classes/Mu/Ddt.html +0 -610
  91. data/rdoc/classes/Mu/Helper.html +0 -308
  92. data/rdoc/classes/Mu/Homepage.html +0 -306
  93. data/rdoc/classes/Mu/HttpHelper.html +0 -393
  94. data/rdoc/classes/Mu/Muapi.html +0 -549
  95. data/rdoc/classes/Mu/Netconfig.html +0 -478
  96. data/rdoc/classes/Mu/Scale.html +0 -580
  97. data/rdoc/classes/Mu/System.html +0 -232
  98. data/rdoc/classes/Object.html +0 -139
  99. data/rdoc/classes/TCTestMu.html +0 -948
  100. data/rdoc/classes/Test.html +0 -107
  101. data/rdoc/classes/Test/Unit.html +0 -107
  102. data/rdoc/classes/Test/Unit/TestCase.html +0 -113
  103. data/rdoc/created.rid +0 -36
  104. data/rdoc/files/lib/mu/api/ddt_rb.html +0 -101
  105. data/rdoc/files/lib/mu/api/homepage_rb.html +0 -101
  106. data/rdoc/files/lib/mu/api/muapi_rb.html +0 -101
  107. data/rdoc/files/lib/mu/api/netconfig_rb.html +0 -101
  108. data/rdoc/files/lib/mu/api/scale_rb.html +0 -101
  109. data/rdoc/files/lib/mu/api/system_rb.html +0 -101
  110. data/rdoc/files/lib/mu/client_rb.html +0 -101
  111. data/rdoc/files/lib/mu/command/api_rb.html +0 -101
  112. data/rdoc/files/lib/mu/command/cmd_appid_rb.html +0 -119
  113. data/rdoc/files/lib/mu/command/cmd_cli_rb.html +0 -108
  114. data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +0 -116
  115. data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +0 -115
  116. data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +0 -115
  117. data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +0 -116
  118. data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +0 -119
  119. data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +0 -115
  120. data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +0 -118
  121. data/rdoc/files/lib/mu/command/cmd_scale_rb.html +0 -115
  122. data/rdoc/files/lib/mu/command/cmd_system_rb.html +0 -116
  123. data/rdoc/files/lib/mu/command/curl_rb.html +0 -101
  124. data/rdoc/files/lib/mu/command/help_rb.html +0 -101
  125. data/rdoc/files/lib/mu/command_rb.html +0 -107
  126. data/rdoc/files/lib/mu/curl/error_rb.html +0 -101
  127. data/rdoc/files/lib/mu/curl/verify_rb.html +0 -101
  128. data/rdoc/files/lib/mu/helper_rb.html +0 -101
  129. data/rdoc/files/lib/mu/http_helper_rb.html +0 -101
  130. data/rdoc/files/lib/mu_rb.html +0 -121
  131. data/rdoc/files/test/helper_rb.html +0 -112
  132. data/rdoc/files/test/tc_test_mu_rb.html +0 -111
  133. data/rdoc/fr_class_index.html +0 -34
  134. data/rdoc/fr_file_index.html +0 -31
  135. data/rdoc/fr_method_index.html +0 -112
  136. data/rdoc/images/brick.png +0 -0
  137. data/rdoc/images/brick_link.png +0 -0
  138. data/rdoc/images/bug.png +0 -0
  139. data/rdoc/images/bullet_black.png +0 -0
  140. data/rdoc/images/bullet_toggle_minus.png +0 -0
  141. data/rdoc/images/bullet_toggle_plus.png +0 -0
  142. data/rdoc/images/date.png +0 -0
  143. data/rdoc/images/find.png +0 -0
  144. data/rdoc/images/loadingAnimation.gif +0 -0
  145. data/rdoc/images/macFFBgHack.png +0 -0
  146. data/rdoc/images/package.png +0 -0
  147. data/rdoc/images/page_green.png +0 -0
  148. data/rdoc/images/page_white_text.png +0 -0
  149. data/rdoc/images/page_white_width.png +0 -0
  150. data/rdoc/images/plugin.png +0 -0
  151. data/rdoc/images/ruby.png +0 -0
  152. data/rdoc/images/tag_green.png +0 -0
  153. data/rdoc/images/wrench.png +0 -0
  154. data/rdoc/images/wrench_orange.png +0 -0
  155. data/rdoc/images/zoom.png +0 -0
  156. data/rdoc/index.html +0 -884
  157. data/rdoc/js/darkfish.js +0 -116
  158. data/rdoc/js/jquery.js +0 -32
  159. data/rdoc/js/quicksearch.js +0 -114
  160. data/rdoc/js/thickbox-compressed.js +0 -10
  161. data/rdoc/lib/mu/api/ddt_rb.html +0 -52
  162. data/rdoc/lib/mu/api/homepage_rb.html +0 -52
  163. data/rdoc/lib/mu/api/muapi_rb.html +0 -52
  164. data/rdoc/lib/mu/api/netconfig_rb.html +0 -52
  165. data/rdoc/lib/mu/api/scale_rb.html +0 -52
  166. data/rdoc/lib/mu/api/system_rb.html +0 -52
  167. data/rdoc/lib/mu/client_rb.html +0 -52
  168. data/rdoc/lib/mu/command/api_rb.html +0 -52
  169. data/rdoc/lib/mu/command/cmd_appid_rb.html +0 -62
  170. data/rdoc/lib/mu/command/cmd_cli_rb.html +0 -55
  171. data/rdoc/lib/mu/command/cmd_ddt_rb.html +0 -60
  172. data/rdoc/lib/mu/command/cmd_homepage_rb.html +0 -57
  173. data/rdoc/lib/mu/command/cmd_muapi_rb.html +0 -59
  174. data/rdoc/lib/mu/command/cmd_netconfig_rb.html +0 -58
  175. data/rdoc/lib/mu/command/cmd_runscale_rb.html +0 -62
  176. data/rdoc/lib/mu/command/cmd_runscenario_rb.html +0 -57
  177. data/rdoc/lib/mu/command/cmd_runverify_rb.html +0 -61
  178. data/rdoc/lib/mu/command/cmd_scale_rb.html +0 -58
  179. data/rdoc/lib/mu/command/cmd_system_rb.html +0 -59
  180. data/rdoc/lib/mu/command/curl_rb.html +0 -52
  181. data/rdoc/lib/mu/command/help_rb.html +0 -52
  182. data/rdoc/lib/mu/command_rb.html +0 -55
  183. data/rdoc/lib/mu/curl/error_rb.html +0 -52
  184. data/rdoc/lib/mu/curl/verify_rb.html +0 -52
  185. data/rdoc/lib/mu/helper_rb.html +0 -52
  186. data/rdoc/lib/mu/http_helper_rb.html +0 -52
  187. data/rdoc/lib/mu_rb.html +0 -80
  188. data/rdoc/rdoc-style.css +0 -208
  189. data/rdoc/rdoc.css +0 -706
  190. data/test/data/app_id_stats.csv +0 -1
  191. data/test/data/app_id_status.json +0 -156
  192. data/test/data/data_cgi.msl +0 -94
  193. data/test/data/data_cgi.xml +0 -322
  194. data/test/data/default_test.csv +0 -3
  195. data/test/data/ftp_with_channel.xml +0 -1643
  196. data/test/data/irc.xml +0 -3837
  197. data/test/data/scale.json +0 -25
  198. data/test/data/test_data_cgi_error.xml +0 -35
@@ -1,1323 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: Mu::Command::Cmd_scale</title>
9
-
10
- <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../../index.html">Home</a>
29
- <a href="../../index.html#classes">Classes</a>
30
- <a href="../../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../../lib/mu/command/cmd_scale_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/mu/command/cmd_scale.rb">lib/mu/command/cmd_scale.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link"><a href="../Command.html">Mu::Command</a></p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
- <div id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
- <ul class="link-list">
71
-
72
- <li><a href="#method-i-cmd_about">#cmd_about</a></li>
73
-
74
- <li><a href="#method-i-cmd_configure">#cmd_configure</a></li>
75
-
76
- <li><a href="#method-i-cmd_data">#cmd_data</a></li>
77
-
78
- <li><a href="#method-i-cmd_delete_scale_engine">#cmd_delete_scale_engine</a></li>
79
-
80
- <li><a href="#method-i-cmd_help">#cmd_help</a></li>
81
-
82
- <li><a href="#method-i-cmd_list">#cmd_list</a></li>
83
-
84
- <li><a href="#method-i-cmd_pattern">#cmd_pattern</a></li>
85
-
86
- <li><a href="#method-i-cmd_pcap">#cmd_pcap</a></li>
87
-
88
- <li><a href="#method-i-cmd_release">#cmd_release</a></li>
89
-
90
- <li><a href="#method-i-cmd_release_scale_engine">#cmd_release_scale_engine</a></li>
91
-
92
- <li><a href="#method-i-cmd_reserve_scale_engine">#cmd_reserve_scale_engine</a></li>
93
-
94
- <li><a href="#method-i-cmd_start">#cmd_start</a></li>
95
-
96
- <li><a href="#method-i-cmd_status">#cmd_status</a></li>
97
-
98
- <li><a href="#method-i-cmd_statuses">#cmd_statuses</a></li>
99
-
100
- <li><a href="#method-i-cmd_stop">#cmd_stop</a></li>
101
-
102
- <li><a href="#method-i-cmd_update">#cmd_update</a></li>
103
-
104
- <li><a href="#method-i-cmd_verify">#cmd_verify</a></li>
105
-
106
- <li><a href="#method-i-help">#help</a></li>
107
-
108
- <li><a href="#method-i-parse_cli">#parse_cli</a></li>
109
-
110
- <li><a href="#method-i-setup">#setup</a></li>
111
-
112
- </ul>
113
- </div>
114
-
115
-
116
- <!-- Included Modules -->
117
-
118
- </div>
119
-
120
- <div id="project-metadata">
121
-
122
-
123
- <div id="fileindex-section" class="section project-section">
124
- <h3 class="section-header">Files</h3>
125
- <ul>
126
-
127
- <li class="file"><a href="../../Gemfile.html">Gemfile</a></li>
128
-
129
- <li class="file"><a href="../../LICENSE_txt.html">LICENSE.txt</a></li>
130
-
131
- <li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
132
-
133
- <li class="file"><a href="../../Rakefile.html">Rakefile</a></li>
134
-
135
- <li class="file"><a href="../../VERSION.html">VERSION</a></li>
136
-
137
- </ul>
138
- </div>
139
-
140
-
141
- <div id="classindex-section" class="section project-section">
142
- <h3 class="section-header">Class Index
143
- <span class="search-toggle"><img src="../../images/find.png"
144
- height="16" width="16" alt="[+]"
145
- title="show/hide quicksearch" /></span></h3>
146
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
147
- <fieldset>
148
- <legend>Quicksearch</legend>
149
- <input type="text" name="quicksearch" value=""
150
- class="quicksearch-field" />
151
- </fieldset>
152
- </form>
153
-
154
- <ul class="link-list">
155
-
156
- <li><a href="../../Mu.html">Mu</a></li>
157
-
158
- <li><a href="../../Mu/Client.html">Mu::Client</a></li>
159
-
160
- <li><a href="../../Mu/Command.html">Mu::Command</a></li>
161
-
162
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
163
-
164
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
165
-
166
- <li><a href="../../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
167
-
168
- <li><a href="../../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
169
-
170
- <li><a href="../../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
171
-
172
- <li><a href="../../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
173
-
174
- <li><a href="../../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
175
-
176
- <li><a href="../../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
177
-
178
- <li><a href="../../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
179
-
180
- <li><a href="../../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
181
-
182
- <li><a href="../../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
183
-
184
- <li><a href="../../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
185
-
186
- <li><a href="../../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
187
-
188
- <li><a href="../../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
189
-
190
- <li><a href="../../Mu/Command/Help.html">Mu::Command::Help</a></li>
191
-
192
- <li><a href="../../Mu/Curl.html">Mu::Curl</a></li>
193
-
194
- <li><a href="../../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
195
-
196
- <li><a href="../../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
197
-
198
- <li><a href="../../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
199
-
200
- <li><a href="../../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
201
-
202
- <li><a href="../../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
203
-
204
- <li><a href="../../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
205
-
206
- <li><a href="../../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
207
-
208
- <li><a href="../../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
209
-
210
- <li><a href="../../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
211
-
212
- <li><a href="../../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
213
-
214
- <li><a href="../../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
215
-
216
- <li><a href="../../Mu/Ddt.html">Mu::Ddt</a></li>
217
-
218
- <li><a href="../../Mu/Helper.html">Mu::Helper</a></li>
219
-
220
- <li><a href="../../Mu/Homepage.html">Mu::Homepage</a></li>
221
-
222
- <li><a href="../../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
223
-
224
- <li><a href="../../Mu/Muapi.html">Mu::Muapi</a></li>
225
-
226
- <li><a href="../../Mu/Netconfig.html">Mu::Netconfig</a></li>
227
-
228
- <li><a href="../../Mu/Scale.html">Mu::Scale</a></li>
229
-
230
- <li><a href="../../Mu/System.html">Mu::System</a></li>
231
-
232
- <li><a href="../../Test.html">Test</a></li>
233
-
234
- <li><a href="../../Test/Unit.html">Test::Unit</a></li>
235
-
236
- <li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
237
-
238
- <li><a href="../../Object.html">Object</a></li>
239
-
240
- <li><a href="../../TCTestMu.html">TCTestMu</a></li>
241
-
242
- </ul>
243
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
244
- </div>
245
-
246
-
247
- </div>
248
- </div>
249
-
250
- <div id="documentation">
251
- <h1 class="class">Mu::Command::Cmd_scale</h1>
252
-
253
- <div id="description">
254
-
255
- </div>
256
-
257
- <!-- Constants -->
258
-
259
-
260
- <!-- Attributes -->
261
-
262
- <div id="attribute-method-details" class="method-section section">
263
- <h3 class="section-header">Attributes</h3>
264
-
265
-
266
- <div id="host-attribute-method" class="method-detail">
267
- <a name="host"></a>
268
-
269
- <a name="host="></a>
270
-
271
- <div class="method-heading attribute-method-heading">
272
- <span class="method-name">host</span><span
273
- class="attribute-access-type">[RW]</span>
274
- </div>
275
-
276
- <div class="method-description">
277
-
278
-
279
-
280
- </div>
281
- </div>
282
-
283
- <div id="username-attribute-method" class="method-detail">
284
- <a name="username"></a>
285
-
286
- <a name="username="></a>
287
-
288
- <div class="method-heading attribute-method-heading">
289
- <span class="method-name">username</span><span
290
- class="attribute-access-type">[RW]</span>
291
- </div>
292
-
293
- <div class="method-description">
294
-
295
-
296
-
297
- </div>
298
- </div>
299
-
300
- <div id="password-attribute-method" class="method-detail">
301
- <a name="password"></a>
302
-
303
- <a name="password="></a>
304
-
305
- <div class="method-heading attribute-method-heading">
306
- <span class="method-name">password</span><span
307
- class="attribute-access-type">[RW]</span>
308
- </div>
309
-
310
- <div class="method-description">
311
-
312
-
313
-
314
- </div>
315
- </div>
316
-
317
- <div id="api-attribute-method" class="method-detail">
318
- <a name="api"></a>
319
-
320
- <a name="api="></a>
321
-
322
- <div class="method-heading attribute-method-heading">
323
- <span class="method-name">api</span><span
324
- class="attribute-access-type">[RW]</span>
325
- </div>
326
-
327
- <div class="method-description">
328
-
329
-
330
-
331
- </div>
332
- </div>
333
-
334
- </div>
335
-
336
-
337
- <!-- Methods -->
338
-
339
- <div id="public-instance-method-details" class="method-section section">
340
- <h3 class="section-header">Public Instance Methods</h3>
341
-
342
-
343
- <div id="cmd-about-method" class="method-detail ">
344
- <a name="method-i-cmd_about"></a>
345
-
346
- <div class="method-heading">
347
-
348
- <span class="method-name">cmd_about</span><span
349
- class="method-args">(argv)</span>
350
- <span class="method-click-advice">click to toggle source</span>
351
-
352
- </div>
353
-
354
- <div class="method-description">
355
-
356
- <p>
357
- returns scale engine configuration information
358
- </p>
359
- <pre>
360
- * argv = command-line arguments</pre>
361
-
362
-
363
-
364
- <div class="method-source-code"
365
- id="cmd-about-source">
366
- <pre>
367
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 73</span>
368
- 73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_about</span> <span class="ruby-identifier">argv</span>
369
- 74: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
370
- 75: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">about</span>
371
- 76: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
372
- 77: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
373
- 78: <span class="ruby-keyword kw">end</span></pre>
374
- </div>
375
-
376
- </div>
377
-
378
-
379
-
380
-
381
- </div>
382
-
383
-
384
- <div id="cmd-configure-method" class="method-detail ">
385
- <a name="method-i-cmd_configure"></a>
386
-
387
- <div class="method-heading">
388
-
389
- <span class="method-name">cmd_configure</span><span
390
- class="method-args">(argv)</span>
391
- <span class="method-click-advice">click to toggle source</span>
392
-
393
- </div>
394
-
395
- <div class="method-description">
396
-
397
- <p>
398
- configures the scale json object
399
- </p>
400
- <pre>
401
- * argv = command-line arguments, requires a params (-p) and params value (-pv) argument, such as -p volume -pv 100</pre>
402
-
403
-
404
-
405
- <div class="method-source-code"
406
- id="cmd-configure-source">
407
- <pre>
408
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 16</span>
409
- 16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_configure</span> <span class="ruby-identifier">argv</span>
410
- 17: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
411
- 18: <span class="ruby-identifier">param</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'params'</span>]
412
- 19: <span class="ruby-identifier">value</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'param_value'</span>]
413
- 20: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-identifier">param</span>, <span class="ruby-identifier">value</span>)
414
- 21: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
415
- 22: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
416
- 23: <span class="ruby-keyword kw">end</span></pre>
417
- </div>
418
-
419
- </div>
420
-
421
-
422
-
423
-
424
- </div>
425
-
426
-
427
- <div id="cmd-data-method" class="method-detail ">
428
- <a name="method-i-cmd_data"></a>
429
-
430
- <div class="method-heading">
431
-
432
- <span class="method-name">cmd_data</span><span
433
- class="method-args">(argv)</span>
434
- <span class="method-click-advice">click to toggle source</span>
435
-
436
- </div>
437
-
438
- <div class="method-description">
439
-
440
- <p>
441
- returns scale test data for charting
442
- </p>
443
- <pre>
444
- * argv = command-line arguments, requires:
445
- * view (-w), which specifies the TIMELINE or CALLGRAPH chart.
446
- * zoom (-z), which specifies 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
447
- * position (-p), which must be 0.
448
- * scale engine id (-b)</pre>
449
-
450
-
451
-
452
- <div class="method-source-code"
453
- id="cmd-data-source">
454
- <pre>
455
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 106</span>
456
- 106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_data</span> <span class="ruby-identifier">argv</span>
457
- 107: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
458
- 108: <span class="ruby-keyword kw">begin</span>
459
- 109: <span class="ruby-identifier">view</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'view'</span>]
460
- 110: <span class="ruby-identifier">zoom</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'zoom'</span>]
461
- 111: <span class="ruby-identifier">position</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'view_position'</span>]
462
- 112: <span class="ruby-identifier">bot_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'bot_id'</span>]
463
- 113: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">data</span>(<span class="ruby-identifier">view</span>, <span class="ruby-identifier">zoom</span>, <span class="ruby-identifier">position</span>, <span class="ruby-identifier">bot_id</span>)
464
- 114: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
465
- 115: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">e</span>
466
- 116: <span class="ruby-keyword kw">end</span>
467
- 117: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
468
- 118: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
469
- 119: <span class="ruby-keyword kw">end</span></pre>
470
- </div>
471
-
472
- </div>
473
-
474
-
475
-
476
-
477
- </div>
478
-
479
-
480
- <div id="cmd-delete-scale-engine-method" class="method-detail ">
481
- <a name="method-i-cmd_delete_scale_engine"></a>
482
-
483
- <div class="method-heading">
484
-
485
- <span class="method-name">cmd_delete_scale_engine</span><span
486
- class="method-args">(argv)</span>
487
- <span class="method-click-advice">click to toggle source</span>
488
-
489
- </div>
490
-
491
- <div class="method-description">
492
-
493
- <p>
494
- deletes a scale engine
495
- </p>
496
- <pre>
497
- * argv = command-line arguments, require a scale engine id (-b) argument</pre>
498
-
499
-
500
-
501
- <div class="method-source-code"
502
- id="cmd-delete-scale-engine-source">
503
- <pre>
504
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 178</span>
505
- 178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_delete_scale_engine</span> <span class="ruby-identifier">argv</span>
506
- 179: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
507
- 180: <span class="ruby-identifier">bot_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'bot_id'</span>]
508
- 181: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">delete_scale_engine</span>(<span class="ruby-identifier">bot_id</span>)
509
- 182: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
510
- 183: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
511
- 184: <span class="ruby-keyword kw">end</span></pre>
512
- </div>
513
-
514
- </div>
515
-
516
-
517
-
518
-
519
- </div>
520
-
521
-
522
- <div id="cmd-help-method" class="method-detail ">
523
- <a name="method-i-cmd_help"></a>
524
-
525
- <div class="method-heading">
526
-
527
- <span class="method-name">cmd_help</span><span
528
- class="method-args">(argv)</span>
529
- <span class="method-click-advice">click to toggle source</span>
530
-
531
- </div>
532
-
533
- <div class="method-description">
534
-
535
- <p>
536
- outputs help for this command
537
- </p>
538
-
539
-
540
-
541
- <div class="method-source-code"
542
- id="cmd-help-source">
543
- <pre>
544
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 10</span>
545
- 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
546
- 11: <span class="ruby-identifier">help</span>
547
- 12: <span class="ruby-keyword kw">end</span></pre>
548
- </div>
549
-
550
- </div>
551
-
552
-
553
-
554
-
555
- </div>
556
-
557
-
558
- <div id="cmd-list-method" class="method-detail ">
559
- <a name="method-i-cmd_list"></a>
560
-
561
- <div class="method-heading">
562
-
563
- <span class="method-name">cmd_list</span><span
564
- class="method-args">(argv)</span>
565
- <span class="method-click-advice">click to toggle source</span>
566
-
567
- </div>
568
-
569
- <div class="method-description">
570
-
571
- <p>
572
- returns an array of currently reserved scale engines
573
- </p>
574
- <pre>
575
- * argv = command-line arguments</pre>
576
-
577
-
578
-
579
- <div class="method-source-code"
580
- id="cmd-list-source">
581
- <pre>
582
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 64</span>
583
- 64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_list</span> <span class="ruby-identifier">argv</span>
584
- 65: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
585
- 66: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">list</span>
586
- 67: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
587
- 68: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
588
- 69: <span class="ruby-keyword kw">end</span></pre>
589
- </div>
590
-
591
- </div>
592
-
593
-
594
-
595
-
596
- </div>
597
-
598
-
599
- <div id="cmd-pattern-method" class="method-detail ">
600
- <a name="method-i-cmd_pattern"></a>
601
-
602
- <div class="method-heading">
603
-
604
- <span class="method-name">cmd_pattern</span><span
605
- class="method-args">(argv)</span>
606
- <span class="method-click-advice">click to toggle source</span>
607
-
608
- </div>
609
-
610
- <div class="method-description">
611
-
612
- <p>
613
- returns scale test data for charting
614
- </p>
615
- <pre>
616
- * argv = command-line arguments, requires:
617
- * zoom (z) level
618
- * position(-p 0)</pre>
619
-
620
-
621
-
622
- <div class="method-source-code"
623
- id="cmd-pattern-source">
624
- <pre>
625
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 125</span>
626
- 125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_pattern</span> <span class="ruby-identifier">argv</span>
627
- 126: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
628
- 127: <span class="ruby-keyword kw">begin</span>
629
- 128: <span class="ruby-identifier">zoom</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'zoom'</span>]
630
- 129: <span class="ruby-identifier">position</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'view_position'</span>]
631
- 130: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">pattern</span>(<span class="ruby-identifier">zoom</span>, <span class="ruby-identifier">position</span>)
632
- 131: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
633
- 132: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">e</span>
634
- 133: <span class="ruby-keyword kw">end</span>
635
- 134: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
636
- 135: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
637
- 136: <span class="ruby-keyword kw">end</span></pre>
638
- </div>
639
-
640
- </div>
641
-
642
-
643
-
644
-
645
- </div>
646
-
647
-
648
- <div id="cmd-pcap-method" class="method-detail ">
649
- <a name="method-i-cmd_pcap"></a>
650
-
651
- <div class="method-heading">
652
-
653
- <span class="method-name">cmd_pcap</span><span
654
- class="method-args">(argv)</span>
655
- <span class="method-click-advice">click to toggle source</span>
656
-
657
- </div>
658
-
659
- <div class="method-description">
660
-
661
- <p>
662
- returns a packet capture file from scale verify
663
- </p>
664
- <pre>
665
- * argv = command-line arguments, requires a scale engine id (-b) and the pcap filename (-f) argument</pre>
666
-
667
-
668
-
669
- <div class="method-source-code"
670
- id="cmd-pcap-source">
671
- <pre>
672
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 82</span>
673
- 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_pcap</span> <span class="ruby-identifier">argv</span>
674
- 83: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
675
- 84: <span class="ruby-identifier">bot_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'bot_id'</span>]
676
- 85: <span class="ruby-identifier">file</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'filename'</span>]
677
- 86: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">pcap</span>(<span class="ruby-identifier">bot_id</span>, <span class="ruby-identifier">file</span>)
678
- 87: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
679
- 88: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
680
- 89: <span class="ruby-keyword kw">end</span></pre>
681
- </div>
682
-
683
- </div>
684
-
685
-
686
-
687
-
688
- </div>
689
-
690
-
691
- <div id="cmd-release-method" class="method-detail ">
692
- <a name="method-i-cmd_release"></a>
693
-
694
- <div class="method-heading">
695
-
696
- <span class="method-name">cmd_release</span><span
697
- class="method-args">(argv)</span>
698
- <span class="method-click-advice">click to toggle source</span>
699
-
700
- </div>
701
-
702
- <div class="method-description">
703
-
704
- <p>
705
- releases the currently reserved scale engine
706
- </p>
707
- <pre>
708
- * argv = command-line arguments</pre>
709
-
710
-
711
-
712
- <div class="method-source-code"
713
- id="cmd-release-source">
714
- <pre>
715
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 149</span>
716
- 149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_release</span> <span class="ruby-identifier">argv</span>
717
- 150: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
718
- 151: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
719
- 152: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
720
- 153: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
721
- 154: <span class="ruby-keyword kw">end</span></pre>
722
- </div>
723
-
724
- </div>
725
-
726
-
727
-
728
-
729
- </div>
730
-
731
-
732
- <div id="cmd-release-scale-engine-method" class="method-detail ">
733
- <a name="method-i-cmd_release_scale_engine"></a>
734
-
735
- <div class="method-heading">
736
-
737
- <span class="method-name">cmd_release_scale_engine</span><span
738
- class="method-args">(argv)</span>
739
- <span class="method-click-advice">click to toggle source</span>
740
-
741
- </div>
742
-
743
- <div class="method-description">
744
-
745
- <p>
746
- releases a scale engine
747
- </p>
748
- <pre>
749
- * argv = command-line arguments, require a scale engine id (-b) argument</pre>
750
-
751
-
752
-
753
- <div class="method-source-code"
754
- id="cmd-release-scale-engine-source">
755
- <pre>
756
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 168</span>
757
- 168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_release_scale_engine</span> <span class="ruby-identifier">argv</span>
758
- 169: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
759
- 170: <span class="ruby-identifier">bot_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'bot_id'</span>]
760
- 171: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release_scale_engine</span>(<span class="ruby-identifier">bot_id</span>)
761
- 172: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
762
- 173: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
763
- 174: <span class="ruby-keyword kw">end</span></pre>
764
- </div>
765
-
766
- </div>
767
-
768
-
769
-
770
-
771
- </div>
772
-
773
-
774
- <div id="cmd-reserve-scale-engine-method" class="method-detail ">
775
- <a name="method-i-cmd_reserve_scale_engine"></a>
776
-
777
- <div class="method-heading">
778
-
779
- <span class="method-name">cmd_reserve_scale_engine</span><span
780
- class="method-args">(argv)</span>
781
- <span class="method-click-advice">click to toggle source</span>
782
-
783
- </div>
784
-
785
- <div class="method-description">
786
-
787
- <p>
788
- reserves a scale engine
789
- </p>
790
- <pre>
791
- * argv = command-line arguments, require a scale engine id (-b) argument</pre>
792
-
793
-
794
-
795
- <div class="method-source-code"
796
- id="cmd-reserve-scale-engine-source">
797
- <pre>
798
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 158</span>
799
- 158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_reserve_scale_engine</span> <span class="ruby-identifier">argv</span>
800
- 159: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
801
- 160: <span class="ruby-identifier">bot_id</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'bot_id'</span>]
802
- 161: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">reserve_scale_engine</span>(<span class="ruby-identifier">bot_id</span>)
803
- 162: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
804
- 163: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
805
- 164: <span class="ruby-keyword kw">end</span></pre>
806
- </div>
807
-
808
- </div>
809
-
810
-
811
-
812
-
813
- </div>
814
-
815
-
816
- <div id="cmd-start-method" class="method-detail ">
817
- <a name="method-i-cmd_start"></a>
818
-
819
- <div class="method-heading">
820
-
821
- <span class="method-name">cmd_start</span><span
822
- class="method-args">(argv)</span>
823
- <span class="method-click-advice">click to toggle source</span>
824
-
825
- </div>
826
-
827
- <div class="method-description">
828
-
829
- <p>
830
- starts a scale test
831
- </p>
832
- <pre>
833
- * argv = command-line arguments, requires a scale json object to have been configured</pre>
834
-
835
-
836
-
837
- <div class="method-source-code"
838
- id="cmd-start-source">
839
- <pre>
840
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 27</span>
841
- 27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_start</span> <span class="ruby-identifier">argv</span>
842
- 28: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
843
- 29: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">start</span>
844
- 30: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
845
- 31: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
846
- 32: <span class="ruby-keyword kw">end</span></pre>
847
- </div>
848
-
849
- </div>
850
-
851
-
852
-
853
-
854
- </div>
855
-
856
-
857
- <div id="cmd-status-method" class="method-detail ">
858
- <a name="method-i-cmd_status"></a>
859
-
860
- <div class="method-heading">
861
-
862
- <span class="method-name">cmd_status</span><span
863
- class="method-args">(argv)</span>
864
- <span class="method-click-advice">click to toggle source</span>
865
-
866
- </div>
867
-
868
- <div class="method-description">
869
-
870
- <p>
871
- returns status from a scale test
872
- </p>
873
- <pre>
874
- * argv = command-line arguments</pre>
875
-
876
-
877
-
878
- <div class="method-source-code"
879
- id="cmd-status-source">
880
- <pre>
881
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 55</span>
882
- 55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_status</span> <span class="ruby-identifier">argv</span>
883
- 56: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
884
- 57: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
885
- 58: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
886
- 59: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
887
- 60: <span class="ruby-keyword kw">end</span></pre>
888
- </div>
889
-
890
- </div>
891
-
892
-
893
-
894
-
895
- </div>
896
-
897
-
898
- <div id="cmd-statuses-method" class="method-detail ">
899
- <a name="method-i-cmd_statuses"></a>
900
-
901
- <div class="method-heading">
902
-
903
- <span class="method-name">cmd_statuses</span><span
904
- class="method-args">(argv)</span>
905
- <span class="method-click-advice">click to toggle source</span>
906
-
907
- </div>
908
-
909
- <div class="method-description">
910
-
911
- <p>
912
- returns the status of all reserved scale engines
913
- </p>
914
- <pre>
915
- * argv = command-line arguments</pre>
916
-
917
-
918
-
919
- <div class="method-source-code"
920
- id="cmd-statuses-source">
921
- <pre>
922
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 93</span>
923
- 93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_statuses</span> <span class="ruby-identifier">argv</span>
924
- 94: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
925
- 95: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">statuses</span>
926
- 96: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
927
- 97: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
928
- 98: <span class="ruby-keyword kw">end</span></pre>
929
- </div>
930
-
931
- </div>
932
-
933
-
934
-
935
-
936
- </div>
937
-
938
-
939
- <div id="cmd-stop-method" class="method-detail ">
940
- <a name="method-i-cmd_stop"></a>
941
-
942
- <div class="method-heading">
943
-
944
- <span class="method-name">cmd_stop</span><span
945
- class="method-args">(argv)</span>
946
- <span class="method-click-advice">click to toggle source</span>
947
-
948
- </div>
949
-
950
- <div class="method-description">
951
-
952
- <p>
953
- stops a scale test
954
- </p>
955
- <pre>
956
- * argv = command-line arguments</pre>
957
-
958
-
959
-
960
- <div class="method-source-code"
961
- id="cmd-stop-source">
962
- <pre>
963
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 140</span>
964
- 140: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_stop</span> <span class="ruby-identifier">argv</span>
965
- 141: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
966
- 142: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">stop</span>
967
- 143: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
968
- 144: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
969
- 145: <span class="ruby-keyword kw">end</span></pre>
970
- </div>
971
-
972
- </div>
973
-
974
-
975
-
976
-
977
- </div>
978
-
979
-
980
- <div id="cmd-update-method" class="method-detail ">
981
- <a name="method-i-cmd_update"></a>
982
-
983
- <div class="method-heading">
984
-
985
- <span class="method-name">cmd_update</span><span
986
- class="method-args">(argv)</span>
987
- <span class="method-click-advice">click to toggle source</span>
988
-
989
- </div>
990
-
991
- <div class="method-description">
992
-
993
- <p>
994
- updates a running scale test (valid only if the test is running with no
995
- pattern)
996
- </p>
997
- <pre>
998
- * argv = command-line arguments, requires a json params object (-p) such as '{ &quot;volume&quot;: 100 }'</pre>
999
-
1000
-
1001
-
1002
- <div class="method-source-code"
1003
- id="cmd-update-source">
1004
- <pre>
1005
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 45</span>
1006
- 45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_update</span> <span class="ruby-identifier">argv</span>
1007
- 46: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1008
- 47: <span class="ruby-identifier">params</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'params'</span>]
1009
- 48: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">params</span>)
1010
- 49: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
1011
- 50: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
1012
- 51: <span class="ruby-keyword kw">end</span></pre>
1013
- </div>
1014
-
1015
- </div>
1016
-
1017
-
1018
-
1019
-
1020
- </div>
1021
-
1022
-
1023
- <div id="cmd-verify-method" class="method-detail ">
1024
- <a name="method-i-cmd_verify"></a>
1025
-
1026
- <div class="method-heading">
1027
-
1028
- <span class="method-name">cmd_verify</span><span
1029
- class="method-args">(argv)</span>
1030
- <span class="method-click-advice">click to toggle source</span>
1031
-
1032
- </div>
1033
-
1034
- <div class="method-description">
1035
-
1036
- <p>
1037
- verifies a scale test
1038
- </p>
1039
- <pre>
1040
- * argv = command-line arguments, requires a scale json object to have been configured</pre>
1041
-
1042
-
1043
-
1044
- <div class="method-source-code"
1045
- id="cmd-verify-source">
1046
- <pre>
1047
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 36</span>
1048
- 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_verify</span> <span class="ruby-identifier">argv</span>
1049
- 37: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1050
- 38: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">verify</span>
1051
- 39: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
1052
- 40: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
1053
- 41: <span class="ruby-keyword kw">end</span></pre>
1054
- </div>
1055
-
1056
- </div>
1057
-
1058
-
1059
-
1060
-
1061
- </div>
1062
-
1063
-
1064
- </div>
1065
-
1066
- <div id="private-instance-method-details" class="method-section section">
1067
- <h3 class="section-header">Private Instance Methods</h3>
1068
-
1069
-
1070
- <div id="help-method" class="method-detail ">
1071
- <a name="method-i-help"></a>
1072
-
1073
- <div class="method-heading">
1074
-
1075
- <span class="method-name">help</span><span
1076
- class="method-args">()</span>
1077
- <span class="method-click-advice">click to toggle source</span>
1078
-
1079
- </div>
1080
-
1081
- <div class="method-description">
1082
-
1083
-
1084
-
1085
-
1086
-
1087
- <div class="method-source-code"
1088
- id="help-source">
1089
- <pre>
1090
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 277</span>
1091
- 277: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
1092
- 278: <span class="ruby-identifier">helps</span> = [
1093
- 279: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-b'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--bot_id'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'scale engine identifier'</span> },
1094
- 280: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-c'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--config_file'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'change json config_file'</span> },
1095
- 281: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-f'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--filename'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'pcap filename'</span> },
1096
- 282: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-h'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--help'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'help on command line options'</span> },
1097
- 283: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-m'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--mu_string'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'user, password, mu_ip in the form of admin:admin@10.9.8.7'</span> },
1098
- 284: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-o'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--output'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'output logging to this file'</span> },
1099
- 285: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-p'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--params'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'param(s) for configure or update'</span> },
1100
- 286: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-ps'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--view_position'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'view position for data calls'</span> },
1101
- 287: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-pv'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--param_value'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'param value for configure'</span> },
1102
- 288: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-v'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--verbose'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'set Logger::DEBUG level'</span> },
1103
- 289: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-w'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--view'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'view (RUNTIME|CALLGRAPH) for data calls'</span> },
1104
- 290: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-z'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--zoom'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'zoom value for data calls'</span> }
1105
- 291: ]
1106
- 292:
1107
- 293: <span class="ruby-identifier">cmds</span> = [
1108
- 294: <span class="ruby-value str">&quot;mu cmd_scale:about&quot;</span>,
1109
- 295: <span class="ruby-value str">&quot;mu cmd_scale:configure -p &lt;param&gt; -pv &lt;value&gt;&quot;</span>,
1110
- 296: <span class="ruby-value str">&quot;mu cmd_scale:data -w &lt;view&gt; -z &lt;zoom&gt; -ps &lt;position&gt; -b &lt;bot_id&gt;&quot;</span>,
1111
- 297: <span class="ruby-value str">&quot;mu cmd_scale:delete_scale_engine -b &lt;bot_id&gt;&quot;</span>,
1112
- 298: <span class="ruby-value str">&quot;mu cmd_scale:help&quot;</span>,
1113
- 299: <span class="ruby-value str">&quot;mu cmd_scale:list&quot;</span>,
1114
- 300: <span class="ruby-value str">&quot;mu cmd_scale:pattern -z &lt;zoom&gt; -ps &lt;position&gt; &quot;</span>,
1115
- 301: <span class="ruby-value str">&quot;mu cmd_scale:pcap -b &lt;bot_id&gt; -f &lt;filename&gt;&quot;</span>,
1116
- 302: <span class="ruby-value str">&quot;mu cmd_scale:release&quot;</span>,
1117
- 303: <span class="ruby-value str">&quot;mu cmd_scale:release_scale_engine -b &lt;bot_id&gt;&quot;</span>,
1118
- 304: <span class="ruby-value str">&quot;mu cmd_scale:reserve_scale_engine -b &lt;bot_id&gt;&quot;</span>,
1119
- 305: <span class="ruby-value str">&quot;mu cmd_scale:session (a.k.a. /new)&quot;</span>, <span class="ruby-comment cmt"># new</span>
1120
- 306: <span class="ruby-value str">&quot;mu cmd_scale:start&quot;</span>,
1121
- 307: <span class="ruby-value str">&quot;mu cmd_scale:status&quot;</span>,
1122
- 308: <span class="ruby-value str">&quot;mu cmd_scale:statuses&quot;</span>,
1123
- 309: <span class="ruby-value str">&quot;mu cmd_scale:stop&quot;</span>,
1124
- 310: <span class="ruby-value str">&quot;mu cmd_scale:update -p &lt;params&gt;&quot;</span>,
1125
- 311: <span class="ruby-value str">&quot;mu cmd_scale:verify&quot;</span>
1126
- 312: ]
1127
- 313:
1128
- 314: <span class="ruby-identifier">max_long_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-value">:long</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
1129
- 315: <span class="ruby-identifier">max_value_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-value">:value</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
1130
- 316: <span class="ruby-identifier">puts</span>
1131
- 317: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Usage: mu cmd_scale &lt;options&gt;&quot;</span>
1132
- 318: <span class="ruby-identifier">puts</span>
1133
- 319: <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span>
1134
- 320: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;%-*s %*s %-*s %s&quot;</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">max_long_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:long</span>], <span class="ruby-value">2</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:short</span>], <span class="ruby-identifier">max_value_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:value</span>], <span class="ruby-identifier">h</span>[<span class="ruby-value">:help</span>]]
1135
- 321: <span class="ruby-keyword kw">end</span>
1136
- 322: <span class="ruby-identifier">puts</span>
1137
- 323: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Available Commands&quot;</span>
1138
- 324: <span class="ruby-identifier">puts</span>
1139
- 325: <span class="ruby-identifier">cmds</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">|</span>
1140
- 326: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
1141
- 327: <span class="ruby-keyword kw">end</span>
1142
- 328: <span class="ruby-identifier">puts</span>
1143
- 329: <span class="ruby-keyword kw">end</span></pre>
1144
- </div>
1145
-
1146
- </div>
1147
-
1148
-
1149
-
1150
-
1151
- </div>
1152
-
1153
-
1154
- <div id="parse-cli-method" class="method-detail ">
1155
- <a name="method-i-parse_cli"></a>
1156
-
1157
- <div class="method-heading">
1158
-
1159
- <span class="method-name">parse_cli</span><span
1160
- class="method-args">(argv)</span>
1161
- <span class="method-click-advice">click to toggle source</span>
1162
-
1163
- </div>
1164
-
1165
- <div class="method-description">
1166
-
1167
-
1168
-
1169
-
1170
-
1171
- <div class="method-source-code"
1172
- id="parse-cli-source">
1173
- <pre>
1174
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 199</span>
1175
- 199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
1176
- 200: <span class="ruby-ivar">@hash</span> = {}
1177
- 201: <span class="ruby-identifier">args</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
1178
- 202: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">empty?</span>
1179
- 203: <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">first</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">'-'</span>
1180
- 204:
1181
- 205: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
1182
- 206:
1183
- 207: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-b'</span>, <span class="ruby-value str">'--bot_id'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1184
- 208: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'bot_id'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1185
- 209: <span class="ruby-keyword kw">next</span>
1186
- 210: <span class="ruby-keyword kw">end</span>
1187
- 211:
1188
- 212: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-c'</span>, <span class="ruby-value str">'--config_file'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1189
- 213: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;process -c&quot;</span>
1190
- 214: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'SCALE_CONFIG_FILE'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1191
- 215: <span class="ruby-keyword kw">next</span>
1192
- 216: <span class="ruby-keyword kw">end</span>
1193
- 217:
1194
- 218: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-f'</span>, <span class="ruby-value str">'--filename'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1195
- 219: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'filename'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1196
- 220: <span class="ruby-keyword kw">next</span>
1197
- 221: <span class="ruby-keyword kw">end</span>
1198
- 222:
1199
- 223: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-h'</span>, <span class="ruby-value str">'--help'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1200
- 224: <span class="ruby-identifier">help</span>
1201
- 225: <span class="ruby-identifier">exit</span>
1202
- 226: <span class="ruby-keyword kw">end</span>
1203
- 227:
1204
- 228: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-m'</span>, <span class="ruby-value str">'--mu_string'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1205
- 229: <span class="ruby-identifier">mu_string</span> = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1206
- 230: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mu_string</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.+?):(.+?)@(.*)/</span>
1207
- 231: <span class="ruby-identifier">@@mu_admin_user</span> = <span class="ruby-node">$1</span>
1208
- 232: <span class="ruby-identifier">@@mu_admin_pass</span> = <span class="ruby-node">$2</span>
1209
- 233: <span class="ruby-identifier">@@mu_ip</span> = <span class="ruby-node">$3</span>
1210
- 234: <span class="ruby-keyword kw">end</span>
1211
- 235: <span class="ruby-keyword kw">next</span>
1212
- 236: <span class="ruby-keyword kw">end</span>
1213
- 237:
1214
- 238: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-o'</span>, <span class="ruby-value str">'--output'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1215
- 239: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>), <span class="ruby-value str">&quot;w&quot;</span>)
1216
- 240: <span class="ruby-keyword kw">next</span>
1217
- 241: <span class="ruby-keyword kw">end</span>
1218
- 242:
1219
- 243: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-p'</span>, <span class="ruby-value str">'--params'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1220
- 244: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'params'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1221
- 245: <span class="ruby-keyword kw">next</span>
1222
- 246: <span class="ruby-keyword kw">end</span>
1223
- 247:
1224
- 248: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-ps'</span>, <span class="ruby-value str">'--view_position'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1225
- 249: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'view_position'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1226
- 250: <span class="ruby-keyword kw">next</span>
1227
- 251: <span class="ruby-keyword kw">end</span>
1228
- 252:
1229
- 253: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-pv'</span>, <span class="ruby-value str">'--param_value'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1230
- 254: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'param_value'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1231
- 255: <span class="ruby-keyword kw">next</span>
1232
- 256: <span class="ruby-keyword kw">end</span>
1233
- 257:
1234
- 258: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-v'</span>, <span class="ruby-value str">'--verbose'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1235
- 259: <span class="ruby-identifier">$log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1236
- 260: <span class="ruby-keyword kw">next</span>
1237
- 261: <span class="ruby-keyword kw">end</span>
1238
- 262:
1239
- 263: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-w'</span>, <span class="ruby-value str">'--view'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1240
- 264: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'view'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1241
- 265: <span class="ruby-keyword kw">next</span>
1242
- 266: <span class="ruby-keyword kw">end</span>
1243
- 267:
1244
- 268: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-z'</span>, <span class="ruby-value str">'--zoom'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
1245
- 269: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'zoom'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
1246
- 270: <span class="ruby-keyword kw">next</span>
1247
- 271: <span class="ruby-keyword kw">end</span>
1248
- 272: <span class="ruby-keyword kw">end</span>
1249
- 273:
1250
- 274: <span class="ruby-identifier">args</span>
1251
- 275: <span class="ruby-keyword kw">end</span></pre>
1252
- </div>
1253
-
1254
- </div>
1255
-
1256
-
1257
-
1258
-
1259
- </div>
1260
-
1261
-
1262
- <div id="setup-method" class="method-detail ">
1263
- <a name="method-i-setup"></a>
1264
-
1265
- <div class="method-heading">
1266
-
1267
- <span class="method-name">setup</span><span
1268
- class="method-args">(argv)</span>
1269
- <span class="method-click-advice">click to toggle source</span>
1270
-
1271
- </div>
1272
-
1273
- <div class="method-description">
1274
-
1275
-
1276
-
1277
-
1278
-
1279
- <div class="method-source-code"
1280
- id="setup-source">
1281
- <pre>
1282
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_scale.rb, line 188</span>
1283
- 188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1284
- 189: <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
1285
- 190: <span class="ruby-ivar">@host</span> = (<span class="ruby-identifier">@@mu_ip</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;127.0.0.1&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_ip</span>
1286
- 191: <span class="ruby-ivar">@username</span> = (<span class="ruby-identifier">@@mu_admin_user</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;admin&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_admin_user</span>
1287
- 192: <span class="ruby-ivar">@password</span> = (<span class="ruby-identifier">@@mu_admin_pass</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;admin&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_admin_pass</span>
1288
- 193: <span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</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>)
1289
- 194: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">session</span>
1290
- 195: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
1291
- 196: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
1292
- 197: <span class="ruby-keyword kw">end</span></pre>
1293
- </div>
1294
-
1295
- </div>
1296
-
1297
-
1298
-
1299
-
1300
- </div>
1301
-
1302
-
1303
- </div>
1304
-
1305
-
1306
- </div>
1307
-
1308
-
1309
- <div id="rdoc-debugging-section-dump" class="debugging-section">
1310
-
1311
- <p>Disabled; run with --debug to generate this.</p>
1312
-
1313
- </div>
1314
-
1315
- <div id="validator-badges">
1316
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1317
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1318
- Rdoc Generator</a> 1.1.6</small>.</p>
1319
- </div>
1320
-
1321
- </body>
1322
- </html>
1323
-