mu 5.7.2.5 → 5.7.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mu/command/cmd_appid.rb +10 -0
- data/lib/mu/command/cmd_runscale.rb +48 -2
- data/rdoc/classes/Mu.html +13 -68
- data/rdoc/classes/Mu/Command.html +13 -1
- data/rdoc/classes/Mu/Command/Cmd_appid.html +23 -23
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000053.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000054.html +30 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000055.html +39 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000056.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +60 -60
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000060.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000061.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000062.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000063.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000064.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000065.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000066.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000067.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000068.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000069.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000070.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000071.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +18 -19
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000057.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000058.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000059.html +50 -0
- data/rdoc/classes/Mu/Netconfig.html +78 -78
- data/rdoc/classes/Mu/Netconfig.src/M000072.html +25 -0
- data/rdoc/classes/Mu/Netconfig.src/M000073.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000074.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000075.html +24 -0
- data/rdoc/classes/Mu/Netconfig.src/M000076.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000077.html +36 -0
- data/rdoc/classes/Mu/Netconfig.src/M000078.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000079.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000080.html +39 -0
- data/rdoc/classes/Mu/Netconfig.src/M000081.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000082.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000083.html +26 -0
- data/rdoc/classes/Mu/Netconfig.src/M000084.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000085.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000086.html +19 -0
- data/rdoc/classes/TCTestMu.src/M000043.html +1 -1
- data/rdoc/created.rid +1 -1
- data/rdoc/files/lib/mu/api/netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +1 -1
- data/rdoc/files/test/tc_test_mu_rb.html +2 -2
- data/rdoc/fr_class_index.html +5 -1
- data/rdoc/fr_file_index.html +4 -2
- data/rdoc/fr_method_index.html +86 -25
- data/rdoc/index.html +1 -1
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +43 -43
- data/test/tc_test_mu.rb +5 -1
- metadata +38 -4
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_clear_hosts (Mu::Command::Cmd_netconfig)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_netconfig.rb, line 70</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_clear_hosts</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">clear_hosts</span>
|
17
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">response</span>)
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_resolve_hosts (Mu::Command::Cmd_netconfig)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_netconfig.rb, line 79</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_resolve_hosts</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'name'</span>]
|
17
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">resolve_hosts</span>(<span class="ruby-identifier">name</span>)
|
18
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_clear_interface (Mu::Command::Cmd_netconfig)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_netconfig.rb, line 89</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_clear_interface</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
<span class="ruby-identifier">interface</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>]
|
17
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">clear_interface</span>(<span class="ruby-identifier">interface</span>)
|
18
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_clear_vlans (Mu::Command::Cmd_netconfig)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_netconfig.rb, line 99</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_clear_vlans</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">clear_vlans</span>
|
17
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_clear_routes (Mu::Command::Cmd_netconfig)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_netconfig.rb, line 108</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_clear_routes</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">clear_routes</span>
|
17
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_save (Mu::Command::Cmd_netconfig)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_netconfig.rb, line 118</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_save</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
<span class="ruby-identifier">e</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'elements'</span>]
|
17
|
+
<span class="ruby-identifier">filepath</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'filepath'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"config.json"</span>
|
18
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">save</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filepath</span>)
|
19
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>
|
20
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -86,9 +86,9 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
89
|
+
<a href="#M000057">cmd_help</a>
|
90
|
+
<a href="#M000059">cmd_run_dir</a>
|
91
|
+
<a href="#M000058">cmd_run_file</a>
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
|
@@ -143,12 +143,12 @@
|
|
143
143
|
<div id="methods">
|
144
144
|
<h3 class="section-bar">Public Instance methods</h3>
|
145
145
|
|
146
|
-
<div id="method-
|
147
|
-
<a name="
|
146
|
+
<div id="method-M000057" class="method-detail">
|
147
|
+
<a name="M000057"></a>
|
148
148
|
|
149
149
|
<div class="method-heading">
|
150
|
-
<a href="Cmd_runscale.src/
|
151
|
-
onclick="popupCode('Cmd_runscale.src/
|
150
|
+
<a href="Cmd_runscale.src/M000057.html" target="Code" class="method-signature"
|
151
|
+
onclick="popupCode('Cmd_runscale.src/M000057.html');return false;">
|
152
152
|
<span class="method-name">cmd_help</span><span class="method-args">(argv)</span>
|
153
153
|
</a>
|
154
154
|
</div>
|
@@ -163,20 +163,20 @@ displays command-line help
|
|
163
163
|
</div>
|
164
164
|
</div>
|
165
165
|
|
166
|
-
<div id="method-
|
167
|
-
<a name="
|
166
|
+
<div id="method-M000059" class="method-detail">
|
167
|
+
<a name="M000059"></a>
|
168
168
|
|
169
169
|
<div class="method-heading">
|
170
|
-
<a href="Cmd_runscale.src/
|
171
|
-
onclick="popupCode('Cmd_runscale.src/
|
170
|
+
<a href="Cmd_runscale.src/M000059.html" target="Code" class="method-signature"
|
171
|
+
onclick="popupCode('Cmd_runscale.src/M000059.html');return false;">
|
172
172
|
<span class="method-name">cmd_run_dir</span><span class="method-args">(argv)</span>
|
173
173
|
</a>
|
174
174
|
</div>
|
175
175
|
|
176
176
|
<div class="method-description">
|
177
177
|
<p>
|
178
|
-
sets up, executes, and closes a Studio
|
179
|
-
|
178
|
+
sets up, executes, and closes a Studio Scale test for each scenario (.msl
|
179
|
+
file) found in the specified directory
|
180
180
|
</p>
|
181
181
|
<pre>
|
182
182
|
* argv = command-line arguments, requires a directory (-d) argument
|
@@ -185,20 +185,19 @@ test for each scenario (.msl file) found in the specified directory
|
|
185
185
|
</div>
|
186
186
|
</div>
|
187
187
|
|
188
|
-
<div id="method-
|
189
|
-
<a name="
|
188
|
+
<div id="method-M000058" class="method-detail">
|
189
|
+
<a name="M000058"></a>
|
190
190
|
|
191
191
|
<div class="method-heading">
|
192
|
-
<a href="Cmd_runscale.src/
|
193
|
-
onclick="popupCode('Cmd_runscale.src/
|
192
|
+
<a href="Cmd_runscale.src/M000058.html" target="Code" class="method-signature"
|
193
|
+
onclick="popupCode('Cmd_runscale.src/M000058.html');return false;">
|
194
194
|
<span class="method-name">cmd_run_file</span><span class="method-args">(argv)</span>
|
195
195
|
</a>
|
196
196
|
</div>
|
197
197
|
|
198
198
|
<div class="method-description">
|
199
199
|
<p>
|
200
|
-
sets up, executes, and closes a Studio
|
201
|
-
test
|
200
|
+
sets up, executes, and closes a Studio Scale test
|
202
201
|
</p>
|
203
202
|
<pre>
|
204
203
|
* argv = command-line arguments , requires a scenario (-s) argument
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_help (Mu::Command::Cmd_runscale)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 14</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">help</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_run_file (Mu::Command::Cmd_runscale)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 20</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_file</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
|
18
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"scenario required"</span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
21
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-value str">".msl"</span>)
|
22
|
+
<span class="ruby-identifier">scenario</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
|
23
|
+
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># TODO: eventually, xml and mus file may be supported by scale api</span>
|
24
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"only .msl files are currently supported"</span>
|
25
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
28
|
+
|
29
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
|
30
|
+
<span class="ruby-ivar">@dir</span> = <span class="ruby-value str">""</span>
|
31
|
+
<span class="ruby-identifier">path</span> = <span class="ruby-identifier">scenario</span>
|
32
|
+
<span class="ruby-keyword kw">else</span>
|
33
|
+
<span class="ruby-ivar">@dir</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
|
34
|
+
<span class="ruby-identifier">path</span> = <span class="ruby-ivar">@dir</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scenario</span>
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
36
|
+
|
37
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">path</span>)
|
38
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"*** Error: File #{path} does not exist"</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
|
41
|
+
<span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@mu_ip</span>, <span class="ruby-ivar">@@mu_admin_user</span>, <span class="ruby-ivar">@@mu_admin_pass</span>)
|
42
|
+
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"pattern"</span>, <span class="ruby-ivar">@cmd_line_pattern</span>)
|
43
|
+
<span class="ruby-ivar">@params</span> = {}
|
44
|
+
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"dir"</span>] = <span class="ruby-ivar">@dir</span>
|
45
|
+
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"msl"</span>] = <span class="ruby-identifier">scenario</span>
|
46
|
+
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"hosts"</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
|
47
|
+
<span class="ruby-identifier">run</span>(<span class="ruby-identifier">scenario</span>)
|
48
|
+
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
|
49
|
+
<span class="ruby-keyword kw">end</span></pre>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cmd_run_dir (Mu::Command::Cmd_runscale)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 60</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_dir</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
16
|
+
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
20
|
+
<span class="ruby-ivar">@dir</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
|
23
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_status.json"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_status.json"</span>)
|
24
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_stats.csv"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_stats.csv"</span>)
|
25
|
+
|
26
|
+
<span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@mu_ip</span>, <span class="ruby-ivar">@@mu_admin_user</span>, <span class="ruby-ivar">@@mu_admin_pass</span>)
|
27
|
+
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"pattern"</span>, <span class="ruby-ivar">@cmd_line_pattern</span>)
|
28
|
+
<span class="ruby-ivar">@params</span> = {}
|
29
|
+
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"dir"</span>] = <span class="ruby-ivar">@dir</span>
|
30
|
+
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"hosts"</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
|
31
|
+
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"dir"</span>])
|
32
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_status.json"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_status.json"</span>)
|
33
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'recursive'</span>].<span class="ruby-identifier">nil?</span>
|
34
|
+
<span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">"*.msl"</span>)
|
35
|
+
<span class="ruby-keyword kw">else</span>
|
36
|
+
<span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">"**/*.msl"</span>)
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
38
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">files</span>.<span class="ruby-identifier">empty?</span>
|
39
|
+
<span class="ruby-identifier">files</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">|</span>
|
40
|
+
<span class="ruby-identifier">run</span>(<span class="ruby-identifier">f</span>)
|
41
|
+
<span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">f</span>)
|
42
|
+
<span class="ruby-identifier">sleep</span> <span class="ruby-value">2</span>
|
43
|
+
<span class="ruby-keyword kw">end</span>
|
44
|
+
<span class="ruby-keyword kw">else</span>
|
45
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"no msl files found in #{@dir}"</span>
|
46
|
+
<span class="ruby-keyword kw">end</span>
|
47
|
+
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
|
48
|
+
<span class="ruby-keyword kw">end</span></pre>
|
49
|
+
</body>
|
50
|
+
</html>
|
@@ -88,21 +88,21 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
91
|
+
<a href="#M000078">clear_hosts</a>
|
92
|
+
<a href="#M000081">clear_interface</a>
|
93
|
+
<a href="#M000084">clear_routes</a>
|
94
|
+
<a href="#M000082">clear_vlans</a>
|
95
|
+
<a href="#M000075">create</a>
|
96
|
+
<a href="#M000076">delete</a>
|
97
|
+
<a href="#M000073">get</a>
|
98
|
+
<a href="#M000074">modify</a>
|
99
|
+
<a href="#M000072">new</a>
|
100
|
+
<a href="#M000080">resolve_hosts</a>
|
101
|
+
<a href="#M000077">restore</a>
|
102
|
+
<a href="#M000079">restore_hosts</a>
|
103
|
+
<a href="#M000083">restore_interfaces</a>
|
104
|
+
<a href="#M000085">restore_routes</a>
|
105
|
+
<a href="#M000086">save</a>
|
106
106
|
</div>
|
107
107
|
</div>
|
108
108
|
|
@@ -174,12 +174,12 @@
|
|
174
174
|
<div id="methods">
|
175
175
|
<h3 class="section-bar">Public Class methods</h3>
|
176
176
|
|
177
|
-
<div id="method-
|
178
|
-
<a name="
|
177
|
+
<div id="method-M000072" class="method-detail">
|
178
|
+
<a name="M000072"></a>
|
179
179
|
|
180
180
|
<div class="method-heading">
|
181
|
-
<a href="Netconfig.src/
|
182
|
-
onclick="popupCode('Netconfig.src/
|
181
|
+
<a href="Netconfig.src/M000072.html" target="Code" class="method-signature"
|
182
|
+
onclick="popupCode('Netconfig.src/M000072.html');return false;">
|
183
183
|
<span class="method-name">new</span><span class="method-args">(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])</span>
|
184
184
|
</a>
|
185
185
|
</div>
|
@@ -190,12 +190,12 @@
|
|
190
190
|
|
191
191
|
<h3 class="section-bar">Public Instance methods</h3>
|
192
192
|
|
193
|
-
<div id="method-
|
194
|
-
<a name="
|
193
|
+
<div id="method-M000078" class="method-detail">
|
194
|
+
<a name="M000078"></a>
|
195
195
|
|
196
196
|
<div class="method-heading">
|
197
|
-
<a href="Netconfig.src/
|
198
|
-
onclick="popupCode('Netconfig.src/
|
197
|
+
<a href="Netconfig.src/M000078.html" target="Code" class="method-signature"
|
198
|
+
onclick="popupCode('Netconfig.src/M000078.html');return false;">
|
199
199
|
<span class="method-name">clear_hosts</span><span class="method-args">()</span>
|
200
200
|
</a>
|
201
201
|
</div>
|
@@ -207,12 +207,12 @@ clears the network hosts
|
|
207
207
|
</div>
|
208
208
|
</div>
|
209
209
|
|
210
|
-
<div id="method-
|
211
|
-
<a name="
|
210
|
+
<div id="method-M000081" class="method-detail">
|
211
|
+
<a name="M000081"></a>
|
212
212
|
|
213
213
|
<div class="method-heading">
|
214
|
-
<a href="Netconfig.src/
|
215
|
-
onclick="popupCode('Netconfig.src/
|
214
|
+
<a href="Netconfig.src/M000081.html" target="Code" class="method-signature"
|
215
|
+
onclick="popupCode('Netconfig.src/M000081.html');return false;">
|
216
216
|
<span class="method-name">clear_interface</span><span class="method-args">(interface)</span>
|
217
217
|
</a>
|
218
218
|
</div>
|
@@ -227,12 +227,12 @@ clears a network interface
|
|
227
227
|
</div>
|
228
228
|
</div>
|
229
229
|
|
230
|
-
<div id="method-
|
231
|
-
<a name="
|
230
|
+
<div id="method-M000084" class="method-detail">
|
231
|
+
<a name="M000084"></a>
|
232
232
|
|
233
233
|
<div class="method-heading">
|
234
|
-
<a href="Netconfig.src/
|
235
|
-
onclick="popupCode('Netconfig.src/
|
234
|
+
<a href="Netconfig.src/M000084.html" target="Code" class="method-signature"
|
235
|
+
onclick="popupCode('Netconfig.src/M000084.html');return false;">
|
236
236
|
<span class="method-name">clear_routes</span><span class="method-args">()</span>
|
237
237
|
</a>
|
238
238
|
</div>
|
@@ -244,12 +244,12 @@ clears network routes
|
|
244
244
|
</div>
|
245
245
|
</div>
|
246
246
|
|
247
|
-
<div id="method-
|
248
|
-
<a name="
|
247
|
+
<div id="method-M000082" class="method-detail">
|
248
|
+
<a name="M000082"></a>
|
249
249
|
|
250
250
|
<div class="method-heading">
|
251
|
-
<a href="Netconfig.src/
|
252
|
-
onclick="popupCode('Netconfig.src/
|
251
|
+
<a href="Netconfig.src/M000082.html" target="Code" class="method-signature"
|
252
|
+
onclick="popupCode('Netconfig.src/M000082.html');return false;">
|
253
253
|
<span class="method-name">clear_vlans</span><span class="method-args">()</span>
|
254
254
|
</a>
|
255
255
|
</div>
|
@@ -261,12 +261,12 @@ clears all network vlans
|
|
261
261
|
</div>
|
262
262
|
</div>
|
263
263
|
|
264
|
-
<div id="method-
|
265
|
-
<a name="
|
264
|
+
<div id="method-M000075" class="method-detail">
|
265
|
+
<a name="M000075"></a>
|
266
266
|
|
267
267
|
<div class="method-heading">
|
268
|
-
<a href="Netconfig.src/
|
269
|
-
onclick="popupCode('Netconfig.src/
|
268
|
+
<a href="Netconfig.src/M000075.html" target="Code" class="method-signature"
|
269
|
+
onclick="popupCode('Netconfig.src/M000075.html');return false;">
|
270
270
|
<span class="method-name">create</span><span class="method-args">(json, e)</span>
|
271
271
|
</a>
|
272
272
|
</div>
|
@@ -282,12 +282,12 @@ POST method to add a network element
|
|
282
282
|
</div>
|
283
283
|
</div>
|
284
284
|
|
285
|
-
<div id="method-
|
286
|
-
<a name="
|
285
|
+
<div id="method-M000076" class="method-detail">
|
286
|
+
<a name="M000076"></a>
|
287
287
|
|
288
288
|
<div class="method-heading">
|
289
|
-
<a href="Netconfig.src/
|
290
|
-
onclick="popupCode('Netconfig.src/
|
289
|
+
<a href="Netconfig.src/M000076.html" target="Code" class="method-signature"
|
290
|
+
onclick="popupCode('Netconfig.src/M000076.html');return false;">
|
291
291
|
<span class="method-name">delete</span><span class="method-args">(e)</span>
|
292
292
|
</a>
|
293
293
|
</div>
|
@@ -302,19 +302,19 @@ deletes the specified element
|
|
302
302
|
</div>
|
303
303
|
</div>
|
304
304
|
|
305
|
-
<div id="method-
|
306
|
-
<a name="
|
305
|
+
<div id="method-M000073" class="method-detail">
|
306
|
+
<a name="M000073"></a>
|
307
307
|
|
308
308
|
<div class="method-heading">
|
309
|
-
<a href="Netconfig.src/
|
310
|
-
onclick="popupCode('Netconfig.src/
|
309
|
+
<a href="Netconfig.src/M000073.html" target="Code" class="method-signature"
|
310
|
+
onclick="popupCode('Netconfig.src/M000073.html');return false;">
|
311
311
|
<span class="method-name">get</span><span class="method-args">(e)</span>
|
312
312
|
</a>
|
313
313
|
</div>
|
314
314
|
|
315
315
|
<div class="method-description">
|
316
316
|
<p>
|
317
|
-
<a href="Netconfig.html#
|
317
|
+
<a href="Netconfig.html#M000073">get</a> - with no params, returns the
|
318
318
|
entire netconfig json object
|
319
319
|
</p>
|
320
320
|
<pre>
|
@@ -323,19 +323,19 @@ entire netconfig json object
|
|
323
323
|
</div>
|
324
324
|
</div>
|
325
325
|
|
326
|
-
<div id="method-
|
327
|
-
<a name="
|
326
|
+
<div id="method-M000074" class="method-detail">
|
327
|
+
<a name="M000074"></a>
|
328
328
|
|
329
329
|
<div class="method-heading">
|
330
|
-
<a href="Netconfig.src/
|
331
|
-
onclick="popupCode('Netconfig.src/
|
330
|
+
<a href="Netconfig.src/M000074.html" target="Code" class="method-signature"
|
331
|
+
onclick="popupCode('Netconfig.src/M000074.html');return false;">
|
332
332
|
<span class="method-name">modify</span><span class="method-args">(json, e)</span>
|
333
333
|
</a>
|
334
334
|
</div>
|
335
335
|
|
336
336
|
<div class="method-description">
|
337
337
|
<p>
|
338
|
-
PUT to <a href="Netconfig.html#
|
338
|
+
PUT to <a href="Netconfig.html#M000074">modify</a> netconfig element(s) to
|
339
339
|
json values
|
340
340
|
</p>
|
341
341
|
<pre>
|
@@ -345,12 +345,12 @@ json values
|
|
345
345
|
</div>
|
346
346
|
</div>
|
347
347
|
|
348
|
-
<div id="method-
|
349
|
-
<a name="
|
348
|
+
<div id="method-M000080" class="method-detail">
|
349
|
+
<a name="M000080"></a>
|
350
350
|
|
351
351
|
<div class="method-heading">
|
352
|
-
<a href="Netconfig.src/
|
353
|
-
onclick="popupCode('Netconfig.src/
|
352
|
+
<a href="Netconfig.src/M000080.html" target="Code" class="method-signature"
|
353
|
+
onclick="popupCode('Netconfig.src/M000080.html');return false;">
|
354
354
|
<span class="method-name">resolve_hosts</span><span class="method-args">(name=nil)</span>
|
355
355
|
</a>
|
356
356
|
</div>
|
@@ -358,7 +358,7 @@ json values
|
|
358
358
|
<div class="method-description">
|
359
359
|
<p>
|
360
360
|
use Dns to update host ip addresses. A <a
|
361
|
-
href="Netconfig.html#
|
361
|
+
href="Netconfig.html#M000072">new</a> Host is added if not present when the
|
362
362
|
name is provided as argument
|
363
363
|
</p>
|
364
364
|
<pre>
|
@@ -367,12 +367,12 @@ name is provided as argument
|
|
367
367
|
</div>
|
368
368
|
</div>
|
369
369
|
|
370
|
-
<div id="method-
|
371
|
-
<a name="
|
370
|
+
<div id="method-M000077" class="method-detail">
|
371
|
+
<a name="M000077"></a>
|
372
372
|
|
373
373
|
<div class="method-heading">
|
374
|
-
<a href="Netconfig.src/
|
375
|
-
onclick="popupCode('Netconfig.src/
|
374
|
+
<a href="Netconfig.src/M000077.html" target="Code" class="method-signature"
|
375
|
+
onclick="popupCode('Netconfig.src/M000077.html');return false;">
|
376
376
|
<span class="method-name">restore</span><span class="method-args">(filepath=nil,clear_existing=false)</span>
|
377
377
|
</a>
|
378
378
|
</div>
|
@@ -388,12 +388,12 @@ updates a network configuration from file
|
|
388
388
|
</div>
|
389
389
|
</div>
|
390
390
|
|
391
|
-
<div id="method-
|
392
|
-
<a name="
|
391
|
+
<div id="method-M000079" class="method-detail">
|
392
|
+
<a name="M000079"></a>
|
393
393
|
|
394
394
|
<div class="method-heading">
|
395
|
-
<a href="Netconfig.src/
|
396
|
-
onclick="popupCode('Netconfig.src/
|
395
|
+
<a href="Netconfig.src/M000079.html" target="Code" class="method-signature"
|
396
|
+
onclick="popupCode('Netconfig.src/M000079.html');return false;">
|
397
397
|
<span class="method-name">restore_hosts</span><span class="method-args">(hosts)</span>
|
398
398
|
</a>
|
399
399
|
</div>
|
@@ -405,12 +405,12 @@ restores the network hosts to the initial system states
|
|
405
405
|
</div>
|
406
406
|
</div>
|
407
407
|
|
408
|
-
<div id="method-
|
409
|
-
<a name="
|
408
|
+
<div id="method-M000083" class="method-detail">
|
409
|
+
<a name="M000083"></a>
|
410
410
|
|
411
411
|
<div class="method-heading">
|
412
|
-
<a href="Netconfig.src/
|
413
|
-
onclick="popupCode('Netconfig.src/
|
412
|
+
<a href="Netconfig.src/M000083.html" target="Code" class="method-signature"
|
413
|
+
onclick="popupCode('Netconfig.src/M000083.html');return false;">
|
414
414
|
<span class="method-name">restore_interfaces</span><span class="method-args">(interfaces)</span>
|
415
415
|
</a>
|
416
416
|
</div>
|
@@ -425,12 +425,12 @@ restores network interfaces to system initial settings
|
|
425
425
|
</div>
|
426
426
|
</div>
|
427
427
|
|
428
|
-
<div id="method-
|
429
|
-
<a name="
|
428
|
+
<div id="method-M000085" class="method-detail">
|
429
|
+
<a name="M000085"></a>
|
430
430
|
|
431
431
|
<div class="method-heading">
|
432
|
-
<a href="Netconfig.src/
|
433
|
-
onclick="popupCode('Netconfig.src/
|
432
|
+
<a href="Netconfig.src/M000085.html" target="Code" class="method-signature"
|
433
|
+
onclick="popupCode('Netconfig.src/M000085.html');return false;">
|
434
434
|
<span class="method-name">restore_routes</span><span class="method-args">(routes)</span>
|
435
435
|
</a>
|
436
436
|
</div>
|
@@ -442,12 +442,12 @@ restores network routes to system initial settings
|
|
442
442
|
</div>
|
443
443
|
</div>
|
444
444
|
|
445
|
-
<div id="method-
|
446
|
-
<a name="
|
445
|
+
<div id="method-M000086" class="method-detail">
|
446
|
+
<a name="M000086"></a>
|
447
447
|
|
448
448
|
<div class="method-heading">
|
449
|
-
<a href="Netconfig.src/
|
450
|
-
onclick="popupCode('Netconfig.src/
|
449
|
+
<a href="Netconfig.src/M000086.html" target="Code" class="method-signature"
|
450
|
+
onclick="popupCode('Netconfig.src/M000086.html');return false;">
|
451
451
|
<span class="method-name">save</span><span class="method-args">(e="all", filepath="config.json")</span>
|
452
452
|
</a>
|
453
453
|
</div>
|