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.
Files changed (57) hide show
  1. data/lib/mu/command/cmd_appid.rb +10 -0
  2. data/lib/mu/command/cmd_runscale.rb +48 -2
  3. data/rdoc/classes/Mu.html +13 -68
  4. data/rdoc/classes/Mu/Command.html +13 -1
  5. data/rdoc/classes/Mu/Command/Cmd_appid.html +23 -23
  6. data/rdoc/classes/Mu/Command/Cmd_appid.src/M000053.html +18 -0
  7. data/rdoc/classes/Mu/Command/Cmd_appid.src/M000054.html +30 -0
  8. data/rdoc/classes/Mu/Command/Cmd_appid.src/M000055.html +39 -0
  9. data/rdoc/classes/Mu/Command/Cmd_appid.src/M000056.html +50 -0
  10. data/rdoc/classes/Mu/Command/Cmd_netconfig.html +60 -60
  11. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000060.html +18 -0
  12. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000061.html +22 -0
  13. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000062.html +23 -0
  14. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000063.html +23 -0
  15. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000064.html +22 -0
  16. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000065.html +23 -0
  17. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000066.html +21 -0
  18. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000067.html +22 -0
  19. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000068.html +22 -0
  20. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000069.html +21 -0
  21. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000070.html +21 -0
  22. data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000071.html +23 -0
  23. data/rdoc/classes/Mu/Command/Cmd_runscale.html +18 -19
  24. data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000057.html +18 -0
  25. data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000058.html +51 -0
  26. data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000059.html +50 -0
  27. data/rdoc/classes/Mu/Netconfig.html +78 -78
  28. data/rdoc/classes/Mu/Netconfig.src/M000072.html +25 -0
  29. data/rdoc/classes/Mu/Netconfig.src/M000073.html +20 -0
  30. data/rdoc/classes/Mu/Netconfig.src/M000074.html +21 -0
  31. data/rdoc/classes/Mu/Netconfig.src/M000075.html +24 -0
  32. data/rdoc/classes/Mu/Netconfig.src/M000076.html +20 -0
  33. data/rdoc/classes/Mu/Netconfig.src/M000077.html +36 -0
  34. data/rdoc/classes/Mu/Netconfig.src/M000078.html +22 -0
  35. data/rdoc/classes/Mu/Netconfig.src/M000079.html +22 -0
  36. data/rdoc/classes/Mu/Netconfig.src/M000080.html +39 -0
  37. data/rdoc/classes/Mu/Netconfig.src/M000081.html +21 -0
  38. data/rdoc/classes/Mu/Netconfig.src/M000082.html +23 -0
  39. data/rdoc/classes/Mu/Netconfig.src/M000083.html +26 -0
  40. data/rdoc/classes/Mu/Netconfig.src/M000084.html +23 -0
  41. data/rdoc/classes/Mu/Netconfig.src/M000085.html +22 -0
  42. data/rdoc/classes/Mu/Netconfig.src/M000086.html +19 -0
  43. data/rdoc/classes/TCTestMu.src/M000043.html +1 -1
  44. data/rdoc/created.rid +1 -1
  45. data/rdoc/files/lib/mu/api/netconfig_rb.html +1 -1
  46. data/rdoc/files/lib/mu/command/cmd_appid_rb.html +1 -1
  47. data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +1 -1
  48. data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +1 -1
  49. data/rdoc/files/test/tc_test_mu_rb.html +2 -2
  50. data/rdoc/fr_class_index.html +5 -1
  51. data/rdoc/fr_file_index.html +4 -2
  52. data/rdoc/fr_method_index.html +86 -25
  53. data/rdoc/index.html +1 -1
  54. data/test/data/app_id_stats.csv +1 -1
  55. data/test/data/app_id_status.json +43 -43
  56. data/test/tc_test_mu.rb +5 -1
  57. 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">&quot;config.json&quot;</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="#M000003">cmd_help</a>&nbsp;&nbsp;
