mu 5.7.8 → 5.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mu.rb +1 -1
- data/lib/mu/command.rb +18 -2
- data/lib/mu/command/cmd_musl.rb +165 -0
- data/lib/mu/command/cmd_runscale.rb +12 -8
- data/lib/mu/command/help.rb +1 -0
- data/lib/mu/har.rb +449 -0
- data/lib/mu/libxml.rb +21 -0
- data/lib/mu/maker.rb +288 -0
- data/lib/mu/xmlizable.rb +559 -0
- metadata +78 -267
- data/rdoc/Gemfile.html +0 -194
- data/rdoc/LICENSE_txt.html +0 -201
- data/rdoc/Mu.html +0 -478
- data/rdoc/Mu/Client.html +0 -461
- data/rdoc/Mu/Command.html +0 -338
- data/rdoc/Mu/Command/API.html +0 -844
- data/rdoc/Mu/Command/Cmd_appid.html +0 -1341
- data/rdoc/Mu/Command/Cmd_cli.html +0 -800
- data/rdoc/Mu/Command/Cmd_ddt.html +0 -1612
- data/rdoc/Mu/Command/Cmd_homepage.html +0 -762
- data/rdoc/Mu/Command/Cmd_muapi.html +0 -1363
- data/rdoc/Mu/Command/Cmd_netconfig.html +0 -1077
- data/rdoc/Mu/Command/Cmd_runscale.html +0 -1441
- data/rdoc/Mu/Command/Cmd_runscenario.html +0 -787
- data/rdoc/Mu/Command/Cmd_runverify.html +0 -893
- data/rdoc/Mu/Command/Cmd_scale.html +0 -1323
- data/rdoc/Mu/Command/Cmd_system.html +0 -677
- data/rdoc/Mu/Command/Curl.html +0 -751
- data/rdoc/Mu/Command/Help.html +0 -305
- data/rdoc/Mu/Curl.html +0 -243
- data/rdoc/Mu/Curl/Error.html +0 -304
- data/rdoc/Mu/Curl/Error/Authorize.html +0 -355
- data/rdoc/Mu/Curl/Error/Connect.html +0 -286
- data/rdoc/Mu/Curl/Error/DNS.html +0 -236
- data/rdoc/Mu/Curl/Error/Region.html +0 -307
- data/rdoc/Mu/Curl/Error/Status.html +0 -286
- data/rdoc/Mu/Curl/Error/Timeout.html +0 -286
- data/rdoc/Mu/Curl/Verify.html +0 -472
- data/rdoc/Mu/Curl/Verify/Request.html +0 -424
- data/rdoc/Mu/Curl/Verify/Response.html +0 -372
- data/rdoc/Mu/Curl/Verify/Result.html +0 -373
- data/rdoc/Mu/Ddt.html +0 -1347
- data/rdoc/Mu/Helper.html +0 -517
- data/rdoc/Mu/Homepage.html +0 -719
- data/rdoc/Mu/HttpHelper.html +0 -890
- data/rdoc/Mu/Muapi.html +0 -1226
- data/rdoc/Mu/Netconfig.html +0 -1178
- data/rdoc/Mu/Scale.html +0 -1359
- data/rdoc/Mu/System.html +0 -504
- data/rdoc/Object.html +0 -285
- data/rdoc/README_rdoc.html +0 -892
- data/rdoc/Rakefile.html +0 -257
- data/rdoc/TCTestMu.html +0 -2583
- data/rdoc/Test.html +0 -235
- data/rdoc/Test/Unit.html +0 -235
- data/rdoc/Test/Unit/TestCase.html +0 -236
- data/rdoc/Test/helper_rb.html +0 -62
- data/rdoc/Test/tc_test_mu_rb.html +0 -60
- data/rdoc/VERSION.html +0 -179
- data/rdoc/bin/mu.html +0 -54
- data/rdoc/classes/Mu.html +0 -132
- data/rdoc/classes/Mu/Client.html +0 -214
- data/rdoc/classes/Mu/Command.html +0 -129
- data/rdoc/classes/Mu/Command/API.html +0 -362
- data/rdoc/classes/Mu/Command/Cmd_appid.html +0 -238
- data/rdoc/classes/Mu/Command/Cmd_cli.html +0 -273
- data/rdoc/classes/Mu/Command/Cmd_ddt.html +0 -639
- data/rdoc/classes/Mu/Command/Cmd_homepage.html +0 -276
- data/rdoc/classes/Mu/Command/Cmd_muapi.html +0 -527
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +0 -399
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +0 -220
- data/rdoc/classes/Mu/Command/Cmd_runscenario.html +0 -197
- data/rdoc/classes/Mu/Command/Cmd_runverify.html +0 -196
- data/rdoc/classes/Mu/Command/Cmd_scale.html +0 -511
- data/rdoc/classes/Mu/Command/Cmd_system.html +0 -236
- data/rdoc/classes/Mu/Command/Curl.html +0 -182
- data/rdoc/classes/Mu/Command/Help.html +0 -137
- data/rdoc/classes/Mu/Curl.html +0 -116
- data/rdoc/classes/Mu/Curl/Error.html +0 -148
- data/rdoc/classes/Mu/Curl/Error/Authorize.html +0 -165
- data/rdoc/classes/Mu/Curl/Error/Connect.html +0 -139
- data/rdoc/classes/Mu/Curl/Error/DNS.html +0 -113
- data/rdoc/classes/Mu/Curl/Error/Region.html +0 -150
- data/rdoc/classes/Mu/Curl/Error/Status.html +0 -139
- data/rdoc/classes/Mu/Curl/Error/Timeout.html +0 -139
- data/rdoc/classes/Mu/Curl/Verify.html +0 -207
- data/rdoc/classes/Mu/Curl/Verify/Request.html +0 -187
- data/rdoc/classes/Mu/Curl/Verify/Response.html +0 -172
- data/rdoc/classes/Mu/Curl/Verify/Result.html +0 -172
- data/rdoc/classes/Mu/Ddt.html +0 -610
- data/rdoc/classes/Mu/Helper.html +0 -308
- data/rdoc/classes/Mu/Homepage.html +0 -306
- data/rdoc/classes/Mu/HttpHelper.html +0 -393
- data/rdoc/classes/Mu/Muapi.html +0 -549
- data/rdoc/classes/Mu/Netconfig.html +0 -478
- data/rdoc/classes/Mu/Scale.html +0 -580
- data/rdoc/classes/Mu/System.html +0 -232
- data/rdoc/classes/Object.html +0 -139
- data/rdoc/classes/TCTestMu.html +0 -948
- data/rdoc/classes/Test.html +0 -107
- data/rdoc/classes/Test/Unit.html +0 -107
- data/rdoc/classes/Test/Unit/TestCase.html +0 -113
- data/rdoc/created.rid +0 -36
- data/rdoc/files/lib/mu/api/ddt_rb.html +0 -101
- data/rdoc/files/lib/mu/api/homepage_rb.html +0 -101
- data/rdoc/files/lib/mu/api/muapi_rb.html +0 -101
- data/rdoc/files/lib/mu/api/netconfig_rb.html +0 -101
- data/rdoc/files/lib/mu/api/scale_rb.html +0 -101
- data/rdoc/files/lib/mu/api/system_rb.html +0 -101
- data/rdoc/files/lib/mu/client_rb.html +0 -101
- data/rdoc/files/lib/mu/command/api_rb.html +0 -101
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +0 -119
- data/rdoc/files/lib/mu/command/cmd_cli_rb.html +0 -108
- data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +0 -116
- data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +0 -115
- data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +0 -115
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +0 -116
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +0 -119
- data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +0 -115
- data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +0 -118
- data/rdoc/files/lib/mu/command/cmd_scale_rb.html +0 -115
- data/rdoc/files/lib/mu/command/cmd_system_rb.html +0 -116
- data/rdoc/files/lib/mu/command/curl_rb.html +0 -101
- data/rdoc/files/lib/mu/command/help_rb.html +0 -101
- data/rdoc/files/lib/mu/command_rb.html +0 -107
- data/rdoc/files/lib/mu/curl/error_rb.html +0 -101
- data/rdoc/files/lib/mu/curl/verify_rb.html +0 -101
- data/rdoc/files/lib/mu/helper_rb.html +0 -101
- data/rdoc/files/lib/mu/http_helper_rb.html +0 -101
- data/rdoc/files/lib/mu_rb.html +0 -121
- data/rdoc/files/test/helper_rb.html +0 -112
- data/rdoc/files/test/tc_test_mu_rb.html +0 -111
- data/rdoc/fr_class_index.html +0 -34
- data/rdoc/fr_file_index.html +0 -31
- data/rdoc/fr_method_index.html +0 -112
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +0 -884
- data/rdoc/js/darkfish.js +0 -116
- data/rdoc/js/jquery.js +0 -32
- data/rdoc/js/quicksearch.js +0 -114
- data/rdoc/js/thickbox-compressed.js +0 -10
- data/rdoc/lib/mu/api/ddt_rb.html +0 -52
- data/rdoc/lib/mu/api/homepage_rb.html +0 -52
- data/rdoc/lib/mu/api/muapi_rb.html +0 -52
- data/rdoc/lib/mu/api/netconfig_rb.html +0 -52
- data/rdoc/lib/mu/api/scale_rb.html +0 -52
- data/rdoc/lib/mu/api/system_rb.html +0 -52
- data/rdoc/lib/mu/client_rb.html +0 -52
- data/rdoc/lib/mu/command/api_rb.html +0 -52
- data/rdoc/lib/mu/command/cmd_appid_rb.html +0 -62
- data/rdoc/lib/mu/command/cmd_cli_rb.html +0 -55
- data/rdoc/lib/mu/command/cmd_ddt_rb.html +0 -60
- data/rdoc/lib/mu/command/cmd_homepage_rb.html +0 -57
- data/rdoc/lib/mu/command/cmd_muapi_rb.html +0 -59
- data/rdoc/lib/mu/command/cmd_netconfig_rb.html +0 -58
- data/rdoc/lib/mu/command/cmd_runscale_rb.html +0 -62
- data/rdoc/lib/mu/command/cmd_runscenario_rb.html +0 -57
- data/rdoc/lib/mu/command/cmd_runverify_rb.html +0 -61
- data/rdoc/lib/mu/command/cmd_scale_rb.html +0 -58
- data/rdoc/lib/mu/command/cmd_system_rb.html +0 -59
- data/rdoc/lib/mu/command/curl_rb.html +0 -52
- data/rdoc/lib/mu/command/help_rb.html +0 -52
- data/rdoc/lib/mu/command_rb.html +0 -55
- data/rdoc/lib/mu/curl/error_rb.html +0 -52
- data/rdoc/lib/mu/curl/verify_rb.html +0 -52
- data/rdoc/lib/mu/helper_rb.html +0 -52
- data/rdoc/lib/mu/http_helper_rb.html +0 -52
- data/rdoc/lib/mu_rb.html +0 -80
- data/rdoc/rdoc-style.css +0 -208
- data/rdoc/rdoc.css +0 -706
- data/test/data/app_id_stats.csv +0 -1
- data/test/data/app_id_status.json +0 -156
- data/test/data/data_cgi.msl +0 -94
- data/test/data/data_cgi.xml +0 -322
- data/test/data/default_test.csv +0 -3
- data/test/data/ftp_with_channel.xml +0 -1643
- data/test/data/irc.xml +0 -3837
- data/test/data/scale.json +0 -25
- data/test/data/test_data_cgi_error.xml +0 -35
@@ -1,893 +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_runverify</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_runverify_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
-
class="thickbox" title="lib/mu/command/cmd_runverify.rb">lib/mu/command/cmd_runverify.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_help">#cmd_help</a></li>
|
73
|
-
|
74
|
-
<li><a href="#method-i-cmd_run">#cmd_run</a></li>
|
75
|
-
|
76
|
-
<li><a href="#method-i-help">#help</a></li>
|
77
|
-
|
78
|
-
<li><a href="#method-i-output_results">#output_results</a></li>
|
79
|
-
|
80
|
-
<li><a href="#method-i-parse_cli">#parse_cli</a></li>
|
81
|
-
|
82
|
-
<li><a href="#method-i-setup">#setup</a></li>
|
83
|
-
|
84
|
-
<li><a href="#method-i-teardown">#teardown</a></li>
|
85
|
-
|
86
|
-
</ul>
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
<!-- Included Modules -->
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div id="project-metadata">
|
95
|
-
|
96
|
-
|
97
|
-
<div id="fileindex-section" class="section project-section">
|
98
|
-
<h3 class="section-header">Files</h3>
|
99
|
-
<ul>
|
100
|
-
|
101
|
-
<li class="file"><a href="../../Gemfile.html">Gemfile</a></li>
|
102
|
-
|
103
|
-
<li class="file"><a href="../../LICENSE_txt.html">LICENSE.txt</a></li>
|
104
|
-
|
105
|
-
<li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
|
106
|
-
|
107
|
-
<li class="file"><a href="../../Rakefile.html">Rakefile</a></li>
|
108
|
-
|
109
|
-
<li class="file"><a href="../../VERSION.html">VERSION</a></li>
|
110
|
-
|
111
|
-
</ul>
|
112
|
-
</div>
|
113
|
-
|
114
|
-
|
115
|
-
<div id="classindex-section" class="section project-section">
|
116
|
-
<h3 class="section-header">Class Index
|
117
|
-
<span class="search-toggle"><img src="../../images/find.png"
|
118
|
-
height="16" width="16" alt="[+]"
|
119
|
-
title="show/hide quicksearch" /></span></h3>
|
120
|
-
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
121
|
-
<fieldset>
|
122
|
-
<legend>Quicksearch</legend>
|
123
|
-
<input type="text" name="quicksearch" value=""
|
124
|
-
class="quicksearch-field" />
|
125
|
-
</fieldset>
|
126
|
-
</form>
|
127
|
-
|
128
|
-
<ul class="link-list">
|
129
|
-
|
130
|
-
<li><a href="../../Mu.html">Mu</a></li>
|
131
|
-
|
132
|
-
<li><a href="../../Mu/Client.html">Mu::Client</a></li>
|
133
|
-
|
134
|
-
<li><a href="../../Mu/Command.html">Mu::Command</a></li>
|
135
|
-
|
136
|
-
<li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
|
137
|
-
|
138
|
-
<li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
|
139
|
-
|
140
|
-
<li><a href="../../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
|
141
|
-
|
142
|
-
<li><a href="../../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
|
143
|
-
|
144
|
-
<li><a href="../../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
|
145
|
-
|
146
|
-
<li><a href="../../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
|
147
|
-
|
148
|
-
<li><a href="../../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
|
149
|
-
|
150
|
-
<li><a href="../../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
|
151
|
-
|
152
|
-
<li><a href="../../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
|
153
|
-
|
154
|
-
<li><a href="../../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
|
155
|
-
|
156
|
-
<li><a href="../../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
|
157
|
-
|
158
|
-
<li><a href="../../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
|
159
|
-
|
160
|
-
<li><a href="../../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
|
161
|
-
|
162
|
-
<li><a href="../../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
|
163
|
-
|
164
|
-
<li><a href="../../Mu/Command/Help.html">Mu::Command::Help</a></li>
|
165
|
-
|
166
|
-
<li><a href="../../Mu/Curl.html">Mu::Curl</a></li>
|
167
|
-
|
168
|
-
<li><a href="../../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
|
169
|
-
|
170
|
-
<li><a href="../../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
|
171
|
-
|
172
|
-
<li><a href="../../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
|
173
|
-
|
174
|
-
<li><a href="../../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
|
175
|
-
|
176
|
-
<li><a href="../../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
|
177
|
-
|
178
|
-
<li><a href="../../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
|
179
|
-
|
180
|
-
<li><a href="../../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
|
181
|
-
|
182
|
-
<li><a href="../../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
|
183
|
-
|
184
|
-
<li><a href="../../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
|
185
|
-
|
186
|
-
<li><a href="../../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
|
187
|
-
|
188
|
-
<li><a href="../../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
|
189
|
-
|
190
|
-
<li><a href="../../Mu/Ddt.html">Mu::Ddt</a></li>
|
191
|
-
|
192
|
-
<li><a href="../../Mu/Helper.html">Mu::Helper</a></li>
|
193
|
-
|
194
|
-
<li><a href="../../Mu/Homepage.html">Mu::Homepage</a></li>
|
195
|
-
|
196
|
-
<li><a href="../../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
|
197
|
-
|
198
|
-
<li><a href="../../Mu/Muapi.html">Mu::Muapi</a></li>
|
199
|
-
|
200
|
-
<li><a href="../../Mu/Netconfig.html">Mu::Netconfig</a></li>
|
201
|
-
|
202
|
-
<li><a href="../../Mu/Scale.html">Mu::Scale</a></li>
|
203
|
-
|
204
|
-
<li><a href="../../Mu/System.html">Mu::System</a></li>
|
205
|
-
|
206
|
-
<li><a href="../../Test.html">Test</a></li>
|
207
|
-
|
208
|
-
<li><a href="../../Test/Unit.html">Test::Unit</a></li>
|
209
|
-
|
210
|
-
<li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
|
211
|
-
|
212
|
-
<li><a href="../../Object.html">Object</a></li>
|
213
|
-
|
214
|
-
<li><a href="../../TCTestMu.html">TCTestMu</a></li>
|
215
|
-
|
216
|
-
</ul>
|
217
|
-
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
218
|
-
</div>
|
219
|
-
|
220
|
-
|
221
|
-
</div>
|
222
|
-
</div>
|
223
|
-
|
224
|
-
<div id="documentation">
|
225
|
-
<h1 class="class">Mu::Command::Cmd_runverify</h1>
|
226
|
-
|
227
|
-
<div id="description">
|
228
|
-
|
229
|
-
</div>
|
230
|
-
|
231
|
-
<!-- Constants -->
|
232
|
-
|
233
|
-
|
234
|
-
<!-- Attributes -->
|
235
|
-
|
236
|
-
<div id="attribute-method-details" class="method-section section">
|
237
|
-
<h3 class="section-header">Attributes</h3>
|
238
|
-
|
239
|
-
|
240
|
-
<div id="host-attribute-method" class="method-detail">
|
241
|
-
<a name="host"></a>
|
242
|
-
|
243
|
-
<a name="host="></a>
|
244
|
-
|
245
|
-
<div class="method-heading attribute-method-heading">
|
246
|
-
<span class="method-name">host</span><span
|
247
|
-
class="attribute-access-type">[RW]</span>
|
248
|
-
</div>
|
249
|
-
|
250
|
-
<div class="method-description">
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
</div>
|
255
|
-
</div>
|
256
|
-
|
257
|
-
<div id="username-attribute-method" class="method-detail">
|
258
|
-
<a name="username"></a>
|
259
|
-
|
260
|
-
<a name="username="></a>
|
261
|
-
|
262
|
-
<div class="method-heading attribute-method-heading">
|
263
|
-
<span class="method-name">username</span><span
|
264
|
-
class="attribute-access-type">[RW]</span>
|
265
|
-
</div>
|
266
|
-
|
267
|
-
<div class="method-description">
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
</div>
|
272
|
-
</div>
|
273
|
-
|
274
|
-
<div id="password-attribute-method" class="method-detail">
|
275
|
-
<a name="password"></a>
|
276
|
-
|
277
|
-
<a name="password="></a>
|
278
|
-
|
279
|
-
<div class="method-heading attribute-method-heading">
|
280
|
-
<span class="method-name">password</span><span
|
281
|
-
class="attribute-access-type">[RW]</span>
|
282
|
-
</div>
|
283
|
-
|
284
|
-
<div class="method-description">
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
</div>
|
289
|
-
</div>
|
290
|
-
|
291
|
-
<div id="ddt-api-attribute-method" class="method-detail">
|
292
|
-
<a name="ddt_api"></a>
|
293
|
-
|
294
|
-
<a name="ddt_api="></a>
|
295
|
-
|
296
|
-
<div class="method-heading attribute-method-heading">
|
297
|
-
<span class="method-name">ddt_api</span><span
|
298
|
-
class="attribute-access-type">[RW]</span>
|
299
|
-
</div>
|
300
|
-
|
301
|
-
<div class="method-description">
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
</div>
|
306
|
-
</div>
|
307
|
-
|
308
|
-
<div id="errors-attribute-method" class="method-detail">
|
309
|
-
<a name="errors"></a>
|
310
|
-
|
311
|
-
<a name="errors="></a>
|
312
|
-
|
313
|
-
<div class="method-heading attribute-method-heading">
|
314
|
-
<span class="method-name">errors</span><span
|
315
|
-
class="attribute-access-type">[RW]</span>
|
316
|
-
</div>
|
317
|
-
|
318
|
-
<div class="method-description">
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
</div>
|
323
|
-
</div>
|
324
|
-
|
325
|
-
</div>
|
326
|
-
|
327
|
-
|
328
|
-
<!-- Methods -->
|
329
|
-
|
330
|
-
<div id="public-instance-method-details" class="method-section section">
|
331
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
332
|
-
|
333
|
-
|
334
|
-
<div id="cmd-help-method" class="method-detail ">
|
335
|
-
<a name="method-i-cmd_help"></a>
|
336
|
-
|
337
|
-
<div class="method-heading">
|
338
|
-
|
339
|
-
<span class="method-name">cmd_help</span><span
|
340
|
-
class="method-args">(argv)</span>
|
341
|
-
<span class="method-click-advice">click to toggle source</span>
|
342
|
-
|
343
|
-
</div>
|
344
|
-
|
345
|
-
<div class="method-description">
|
346
|
-
|
347
|
-
<p>
|
348
|
-
displays command-line help
|
349
|
-
</p>
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
<div class="method-source-code"
|
354
|
-
id="cmd-help-source">
|
355
|
-
<pre>
|
356
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 12</span>
|
357
|
-
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
|
358
|
-
13: <span class="ruby-identifier">help</span>
|
359
|
-
14: <span class="ruby-keyword kw">end</span></pre>
|
360
|
-
</div>
|
361
|
-
|
362
|
-
</div>
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
</div>
|
368
|
-
|
369
|
-
|
370
|
-
<div id="cmd-run-method" class="method-detail ">
|
371
|
-
<a name="method-i-cmd_run"></a>
|
372
|
-
|
373
|
-
<div class="method-heading">
|
374
|
-
|
375
|
-
<span class="method-name">cmd_run</span><span
|
376
|
-
class="method-args">(argv)</span>
|
377
|
-
<span class="method-click-advice">click to toggle source</span>
|
378
|
-
|
379
|
-
</div>
|
380
|
-
|
381
|
-
<div class="method-description">
|
382
|
-
|
383
|
-
<p>
|
384
|
-
sets up, executes, and closes a Studio Verify session
|
385
|
-
</p>
|
386
|
-
<pre>
|
387
|
-
* argv = command-line arguments, requires a scenario (-s) argument, which must be an xml scenario template to be loaded onto the Mu
|
388
|
-
* and a testset (-t) argument of an xml test set template to be loaded on the Mu
|
389
|
-
* .msl and .csv files are not currently supported</pre>
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
<div class="method-source-code"
|
394
|
-
id="cmd-run-source">
|
395
|
-
<pre>
|
396
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 20</span>
|
397
|
-
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run</span> <span class="ruby-identifier">argv</span>
|
398
|
-
21: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
|
399
|
-
22: <span class="ruby-identifier">setup</span>
|
400
|
-
23:
|
401
|
-
24: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'scenario'</span>]
|
402
|
-
25: <span class="ruby-identifier">msg</span> <span class="ruby-value str">"scenario required"</span>
|
403
|
-
26: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
|
404
|
-
27: <span class="ruby-keyword kw">else</span>
|
405
|
-
28: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'scenario'</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-value str">".xml"</span>)
|
406
|
-
29: <span class="ruby-identifier">scenario</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'scenario'</span>]
|
407
|
-
30: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># TODO: eventually, msl files may be supported by this api</span>
|
408
|
-
31: <span class="ruby-identifier">msg</span> <span class="ruby-value str">"only .xml files are currently supported"</span>
|
409
|
-
32: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
|
410
|
-
33: <span class="ruby-keyword kw">end</span>
|
411
|
-
34: <span class="ruby-keyword kw">end</span>
|
412
|
-
35:
|
413
|
-
36: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'testset'</span>]
|
414
|
-
37: <span class="ruby-identifier">msg</span> <span class="ruby-value str">"testset required"</span>
|
415
|
-
38: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
|
416
|
-
39: <span class="ruby-keyword kw">else</span>
|
417
|
-
40: <span class="ruby-identifier">testset</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'testset'</span>]
|
418
|
-
41: <span class="ruby-keyword kw">end</span>
|
419
|
-
42:
|
420
|
-
43: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'dir'</span>]
|
421
|
-
44: <span class="ruby-identifier">dir</span> = <span class="ruby-value str">"."</span>
|
422
|
-
45: <span class="ruby-keyword kw">else</span>
|
423
|
-
46: <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'dir'</span>]
|
424
|
-
47: <span class="ruby-keyword kw">end</span>
|
425
|
-
48:
|
426
|
-
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">scenario</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"/"</span>)
|
427
|
-
50: <span class="ruby-identifier">scenario_filename</span> = <span class="ruby-identifier">scenario</span>
|
428
|
-
51: <span class="ruby-keyword kw">else</span>
|
429
|
-
52: <span class="ruby-identifier">scenario_filename</span> = <span class="ruby-identifier">dir</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scenario</span>
|
430
|
-
53: <span class="ruby-keyword kw">end</span>
|
431
|
-
54:
|
432
|
-
55: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">testset</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"/"</span>)
|
433
|
-
56: <span class="ruby-identifier">testset_filename</span> = <span class="ruby-identifier">testset</span>
|
434
|
-
57: <span class="ruby-keyword kw">else</span>
|
435
|
-
58: <span class="ruby-identifier">testset_filename</span> = <span class="ruby-identifier">dir</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">testset</span>
|
436
|
-
59: <span class="ruby-keyword kw">end</span>
|
437
|
-
60:
|
438
|
-
61: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'interfaces'</span>]
|
439
|
-
62: <span class="ruby-ivar">@interfaces</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># initialize an empty array</span>
|
440
|
-
63: <span class="ruby-keyword kw">else</span>
|
441
|
-
64: <span class="ruby-ivar">@interfaces</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'interfaces'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">","</span>)
|
442
|
-
65: <span class="ruby-keyword kw">end</span>
|
443
|
-
66:
|
444
|
-
67: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'options'</span>]
|
445
|
-
68: <span class="ruby-ivar">@options</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># initialize an empty array</span>
|
446
|
-
69: <span class="ruby-keyword kw">else</span>
|
447
|
-
70: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'options'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">","</span>)
|
448
|
-
71: <span class="ruby-keyword kw">end</span>
|
449
|
-
72:
|
450
|
-
73: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-value str">'channels'</span>]
|
451
|
-
74: <span class="ruby-ivar">@arg_channels</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># initialize an empty array</span>
|
452
|
-
75: <span class="ruby-keyword kw">else</span>
|
453
|
-
76: <span class="ruby-ivar">@arg_channels</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'channels'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">","</span>)
|
454
|
-
77: <span class="ruby-keyword kw">end</span>
|
455
|
-
78:
|
456
|
-
79: <span class="ruby-ivar">@errors</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
457
|
-
80: <span class="ruby-identifier">hosts_array</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
458
|
-
81: <span class="ruby-identifier">roles_array</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
459
|
-
82:
|
460
|
-
83: <span class="ruby-keyword kw">begin</span>
|
461
|
-
84: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">new_session</span>
|
462
|
-
85:
|
463
|
-
86: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">testset_filename</span>) <span class="ruby-operator">==</span> <span class="ruby-value str">".xml"</span>
|
464
|
-
87: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">testset_filename</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
465
|
-
88: <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">testset_filename</span>)
|
466
|
-
89: <span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">f</span>)
|
467
|
-
90: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post_xml</span>(<span class="ruby-value str">"templates/import"</span>, <span class="ruby-identifier">doc</span>)
|
468
|
-
91: <span class="ruby-identifier">msg</span> <span class="ruby-node">"response from post(#{testset_filename}):\n#{response}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
469
|
-
92: <span class="ruby-identifier">testset_uuid</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//ddt_set"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'uuid'</span>)
|
470
|
-
93: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">testset_filename</span>) <span class="ruby-operator">==</span> <span class="ruby-value str">".csv"</span>
|
471
|
-
94: <span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">csv_import</span>(<span class="ruby-identifier">testset_filename</span>))
|
472
|
-
95: <span class="ruby-identifier">testset_uuid</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//message"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">content</span>
|
473
|
-
96: <span class="ruby-keyword kw">else</span>
|
474
|
-
97: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Testset filename extension must be either .xml or .csv, but filename is #{testset}"</span>
|
475
|
-
98: <span class="ruby-keyword kw">end</span>
|
476
|
-
99:
|
477
|
-
100: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">scenario_filename</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
478
|
-
101: <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">scenario_filename</span>)
|
479
|
-
102: <span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">f</span>)
|
480
|
-
103: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post_xml</span>(<span class="ruby-value str">"templates/import"</span>, <span class="ruby-identifier">doc</span>)
|
481
|
-
104: <span class="ruby-identifier">msg</span> <span class="ruby-node">"response from post(#{scenario_filename}):\n#{response}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
482
|
-
105:
|
483
|
-
106: <span class="ruby-identifier">scenario_name</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//scenario"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'name'</span>)
|
484
|
-
107: <span class="ruby-identifier">hosts</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//hosts/host"</span>)
|
485
|
-
108: <span class="ruby-identifier">scenario_uuid</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//scenario"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'uuid'</span>)
|
486
|
-
109: <span class="ruby-identifier">roles</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//hosts/host/role"</span>)
|
487
|
-
110: <span class="ruby-identifier">ids</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//hosts/host/id"</span>)
|
488
|
-
111: <span class="ruby-identifier">channels</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//steps/channel"</span>)
|
489
|
-
112: <span class="ruby-identifier">type</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//hosts/host/type"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">text</span>
|
490
|
-
113:
|
491
|
-
114: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@interfaces</span>.<span class="ruby-identifier">empty?</span>
|
492
|
-
115: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@interfaces</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">size</span>
|
493
|
-
116: <span class="ruby-identifier">msg</span> <span class="ruby-node">"Error. The number of hosts/interfaces specified on the command-line does not equal the number
|
494
|
-
117: of hosts in the template. #{@interfaces.size} != #{hosts.size}"</span>
|
495
|
-
118: <span class="ruby-keyword kw">return</span>
|
496
|
-
119: <span class="ruby-keyword kw">end</span>
|
497
|
-
120: <span class="ruby-keyword kw">end</span>
|
498
|
-
121:
|
499
|
-
122: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">load_scenario</span>(<span class="ruby-identifier">scenario_uuid</span>)
|
500
|
-
123:
|
501
|
-
124: <span class="ruby-identifier">roles</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>, <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
|
502
|
-
125: <span class="ruby-identifier">content</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">content</span>
|
503
|
-
126: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@interfaces</span>.<span class="ruby-identifier">empty?</span>
|
504
|
-
127: <span class="ruby-keyword kw">begin</span>
|
505
|
-
128: <span class="ruby-identifier">host</span> = <span class="ruby-identifier">content</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/\(.*\)/</span>).<span class="ruby-identifier">to_s</span>
|
506
|
-
129: <span class="ruby-identifier">host</span> = <span class="ruby-identifier">host</span>[<span class="ruby-value">1</span>, <span class="ruby-identifier">host</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"."</span>) <span class="ruby-operator">-</span> <span class="ruby-value">1</span>].<span class="ruby-identifier">downcase</span>
|
507
|
-
130: <span class="ruby-identifier">hosts_array</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">host</span>
|
508
|
-
131: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
509
|
-
132: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>
|
510
|
-
133: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"no hosts were specified, and none were found embedded in the role, e.g. 'client (A1.V4)'"</span>
|
511
|
-
134: <span class="ruby-keyword kw">end</span>
|
512
|
-
135: <span class="ruby-keyword kw">else</span>
|
513
|
-
136: <span class="ruby-identifier">hosts_array</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@interfaces</span>[<span class="ruby-identifier">i</span>]
|
514
|
-
137: <span class="ruby-keyword kw">end</span>
|
515
|
-
138: <span class="ruby-identifier">roles_array</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">content</span> <span class="ruby-comment cmt"># use the whole name for the role</span>
|
516
|
-
139: <span class="ruby-keyword kw">end</span>
|
517
|
-
140:
|
518
|
-
141: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">set_hosts</span>(<span class="ruby-identifier">roles_array</span>, <span class="ruby-identifier">hosts_array</span>, <span class="ruby-identifier">type</span>)
|
519
|
-
142:
|
520
|
-
143: <span class="ruby-comment cmt"># if there are channels in the scenario, bind them</span>
|
521
|
-
144: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
522
|
-
145: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@arg_channels</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">size</span>
|
523
|
-
146: <span class="ruby-identifier">msg</span> <span class="ruby-node">"Error. The number of channels specified on the command-line does not equal the number
|
524
|
-
147: of channels in the template. #{@arg_channels.size} != #{channels.size}"</span>
|
525
|
-
148: <span class="ruby-keyword kw">return</span>
|
526
|
-
149: <span class="ruby-keyword kw">end</span>
|
527
|
-
150:
|
528
|
-
151: <span class="ruby-identifier">channel_roles</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
529
|
-
152: <span class="ruby-identifier">channel_names</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
530
|
-
153: <span class="ruby-ivar">@arg_channels</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>
|
531
|
-
154: <span class="ruby-identifier">channel_roles</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"channel"</span> <span class="ruby-comment cmt"># role is always "channel"</span>
|
532
|
-
155: <span class="ruby-identifier">channel_names</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
533
|
-
156: <span class="ruby-keyword kw">end</span>
|
534
|
-
157: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">set_channels</span>(<span class="ruby-identifier">channel_roles</span>, <span class="ruby-identifier">channel_names</span>)
|
535
|
-
158: <span class="ruby-keyword kw">end</span>
|
536
|
-
159:
|
537
|
-
160: <span class="ruby-comment cmt"># if there are options specified on the command-line, set them</span>
|
538
|
-
161: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@options</span>.<span class="ruby-identifier">empty?</span>
|
539
|
-
162: <span class="ruby-identifier">option_names</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
540
|
-
163: <span class="ruby-identifier">option_values</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
541
|
-
164: <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">o</span> <span class="ruby-operator">|</span>
|
542
|
-
165: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">o</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">":"</span>)
|
543
|
-
166: <span class="ruby-identifier">option_names</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">0</span>]
|
544
|
-
167: <span class="ruby-identifier">option_values</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">1</span>]
|
545
|
-
168: <span class="ruby-keyword kw">end</span>
|
546
|
-
169: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">set_options</span>(<span class="ruby-identifier">option_names</span>, <span class="ruby-identifier">option_values</span>)
|
547
|
-
170: <span class="ruby-keyword kw">end</span>
|
548
|
-
171:
|
549
|
-
172: <span class="ruby-comment cmt"># verify the scenario</span>
|
550
|
-
173: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">setup_test</span>
|
551
|
-
174: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">run</span>
|
552
|
-
175: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span> <span class="ruby-operator">==</span> <span class="ruby-value str">""</span>
|
553
|
-
176: <span class="ruby-identifier">msg</span> <span class="ruby-node">"==> #{scenario_name} run returned without status"</span>
|
554
|
-
177: <span class="ruby-ivar">@errors</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{scenario_name}: status = #{response}"</span>
|
555
|
-
178: <span class="ruby-keyword kw">else</span>
|
556
|
-
179: <span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">response</span>)
|
557
|
-
180: <span class="ruby-identifier">status</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//status"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">content</span>
|
558
|
-
181: <span class="ruby-identifier">msg</span> <span class="ruby-node">"==> #{scenario_name}: status = #{status}"</span>
|
559
|
-
182: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'failed'</span>
|
560
|
-
183: <span class="ruby-comment cmt"># on error, add to the errors array</span>
|
561
|
-
184: <span class="ruby-ivar">@errors</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{scenario_name}: status = #{status}"</span>
|
562
|
-
185: <span class="ruby-keyword kw">end</span>
|
563
|
-
186: <span class="ruby-keyword kw">end</span>
|
564
|
-
187:
|
565
|
-
188: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">run_testset</span>(<span class="ruby-identifier">testset_uuid</span>)
|
566
|
-
189: <span class="ruby-identifier">results</span> = <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">collect_results</span> <span class="ruby-comment cmt"># will wait until 'Done' is returned by status</span>
|
567
|
-
190: <span class="ruby-identifier">msg</span> <span class="ruby-node">"results = #{results}"</span>
|
568
|
-
191: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">results</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"FAILED"</span>)
|
569
|
-
192: <span class="ruby-ivar">@errors</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"test failed"</span>
|
570
|
-
193:
|
571
|
-
194: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">teardown_test</span>
|
572
|
-
195: <span class="ruby-identifier">msg</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">close_session</span>
|
573
|
-
196:
|
574
|
-
197: <span class="ruby-comment cmt"># clear the hosts and roles array for the next iteration</span>
|
575
|
-
198: <span class="ruby-identifier">roles_array</span>.<span class="ruby-identifier">clear</span>
|
576
|
-
199: <span class="ruby-identifier">hosts_array</span>.<span class="ruby-identifier">clear</span>
|
577
|
-
200: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># if !exclude_list.include? and hosts.length</span>
|
578
|
-
201: <span class="ruby-keyword kw">end</span>
|
579
|
-
202: <span class="ruby-keyword kw">ensure</span>
|
580
|
-
203: <span class="ruby-identifier">teardown</span>
|
581
|
-
204: <span class="ruby-keyword kw">end</span></pre>
|
582
|
-
</div>
|
583
|
-
|
584
|
-
</div>
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
</div>
|
590
|
-
|
591
|
-
|
592
|
-
</div>
|
593
|
-
|
594
|
-
<div id="private-instance-method-details" class="method-section section">
|
595
|
-
<h3 class="section-header">Private Instance Methods</h3>
|
596
|
-
|
597
|
-
|
598
|
-
<div id="help-method" class="method-detail ">
|
599
|
-
<a name="method-i-help"></a>
|
600
|
-
|
601
|
-
<div class="method-heading">
|
602
|
-
|
603
|
-
<span class="method-name">help</span><span
|
604
|
-
class="method-args">()</span>
|
605
|
-
<span class="method-click-advice">click to toggle source</span>
|
606
|
-
|
607
|
-
</div>
|
608
|
-
|
609
|
-
<div class="method-description">
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
<div class="method-source-code"
|
616
|
-
id="help-source">
|
617
|
-
<pre>
|
618
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 297</span>
|
619
|
-
297: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
|
620
|
-
298: <span class="ruby-identifier">helps</span> = [
|
621
|
-
299: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-c'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--channels'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'comma-separated list of channel hosts'</span> },
|
622
|
-
300: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-d'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--dir'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'directory containing the scenario file'</span> },
|
623
|
-
301: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-h'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--help'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'help on command line options'</span> },
|
624
|
-
302: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-i'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--interfaces'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'comma-separated list of interfaces/hosts, e.g. b1,dell-server'</span> },
|
625
|
-
303: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-m'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--mu_string'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'user, password, mu_ip in the form of admin:admin@10.9.8.7'</span> },
|
626
|
-
304: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-o'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--output'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'output logging to this file'</span> },
|
627
|
-
305: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-p'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--options'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'comma-separated list of of options name:value pairs'</span> },
|
628
|
-
306: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-s'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--scenario'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'name of scenario file to run'</span> },
|
629
|
-
307: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-t'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--testset'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'name of testset to run'</span> },
|
630
|
-
308: { <span class="ruby-value">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-v'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--verbose'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'set Logger::DEBUG level'</span> }
|
631
|
-
309: ]
|
632
|
-
310:
|
633
|
-
311: <span class="ruby-identifier">cmds</span> = [
|
634
|
-
312: <span class="ruby-value str">"mu cmd_runverify:help"</span>,
|
635
|
-
313: <span class="ruby-value str">"mu cmd_runverify:run -s <scenario> -t <testset> -i <hosts>"</span>
|
636
|
-
314: ]
|
637
|
-
315:
|
638
|
-
316: <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> }
|
639
|
-
317: <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> }
|
640
|
-
318: <span class="ruby-identifier">puts</span>
|
641
|
-
319: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Usage: mu cmd_runverify:<command> <options>"</span>
|
642
|
-
320: <span class="ruby-identifier">puts</span>
|
643
|
-
321: <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>
|
644
|
-
322: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"%-*s %*s %-*s %s"</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>]]
|
645
|
-
323: <span class="ruby-keyword kw">end</span>
|
646
|
-
324: <span class="ruby-identifier">puts</span>
|
647
|
-
325: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Available Commands"</span>
|
648
|
-
326: <span class="ruby-identifier">puts</span>
|
649
|
-
327: <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>
|
650
|
-
328: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
|
651
|
-
329: <span class="ruby-keyword kw">end</span>
|
652
|
-
330: <span class="ruby-identifier">puts</span>
|
653
|
-
331: <span class="ruby-keyword kw">end</span></pre>
|
654
|
-
</div>
|
655
|
-
|
656
|
-
</div>
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
</div>
|
662
|
-
|
663
|
-
|
664
|
-
<div id="output-results-method" class="method-detail ">
|
665
|
-
<a name="method-i-output_results"></a>
|
666
|
-
|
667
|
-
<div class="method-heading">
|
668
|
-
|
669
|
-
<span class="method-name">output_results</span><span
|
670
|
-
class="method-args">(filename, doc)</span>
|
671
|
-
<span class="method-click-advice">click to toggle source</span>
|
672
|
-
|
673
|
-
</div>
|
674
|
-
|
675
|
-
<div class="method-description">
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
<div class="method-source-code"
|
682
|
-
id="output-results-source">
|
683
|
-
<pre>
|
684
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 223</span>
|
685
|
-
223: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output_results</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">doc</span>)
|
686
|
-
224: <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"a"</span>)
|
687
|
-
225: <span class="ruby-comment cmt"># doc = "#{msl_file},#{@executed},#{@errors.to_i},#{@timeouts.to_i}\n"</span>
|
688
|
-
226: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'a'</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-identifier">doc</span>) }
|
689
|
-
227: <span class="ruby-keyword kw">end</span></pre>
|
690
|
-
</div>
|
691
|
-
|
692
|
-
</div>
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
</div>
|
698
|
-
|
699
|
-
|
700
|
-
<div id="parse-cli-method" class="method-detail ">
|
701
|
-
<a name="method-i-parse_cli"></a>
|
702
|
-
|
703
|
-
<div class="method-heading">
|
704
|
-
|
705
|
-
<span class="method-name">parse_cli</span><span
|
706
|
-
class="method-args">(argv)</span>
|
707
|
-
<span class="method-click-advice">click to toggle source</span>
|
708
|
-
|
709
|
-
</div>
|
710
|
-
|
711
|
-
<div class="method-description">
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
<div class="method-source-code"
|
718
|
-
id="parse-cli-source">
|
719
|
-
<pre>
|
720
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 229</span>
|
721
|
-
229: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
|
722
|
-
230: <span class="ruby-identifier">hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
723
|
-
231: <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>
|
724
|
-
232: <span class="ruby-keyword kw">break</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>
|
725
|
-
233:
|
726
|
-
234: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
|
727
|
-
235:
|
728
|
-
236: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-c'</span>, <span class="ruby-value str">'--channels'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
729
|
-
237: <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'channels'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
730
|
-
238: <span class="ruby-keyword kw">next</span>
|
731
|
-
239: <span class="ruby-keyword kw">end</span>
|
732
|
-
240:
|
733
|
-
241: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-d'</span>, <span class="ruby-value str">'--dir'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
734
|
-
242: <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'dir'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
735
|
-
243: <span class="ruby-keyword kw">next</span>
|
736
|
-
244: <span class="ruby-keyword kw">end</span>
|
737
|
-
245:
|
738
|
-
246: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-i'</span>, <span class="ruby-value str">'--interfaces'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
739
|
-
247: <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'interfaces'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
740
|
-
248: <span class="ruby-keyword kw">next</span>
|
741
|
-
249: <span class="ruby-keyword kw">end</span>
|
742
|
-
250:
|
743
|
-
251: <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>
|
744
|
-
252: <span class="ruby-identifier">help</span>
|
745
|
-
253: <span class="ruby-identifier">exit</span>
|
746
|
-
254: <span class="ruby-keyword kw">end</span>
|
747
|
-
255:
|
748
|
-
256: <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>
|
749
|
-
257: <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>)
|
750
|
-
258: <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>
|
751
|
-
259: <span class="ruby-identifier">@@mu_admin_user</span> = <span class="ruby-node">$1</span>
|
752
|
-
260: <span class="ruby-identifier">@@mu_admin_pass</span> = <span class="ruby-node">$2</span>
|
753
|
-
261: <span class="ruby-identifier">@@mu_ip</span> = <span class="ruby-node">$3</span>
|
754
|
-
262: <span class="ruby-keyword kw">end</span>
|
755
|
-
263: <span class="ruby-keyword kw">next</span>
|
756
|
-
264: <span class="ruby-keyword kw">end</span>
|
757
|
-
265:
|
758
|
-
266: <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>
|
759
|
-
267: <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">"w"</span>)
|
760
|
-
268: <span class="ruby-keyword kw">next</span>
|
761
|
-
269: <span class="ruby-keyword kw">end</span>
|
762
|
-
270:
|
763
|
-
271: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-p'</span>, <span class="ruby-value str">'--options'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
764
|
-
272: <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'options'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
765
|
-
273: <span class="ruby-keyword kw">next</span>
|
766
|
-
274: <span class="ruby-keyword kw">end</span>
|
767
|
-
275:
|
768
|
-
276: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-s'</span>, <span class="ruby-value str">'--scenario'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
769
|
-
277: <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'scenario'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
770
|
-
278: <span class="ruby-keyword kw">next</span>
|
771
|
-
279: <span class="ruby-keyword kw">end</span>
|
772
|
-
280:
|
773
|
-
281: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-t'</span>, <span class="ruby-value str">'--testset'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
774
|
-
282: <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'testset'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
775
|
-
283: <span class="ruby-keyword kw">next</span>
|
776
|
-
284: <span class="ruby-keyword kw">end</span>
|
777
|
-
285:
|
778
|
-
286: <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>
|
779
|
-
287: <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>
|
780
|
-
288: <span class="ruby-keyword kw">next</span>
|
781
|
-
289: <span class="ruby-keyword kw">end</span>
|
782
|
-
290:
|
783
|
-
291: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Unknown option #{k}"</span>
|
784
|
-
292: <span class="ruby-keyword kw">end</span>
|
785
|
-
293:
|
786
|
-
294: <span class="ruby-identifier">hash</span>
|
787
|
-
295: <span class="ruby-keyword kw">end</span></pre>
|
788
|
-
</div>
|
789
|
-
|
790
|
-
</div>
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
</div>
|
796
|
-
|
797
|
-
|
798
|
-
<div id="setup-method" class="method-detail ">
|
799
|
-
<a name="method-i-setup"></a>
|
800
|
-
|
801
|
-
<div class="method-heading">
|
802
|
-
|
803
|
-
<span class="method-name">setup</span><span
|
804
|
-
class="method-args">()</span>
|
805
|
-
<span class="method-click-advice">click to toggle source</span>
|
806
|
-
|
807
|
-
</div>
|
808
|
-
|
809
|
-
<div class="method-description">
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
<div class="method-source-code"
|
816
|
-
id="setup-source">
|
817
|
-
<pre>
|
818
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 208</span>
|
819
|
-
208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
820
|
-
209: <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">"127.0.0.1"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_ip</span>
|
821
|
-
210: <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">"admin"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_admin_user</span>
|
822
|
-
211: <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">"admin"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">@@mu_admin_pass</span>
|
823
|
-
212: <span class="ruby-ivar">@ddt_api</span> = <span class="ruby-constant">Ddt</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>)
|
824
|
-
213: <span class="ruby-ivar">@docroot</span> =<span class="ruby-value str">"/api/v3/"</span>
|
825
|
-
214: <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>)
|
826
|
-
215: <span class="ruby-keyword kw">end</span></pre>
|
827
|
-
</div>
|
828
|
-
|
829
|
-
</div>
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
</div>
|
835
|
-
|
836
|
-
|
837
|
-
<div id="teardown-method" class="method-detail ">
|
838
|
-
<a name="method-i-teardown"></a>
|
839
|
-
|
840
|
-
<div class="method-heading">
|
841
|
-
|
842
|
-
<span class="method-name">teardown</span><span
|
843
|
-
class="method-args">()</span>
|
844
|
-
<span class="method-click-advice">click to toggle source</span>
|
845
|
-
|
846
|
-
</div>
|
847
|
-
|
848
|
-
<div class="method-description">
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
<div class="method-source-code"
|
855
|
-
id="teardown-source">
|
856
|
-
<pre>
|
857
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_runverify.rb, line 217</span>
|
858
|
-
217: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span>
|
859
|
-
218: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">nil?</span>
|
860
|
-
219: <span class="ruby-ivar">@ddt_api</span>.<span class="ruby-identifier">close_all_sessions</span>
|
861
|
-
220: <span class="ruby-keyword kw">end</span>
|
862
|
-
221: <span class="ruby-keyword kw">end</span></pre>
|
863
|
-
</div>
|
864
|
-
|
865
|
-
</div>
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
</div>
|
871
|
-
|
872
|
-
|
873
|
-
</div>
|
874
|
-
|
875
|
-
|
876
|
-
</div>
|
877
|
-
|
878
|
-
|
879
|
-
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
880
|
-
|
881
|
-
<p>Disabled; run with --debug to generate this.</p>
|
882
|
-
|
883
|
-
</div>
|
884
|
-
|
885
|
-
<div id="validator-badges">
|
886
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
887
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
888
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
889
|
-
</div>
|
890
|
-
|
891
|
-
</body>
|
892
|
-
</html>
|
893
|
-
|