90
- <a href="#M000005">cmd_run_dir</a>&nbsp;&nbsp;
91
- <a href="#M000004">cmd_run_file</a>&nbsp;&nbsp;
89
+ <a href="#M000057">cmd_help</a>&nbsp;&nbsp;
90
+ <a href="#M000059">cmd_run_dir</a>&nbsp;&nbsp;
91
+ <a href="#M000058">cmd_run_file</a>&nbsp;&nbsp;
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-M000003" class="method-detail">
147
- <a name="M000003"></a>
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/M000003.html" target="Code" class="method-signature"
151
- onclick="popupCode('Cmd_runscale.src/M000003.html');return false;">
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-M000005" class="method-detail">
167
- <a name="M000005"></a>
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/M000005.html" target="Code" class="method-signature"
171
- onclick="popupCode('Cmd_runscale.src/M000005.html');return false;">
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 <a href="../Scale.html">Scale</a>
179
- test for each scenario (.msl file) found in the specified directory
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-M000004" class="method-detail">
189
- <a name="M000004"></a>
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/M000004.html" target="Code" class="method-signature"
193
- onclick="popupCode('Cmd_runscale.src/M000004.html');return false;">
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 <a href="../Scale.html">Scale</a>
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">&quot;scenario required&quot;</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">&quot;.msl&quot;</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">&quot;only .msl files are currently supported&quot;</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">&quot;&quot;</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">&quot;/&quot;</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">&quot;*** Error: File #{path} does not exist&quot;</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">&quot;pattern&quot;</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">&quot;dir&quot;</span>] = <span class="ruby-ivar">@dir</span>
45
+ <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;msl&quot;</span>] = <span class="ruby-identifier">scenario</span>
46
+ <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</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">&quot;app_id_status.json&quot;</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">&quot;app_id_status.json&quot;</span>)
24
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_stats.csv&quot;</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">&quot;app_id_stats.csv&quot;</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">&quot;pattern&quot;</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">&quot;dir&quot;</span>] = <span class="ruby-ivar">@dir</span>
30
+ <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</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">&quot;dir&quot;</span>])
32
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</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">&quot;app_id_status.json&quot;</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">&quot;*.msl&quot;</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">&quot;**/*.msl&quot;</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">&quot;no msl files found in #{@dir}&quot;</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="#M000223">clear_hosts</a>&nbsp;&nbsp;
92
- <a href="#M000226">clear_interface</a>&nbsp;&nbsp;
93
- <a href="#M000229">clear_routes</a>&nbsp;&nbsp;
94
- <a href="#M000227">clear_vlans</a>&nbsp;&nbsp;
95
- <a href="#M000220">create</a>&nbsp;&nbsp;
96
- <a href="#M000221">delete</a>&nbsp;&nbsp;
97
- <a href="#M000218">get</a>&nbsp;&nbsp;
98
- <a href="#M000219">modify</a>&nbsp;&nbsp;
99
- <a href="#M000217">new</a>&nbsp;&nbsp;
100
- <a href="#M000225">resolve_hosts</a>&nbsp;&nbsp;
101
- <a href="#M000222">restore</a>&nbsp;&nbsp;
102
- <a href="#M000224">restore_hosts</a>&nbsp;&nbsp;
103
- <a href="#M000228">restore_interfaces</a>&nbsp;&nbsp;
104
- <a href="#M000230">restore_routes</a>&nbsp;&nbsp;
105
- <a href="#M000231">save</a>&nbsp;&nbsp;
91
+ <a href="#M000078">clear_hosts</a>&nbsp;&nbsp;
92
+ <a href="#M000081">clear_interface</a>&nbsp;&nbsp;
93
+ <a href="#M000084">clear_routes</a>&nbsp;&nbsp;
94
+ <a href="#M000082">clear_vlans</a>&nbsp;&nbsp;
95
+ <a href="#M000075">create</a>&nbsp;&nbsp;
96
+ <a href="#M000076">delete</a>&nbsp;&nbsp;
97
+ <a href="#M000073">get</a>&nbsp;&nbsp;
98
+ <a href="#M000074">modify</a>&nbsp;&nbsp;
99
+ <a href="#M000072">new</a>&nbsp;&nbsp;
100
+ <a href="#M000080">resolve_hosts</a>&nbsp;&nbsp;
101
+ <a href="#M000077">restore</a>&nbsp;&nbsp;
102
+ <a href="#M000079">restore_hosts</a>&nbsp;&nbsp;
103
+ <a href="#M000083">restore_interfaces</a>&nbsp;&nbsp;
104
+ <a href="#M000085">restore_routes</a>&nbsp;&nbsp;
105
+ <a href="#M000086">save</a>&nbsp;&nbsp;
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-M000217" class="method-detail">
178
- <a name="M000217"></a>
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/M000217.html" target="Code" class="method-signature"
182
- onclick="popupCode('Netconfig.src/M000217.html');return false;">
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-M000223" class="method-detail">
194
- <a name="M000223"></a>
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/M000223.html" target="Code" class="method-signature"
198
- onclick="popupCode('Netconfig.src/M000223.html');return false;">
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-M000226" class="method-detail">
211
- <a name="M000226"></a>
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/M000226.html" target="Code" class="method-signature"
215
- onclick="popupCode('Netconfig.src/M000226.html');return false;">
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-M000229" class="method-detail">
231
- <a name="M000229"></a>
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/M000229.html" target="Code" class="method-signature"
235
- onclick="popupCode('Netconfig.src/M000229.html');return false;">
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-M000227" class="method-detail">
248
- <a name="M000227"></a>
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/M000227.html" target="Code" class="method-signature"
252
- onclick="popupCode('Netconfig.src/M000227.html');return false;">
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-M000220" class="method-detail">
265
- <a name="M000220"></a>
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/M000220.html" target="Code" class="method-signature"
269
- onclick="popupCode('Netconfig.src/M000220.html');return false;">
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-M000221" class="method-detail">
286
- <a name="M000221"></a>
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/M000221.html" target="Code" class="method-signature"
290
- onclick="popupCode('Netconfig.src/M000221.html');return false;">
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-M000218" class="method-detail">
306
- <a name="M000218"></a>
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/M000218.html" target="Code" class="method-signature"
310
- onclick="popupCode('Netconfig.src/M000218.html');return false;">
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#M000218">get</a> - with no params, returns the
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-M000219" class="method-detail">
327
- <a name="M000219"></a>
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/M000219.html" target="Code" class="method-signature"
331
- onclick="popupCode('Netconfig.src/M000219.html');return false;">
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#M000219">modify</a> netconfig element(s) to
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-M000225" class="method-detail">
349
- <a name="M000225"></a>
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/M000225.html" target="Code" class="method-signature"
353
- onclick="popupCode('Netconfig.src/M000225.html');return false;">
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#M000217">new</a> Host is added if not present when the
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-M000222" class="method-detail">
371
- <a name="M000222"></a>
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/M000222.html" target="Code" class="method-signature"
375
- onclick="popupCode('Netconfig.src/M000222.html');return false;">
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-M000224" class="method-detail">
392
- <a name="M000224"></a>
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/M000224.html" target="Code" class="method-signature"
396
- onclick="popupCode('Netconfig.src/M000224.html');return false;">
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-M000228" class="method-detail">
409
- <a name="M000228"></a>
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/M000228.html" target="Code" class="method-signature"
413
- onclick="popupCode('Netconfig.src/M000228.html');return false;">
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-M000230" class="method-detail">
429
- <a name="M000230"></a>
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/M000230.html" target="Code" class="method-signature"
433
- onclick="popupCode('Netconfig.src/M000230.html');return false;">
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-M000231" class="method-detail">
446
- <a name="M000231"></a>
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/M000231.html" target="Code" class="method-signature"
450
- onclick="popupCode('Netconfig.src/M000231.html');return false;">
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=&quot;all&quot;, filepath=&quot;config.json&quot;)</span>
452
452
  </a>
453
453
  </div>