mu 5.7.35 → 5.7.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Mu_Gem.html +1287 -1077
  2. data/README.md +1305 -0
  3. data/version.rb +1 -1
  4. metadata +18 -18
  5. data/README.rdoc +0 -586
@@ -0,0 +1,1305 @@
1
+ #Mu Ruby Gem <a id="top"/>#
2
+
3
+ #####API Commands for the Mu System#####
4
+
5
+ The Mu Ruby gem contains command line application (executables) designed to help you work with Scenarios, Test Sets, Scale tests and all results generated from those tests. The gem also supports older REST API commands that you can use to configure the Mu network, get system status, or even access the Mu CLI. API library classes are exposed for use in your own custom gems.
6
+
7
+ ###Before Using the Gem###
8
+
9
+ Before using this gem, you must install the necessary software, which
10
+ includes ruby 1.8.6 and the following gems (**`sudo gem install`** *`gem`*):
11
+
12
+ - *hexy*. This ensures that hex dumps print pretty :)
13
+ - *json\_pure*. Don't confuse this with the json gem (that won't work).
14
+ - *nokogiri*. See [http://nokogiri.org/tutorials/installing\_nokogiri.html](http://nokogiri.org/tutorials/installing\_nokogiri.html) for help.
15
+ - *rest-client*. Used for HTTP calls.
16
+ - *mime-types*. Required by REST-client.
17
+
18
+ You also need to set the following Mu environment variables:
19
+
20
+ - *MU\_IP*. Set the default IP address of the Mu management interface.
21
+ - *MU\_ADMIN\_USER*. Set the default name of the admin user.
22
+ - *MU\_ADMIN\_PASS*. Set the default admin user password.
23
+
24
+ ###Supported Command Types###
25
+
26
+ - [Executables](#executables) are command-line applications are used for loading and verifying Scenarios, creating and running Test Sets, and configuring and running Scale tests.
27
+
28
+ - [cmd\_appid](#cmd_appid)
29
+ - [cmd\_runscale](#cmd_runscale)
30
+ - [cmd\_runverify](#cmd_runverify)
31
+ - [cmd\_runscenario](#cmd_runscenario)
32
+
33
+ - [Legacy REST API Commands](#legacy) provide access to legacy REST API commands supported by the Mu system.
34
+
35
+ - [cmd\_ddt](#cmd_ddt)
36
+ - [cmd\_scale](#cmd_scale)
37
+ - [cmd\_netconfig](#cmd_netconfig)
38
+ - [cmd\_muapi](#cmd_muapi)
39
+ - [cmd\_homepage](#cmd_homepage)
40
+ - [cmd\_system](#cmd_system)
41
+ - [cmd\_cli](#cmd_cli)
42
+
43
+ - [API Library Classes](#library) can be ‘required’ and used within Ruby scripts
44
+ (like most ruby gems).
45
+
46
+ - [ddt](#ddt)
47
+ - [scale](#scale)
48
+ - [netconfig](#netconfig)
49
+ - [muapi](#muapi)
50
+
51
+ ###Documentation Format <a id="documentation_format"/>###
52
+
53
+ Command documentation uses the format:
54
+
55
+ ***command***
56
+
57
+ - description
58
+ - syntax
59
+ - example
60
+
61
+ ***options***
62
+
63
+ **-command-short-name**/**--command-long-name** *parameter*
64
+
65
+ > description
66
+
67
+
68
+ * * * * *
69
+ ##Executables <a id="executables"/>##
70
+
71
+ The following command-line applications are used for loading and
72
+ verifying Scenarios, creating and running Test Sets, and configuring and
73
+ running Scale tests.
74
+
75
+ - [cmd\_appid](#cmd_appid)
76
+ - [cmd\_runscale](#cmd_runscale)
77
+ - [cmd\_runverify](#cmd_runverify)
78
+ - [cmd\_runscenario](#cmd_runscenario)
79
+ - [cmd\_musl](#cmd_musl)
80
+
81
+ ###cmd\_appid <a id="cmd_appid"/>###
82
+ #####» see [cmd_appid options](#cmd_appid_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
83
+
84
+ Use to run Scale tests for a multi-host App-ID .msl file or a directory
85
+ of .msl files. Supports command-line options for setting test parameters
86
+ (such as concurrency and pattern) and for configuring a client/server
87
+ passthrough Test Bed. Mu Studio automatically collapses all hosts in the
88
+ App-ID Scenario to just two hosts, which must be set to two Mu interfaces.
89
+
90
+ ***help***
91
+
92
+ - Gets help for all cmd\_appid commands.
93
+ - **`help`**
94
+ - `mu cmd_appid:help`
95
+
96
+ ***run\_file***
97
+
98
+ - Runs the specified .msl file.
99
+ - **`run_file -s`** *`msl-filename`*
100
+ - `mu cmd_appid:run_file -s msl_file -i a1,a2 -m admin:admin@10.10.2.2
101
+ -p 1-10000:60`
102
+
103
+ ***run\_dir***
104
+
105
+ - Runs all .msl files in the specified directory.
106
+ - **`run_dir -d`** *`msl-directory`*
107
+ - `mu cmd_appid:run_dir -d msl_file_directory -i a1-10000,a2 -m
108
+ admin:admin@10.10.2.2 -p 1-100000:360`
109
+
110
+ ***running?***
111
+
112
+ - Gets status of the scale player.
113
+ - **`running?`**
114
+ - `mu cmd_appid:running?`
115
+
116
+ ####Options <a id="cmd_appid_options"/>####
117
+
118
+ **-c**/**--csv** *csv-filename*
119
+
120
+ > Specify the .csv filename with test cases to run.
121
+
122
+ **-d**/**--dir** <directory\>
123
+
124
+ > Specify the directory with .msl files to run (required for run\_dir).
125
+
126
+ **-h**/**--help**
127
+
128
+ > Get help on command line options.
129
+
130
+ **-i**/**--interfaces** <interfaces\>
131
+
132
+ > Specify Mu interfaces as a comma-separated list. Example: `b1,b2`. When using an IP range, specify range and offset. Example: `b1-1000:0,b2`.
133
+
134
+ **-m**/**--mu\_string** *user:pass@mu-ip*
135
+
136
+ > Specify the user, password, and mgmt IP of the Mu system. Example: `admin:admin@10.9.8.7`.
137
+
138
+ **-o**/**--output** <filename\>
139
+
140
+ > Specify the filename to which you want to output logs.
141
+
142
+ **-p**/**--pattern** <start:dur,end:dur\>
143
+
144
+ > Specify pattern as concurrency-start:duration,concurrency-end:duration. Duration is in seconds. Example: `1-10000:60,10000-1:30`.
145
+
146
+ **-s**/**--scenario** <msl-filename\>
147
+
148
+ > Specify the .msl filename (required for run\_msl)
149
+
150
+ **-t**/**--test**
151
+
152
+ > Run a verification check only.
153
+
154
+ **-v**/**--verbose**
155
+
156
+ > Set the Logger::DEBUG level.
157
+
158
+ [back to top ↑](#top)
159
+
160
+ ###cmd\_runscale <a id="cmd_runscale"/>###
161
+ #####» see [cmd_runscale options](#cmd_runscale_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
162
+
163
+ Use to run Scale tests by specifying a Scenario .msl file or a directory
164
+ of .msl files. Supports command-line options for setting test parameters
165
+ (such as concurrency and pattern) and for configuring the Test Bed with
166
+ Mu interfaces and/or network hosts.
167
+
168
+ ***help***
169
+
170
+ - Gets help for all cmd\_runscale commands
171
+ - **`help`**
172
+ - `mu cmd_runscale:help`
173
+
174
+ ***run\_file***
175
+
176
+ - Runs a Scale test for the specified .msl file
177
+ - **`run_file -s`** *`msl-filename`* **`-i`** *`interface,host`* **`-p`** *`pattern`*
178
+ - `mu cmd_runscale:run_file -s msl_file -i a1,dell-9 -p 1-100:30`
179
+
180
+ ***run\_dir***
181
+
182
+ - Runs a Scale test for all .msl files in the specified directory. To
183
+ include all .msl files in nested directories, use **-r** to perform a
184
+ recursive directory search.
185
+ - **`run_dir -d`** *`msl_directory`* **`-r`**
186
+ - `mu cmd_runscale:run_dir -d msl_file_directory`
187
+
188
+ ***running?***
189
+
190
+ - Gets status of the Scale player.
191
+ - **`running?`**
192
+ - `mu cmd_runscale:running?`
193
+
194
+ ***run\_files***
195
+
196
+ - Runs a Scale test for each .msl file in the specified directory
197
+ (optionally, you can specify single .msl file). To include all .msl
198
+ files in nested directories, use **-r** to perform a recursive directory
199
+ search.
200
+ - **`run_file -d`** *`msl-directory`* **`-r -i`** *`interfaces,hosts`* **`-p`** *`pattern`*
201
+ - `mu cmd_runscale:run_file -d msl_file_directory -r -i a1,dell-9 -p
202
+ 1-100:30`
203
+
204
+ ####Options <a id="cmd_runscale_options"/>####
205
+
206
+ **-c/--csv** *csv-filename*
207
+
208
+ > Specify the filename of the .csv file that contains the test cases to run.
209
+
210
+ **-d/--dir** *directory*
211
+
212
+ > Specify the directory that contains .msl files to run (required for run\_dir). Does not include nested directories.
213
+
214
+ **-f/--default\_host** *default-host*
215
+
216
+ > Specify the default host. This host is used for all hosts in the scenario which have not been explicitly assigned.
217
+
218
+ **-h/--help**
219
+
220
+ > Get help on command line options.
221
+
222
+ **-i/--interfaces** *interfaces*
223
+
224
+ > Specify Mu interfaces as a comma-separated list. Example: `b1,b2`. When using an IP range, specify range and offset. Example: `b1-1000:0,b2`.
225
+
226
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
227
+
228
+ > Specify the user, password, and mgmt IP of the Mu system. Example: `admin:admin@10.9.8.7`.
229
+
230
+ **-o/--output** *filename*
231
+
232
+ > Specify the filename to which you want to output logs.
233
+
234
+ **-p/--pattern** *con-start*:*dur*,*con-end*:*dur*
235
+
236
+ > Specify pattern as concurrency\_start:duration,concurrency-end:duration. Duration is in
237
+ > seconds. Example: `1-10000:60,10000-1:30`.
238
+
239
+ **-r/--recursive**
240
+
241
+ > Perform a recursive directory search. Use with run\_dir and run\_files to run Scale tests for all .msl files contained in nested directories.
242
+
243
+ **-s/--scenario** *msl-filename*
244
+
245
+ > Specify the .msl filename (required for run\_msl).
246
+
247
+ **-t/--test**
248
+
249
+ > Run a verification check only.
250
+
251
+ **-v/--verbose**
252
+
253
+ > Set the Logger::DEBUG level.
254
+
255
+ [back to top ↑](#top)
256
+
257
+ ###cmd\_runverify <a id="cmd_runverify"/>###
258
+ #####» see [cmd_runverify options](#cmd_runverify_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
259
+
260
+ Use to load a Scenario and Test Set template (.xml files) and run a Test Set in Studio Verify. Supports command-line options for setting option values and for configuring the Test Bed with Mu interfaces and/or
261
+ network hosts.
262
+
263
+ ***help***
264
+
265
+ - Gets help for all cmd\_runverify commands.
266
+ - **`help`**
267
+ - `mu cmd_runverify:help`
268
+
269
+ ***run***
270
+
271
+ - Runs the specified Test Set template for the specified Scenario.
272
+ - **`run -s`** *`scenario.xml`* **`-t`** *`test-set.xml`* **`-i`** *`interface,host`*
273
+ - `mu cmd_runverify:run -s my_scenario -t my_testset -i a1,my-server`
274
+
275
+ ####Options <a id="cmd_runverify_options"/>####
276
+
277
+ **-c/--channels** *hosts*
278
+
279
+ > Specify channel hosts as a comma-separated list.
280
+
281
+ **-d/--dir** *directory*
282
+
283
+ > Specify the directory with Scenario templates to run.
284
+
285
+ **-h/--help**
286
+
287
+ > Get help on command line options.
288
+
289
+ **-i/--interfaces** *interfaces*
290
+
291
+ > Specify Mu interfaces and network hosts as a comma-separated list. Example: `b1,b2`. When using an IP range, specify range/offset. Example: `b1-1000:0,web-server`.
292
+
293
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
294
+
295
+ > Specify the user, password, and mgmt IP of the Mu system. Example: `admin:admin@10.9.8.7`.
296
+
297
+ **-o/--output** *filename*
298
+
299
+ > Specify the filename to which you want to output logs.
300
+
301
+ **-p/--options** *option:value*
302
+
303
+ > Specify option/value pairs as a comma-separated list. Example: `user:jane,email:jsmith@itemp.com`.
304
+
305
+ **-s/--scenario** *scenario-template*
306
+
307
+ > Specify the Scenario template to run (must be xml).
308
+
309
+ **-t/--testset** *testset-template*
310
+
311
+ > Specify the Test Set template to run (must be xml).
312
+
313
+ **-v/--verbose**
314
+
315
+ > Set the Logger::DEBUG level.
316
+
317
+ [back to top ↑](#top)
318
+
319
+ ###cmd\_runscenario <a id="cmd_runscenario"/>###
320
+ #####» see [cmd_runscenario options](#cmd_runscenario_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
321
+
322
+ Use to load and verify a Scenario template (.xml file). Supports command-line options for configuring the Test Bed with Mu interfaces and/or network hosts.
323
+
324
+ ***help***
325
+
326
+ - Gets help for all cmd\_runscenario commands
327
+ - **`help`**
328
+ - `mu cmd_runscenario:help`
329
+
330
+ ***run***
331
+
332
+ - Runs the specified Scenario template.
333
+ - **`run -s`** *`scenario.xml`* **`-i`** *`interfaces,hosts`*
334
+ - `mu cmd_runscenario:run -s my_scenario -i a1,my-server`
335
+
336
+ ####Options <a id="cmd_runscenario_options"/>####
337
+
338
+ **-c/--channels** *hosts*
339
+
340
+ > Specify channel hosts as a comma-separated list.
341
+
342
+ **-d/--dir** *directory*
343
+
344
+ > Specify the directory with Scenario templates to run.
345
+
346
+ **-h/--help**
347
+
348
+ > Get help on command line options.
349
+
350
+ **-i/--interfaces** *interfaces*
351
+
352
+ > Specify Mu interfaces and network hosts as a comma-separated list. Example: `b1, b2`. When using an IP range, specify range/offset. Example: `b1-1000:0,web-server`.
353
+
354
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
355
+
356
+ > Specify the user, password, and mgmt IP of the Mu system. Example: `admin:admin@10.9.8.7`.
357
+
358
+ **-o/--output** *filename*
359
+
360
+ > Specify the filename to which you want to output logs.
361
+
362
+ **-s/--scenario** *scenario-template*
363
+
364
+ > Specify the Scenario template to run (must be xml).
365
+
366
+ **-v/--verbose**
367
+
368
+ > Set the Logger::DEBUG level.
369
+
370
+ [back to top ↑](#top)
371
+
372
+ ###cmd\_musl <a id="cmd_musl"/>###
373
+ #####» see [cmd_musl options](#cmd_musl_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
374
+
375
+ Use to create .msl files from **H**TTP **Ar**chive (.har) files, which
376
+ capture web page loading information in JSON format. You can use the
377
+ **`from_har`** command to transform a .har file into a Scenario (in .msl
378
+ format) suitable for import into Mu Studio.
379
+
380
+ ***help***
381
+
382
+ - Gets help for all cmd\_musl commands.
383
+ - **`help`**
384
+ - `mu cmd_musl:help`
385
+
386
+ ***from\_har***
387
+
388
+ - Creates a .msl file from the specified .har file. If you omit the scenario filename, the output .msl file uses the har\_filename.
389
+ - **`from_har`** *`options`* **`-s`** *`scenario_filename.msl har_filename.har`*
390
+ - `mu cmd_musl:from_har --ignore-images -s my_scenario.msl
391
+ my_har_file.har`
392
+
393
+ ***escape***
394
+
395
+ - Escape special javascript characters ( $ , " , ' ) in the return payload
396
+ of the .msl file.
397
+ - **`escape -s`** *`filename.msl`*
398
+ - `mu cmd_musl:escape -s my_scenario.msl -o escaped_characters.js`
399
+
400
+ ***bin2hex***
401
+
402
+ - Convert a binary file into a hex string that can be included in a
403
+ Scenario response.
404
+ - **`bin2hex -s`** *`filename.msl`*
405
+ - `mu cmd_musl:bin2hex -s my_scenario.msl -o hex_string_file`
406
+
407
+ ####Options <a id="cmd_musl_options"/>####
408
+
409
+ **-h/--help**
410
+
411
+ > Get help on command line options.
412
+
413
+ **--ignore-non-essentials**
414
+
415
+ > Ignore unknown application files, Javascript (js) files, Cascading Style Sheet (css) files, and all image files.
416
+
417
+ **--ignore-images**
418
+
419
+ > Ignore image files.
420
+
421
+ **--ignore-css**
422
+
423
+ > Ignore CSS files.
424
+
425
+ **--ignore-js**
426
+
427
+ > Ignore Javascript (js) files.
428
+
429
+ **--ignore-payload**
430
+
431
+ > Ignore the content payload.
432
+
433
+ **--strip-large-content**[*size*]
434
+
435
+ > Replace large blocks of response content with a repeated field.
436
+
437
+ **--skip-ssl-passthru**[*size*]
438
+
439
+ > Skip all SSL transport options and structure as TCP.
440
+
441
+ **-o/--output** *filename*
442
+
443
+ > Specify the filename of the output file. For **escape** output, the output file is typically a .js file. For **bin2hex** output, you can assign the file extension of your choice.
444
+
445
+ **-s/--scenario** *filename*
446
+
447
+ > Specify the name of the msl file. When this option is not used in the command, the system uses the har filename as the msl filename.
448
+
449
+ **-v/--verbose**
450
+
451
+ > Set the Logger::DEBUG level.
452
+
453
+ [back to top ↑](#top)
454
+
455
+ * * * * *
456
+ ##Legacy API Commands <a id="legacy"/>##
457
+
458
+ These commands provide access to legacy REST API commands supported by
459
+ the Mu system.
460
+
461
+ - [cmd\_muapi](#cmd_muapi)
462
+ - [cmd\_netconfig](#cmd_netconfig)
463
+ - [cmd\_ddt](#cmd_ddt)
464
+ - [cmd\_scale](#cmd_scale)
465
+ - [cmd\_homepage](#cmd_homepage)
466
+ - [cmd\_system](#cmd_system)
467
+ - [cmd\_cli](#cmd_cli)
468
+
469
+ ###cmd\_muapi <a id="cmd_muapi"/>###
470
+ #####» see [cmd_muapi options](#cmd_muapi_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
471
+
472
+ Use to access the legacy REST API for Test Runs (Protocol Mutation,
473
+ Scenario Mutation, Denial-of-Service, and Published Vulnerability
474
+ tests).
475
+
476
+ ***help***
477
+
478
+ - Gets help for all cmd\_muapi commands.
479
+ - **`help`**
480
+ - `mu cmd_muapi:help`
481
+
482
+ ***archive***
483
+
484
+ - Manage archives (reports) for Test Runs. The run command uses the uuid of the Test Run; the status and get commands require the job\_id returned by the run command.
485
+ - To generate an archive:
486
+ - **`archive -c run -u`** *`uuid`*
487
+ - `mu cmdd_muapi:archive -c run -u 52add3cf-9040-42ce-b263-8233039931d5`
488
+ - To get the status of the archive report:
489
+ - **`archive -c status -u`** *`job-id`*
490
+ - `mu cmd_muapi:archive -c status -u 1296064526931`
491
+ - To download the archive report:
492
+ - **`archive -c get -u`** *`job-id`*
493
+ - `mu cmd_muapi:archive -c get -u 1296064526931`
494
+
495
+ ***backup***
496
+
497
+ - Manage system backup files. Supports `get`, `run`, and `status` commands.
498
+ - To generate system backup:
499
+ - **`backup -c run`**
500
+ - `mu cmd_muapi:backup -c run`
501
+ - To get the status of the backup job:
502
+ - **`backup -c status`**
503
+ - `mu cmd_muapi:backup -c status`
504
+ - To download the backup file (requires a name):
505
+ - **`backup -c get -n`** *`filename`*
506
+ - `mu cmd_muapi:backup -c get -n my-backup`
507
+
508
+ The Mu system automatically appends the .dat extension to all backup files.
509
+
510
+ ***capture***
511
+
512
+ - Manage packet captures recorded using the Mu system. The **`status`** and
513
+ **`get`** commands require the job-id returned by the **`run`** command.
514
+ - **`capture -c`** *`command`* **`-p`** *`port-number`* **`-u`** *`job-id`*
515
+ - To start recording packets (this command returns the job-id):
516
+ - **`capture -c run -p`** *`port-number`*
517
+ - `mu cmd_muapi:capture -c run -p a1`
518
+ - To get the status of the packet recording job:
519
+ - **`capture -c status -p`** *`port-number`* **`-u`** *`job-id`*
520
+ - `mu cmd_muapi:capture -c status -p a1 -u 1296064526931`
521
+ - To download the recorded packet capture:
522
+ - **`capture -c get -p`** *`port-number`* **`-u`** *`job-id`*
523
+ - `mu cmd_muapi:capture -c get -p a1 -u 1296064526931`
524
+
525
+ ***delete***
526
+
527
+ - Delete the specified Test Run or template
528
+ - **`delete -u`** *`uuid`*
529
+ - `mu cmd_muapi:delete -u 52add3cf-9040-42ce-b263-8233039931d5`
530
+
531
+ ***export\_by\_name***
532
+
533
+ - Export the specified template.
534
+ - **`export_by_name -n`** *`name`* **`-t`** *`type`*
535
+ - `mu cmd_muapi:export_by_name -n my_monitor -t monitor`
536
+
537
+ ***get\_faults***
538
+
539
+ - Get a list of faults (xml format) from a Test Run.
540
+ - **`get_faults -u`** *`uuid`* **`-v`**
541
+ - `mu cmd_muapi:get_faults -u 52add3cf-9040-42ce-b263-8233039931d5 -v`
542
+
543
+ ***get\_name***
544
+
545
+ - Get details for the specified Test Run or template.
546
+ - **`get_name -u`** *`uuid`*
547
+ - `mu cmd_muapi:get_name -u 52add3cf-9040-42ce-b263-8233039931d5`
548
+
549
+ ***list***
550
+
551
+ - Get a list of templates by type.
552
+ - **`list -t`** *`template-type`*
553
+ - `mu cmd_muapi:list -t monitor`
554
+
555
+ ***list\_by\_status***
556
+
557
+ - Get a list of Test Runs by status.
558
+ - **`list_by_status -s`** *`status`*
559
+ - `mu cmd_muapi:list_by_status -s finished`
560
+
561
+ ***list\_type***
562
+
563
+ - Get a list of all template types.
564
+ - **`list_types`**
565
+ - `mu cmd_muapi:list_types`
566
+
567
+ ***pause***
568
+
569
+ - Pause a Test Run.
570
+ - **`pause -u`** *`uuid`*
571
+ - `mu cmd_muapi:pause -u 52add3cf-9040-42ce-b263-8233039931d5`
572
+
573
+ ***resume***
574
+
575
+ - Resume a Test Run.
576
+ - **`resume -u`** *`uuid`*
577
+ - `mu cmd_muapi:pause -u 52add3cf-9040-42ce-b263-8233039931d5`
578
+
579
+ ***run***
580
+
581
+ - Start a Test Run (to rename, use the -b argument).
582
+ - **`run -u`** *`uuid`* `[`**`-b`** *`new-name`*`]`
583
+ - `mu cmd_muapi:run -u 52add3cf-9040-42ce-b263-8233039931d5 -b true`
584
+
585
+ ***status***
586
+
587
+ - Get the status of a Test Run.
588
+ - **`status -u`** *`uuid`*
589
+ - `mu cmd_muapi:status -u 52add3cf-9040-42ce-b263-8233039931d5`
590
+
591
+ ***stop***
592
+
593
+ - Stop a Test Run.
594
+ - **`stop -u`** *`uuid`*
595
+ - `mu cmd_muapi:stop -u 52add3cf-9040-42ce-b263-8233039931d5`
596
+
597
+ ####Options <a id="cmd_muapi_options"/>####
598
+
599
+ **-b/--boolean** *value*
600
+
601
+ > Specify a boolean value (true or false).
602
+
603
+ **-c/--command** *command*
604
+
605
+ > Specify the command to run (run, get, status, etc.)
606
+
607
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
608
+
609
+ > Specify the user, password, and mgmt IP of the Mu system. Example: `admin:admin@10.9.8.7`.
610
+
611
+ **-n/--name** *name*
612
+
613
+ > Specify a Test Run or template name.
614
+
615
+ **-o/--output** *filename*
616
+
617
+ > Specify the filename to which you want to output logs.
618
+
619
+ **-p/--port** *port-number*
620
+
621
+ > Specify the port number.
622
+
623
+ **-s/--status** *status*
624
+
625
+ > Specify the status filter (running, finished, aborted queued, or failed)
626
+
627
+ **-t/--type** *template-type*
628
+
629
+ > Specify the type of template.
630
+
631
+ **-u/--uuid** *uuid/job-id*
632
+
633
+ > Specify the UUID of the template to run. For archive, backup, and capture commands, this option takes a job-id value.
634
+
635
+ **-v/--verbose**
636
+
637
+ > Set the Logger::DEBUG level.
638
+
639
+ [back to top ↑](#top)
640
+
641
+ ###cmd\_netconfig <a id="cmd_netconfig"/>###
642
+ #####» see [cmd_netconfig options](#cmd_netconfig_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
643
+
644
+ Use to access the legacy REST API for configuring Mu interfaces, network
645
+ hosts, and routes.
646
+
647
+ ***help***
648
+
649
+ - Gets help for all cmd\_netconfig commands.
650
+ - **`help`**
651
+ - `mu cmd_netconfig:help`
652
+
653
+ ***clear\_hosts***
654
+
655
+ - Remove all network hosts configured in the Mu system.
656
+ - **`clear_hosts`**
657
+ - `mu cmd_netconfig:clear_hosts`
658
+
659
+ ***clear\_interface***
660
+
661
+ - Clear settings for specified Mu interfaces.
662
+ - **`clear_interface -i`** *`interface,interface`*
663
+ - `mu cmd_netconfig:clear_interface -i b1,b2`
664
+
665
+ ***clear\_routes***
666
+
667
+ - Remove all user-configured routes in the Mu system.
668
+ - **`clear_routes`**
669
+ - `mu cmd_netconfig:clear_routes`
670
+
671
+ ***clear\_vlans***
672
+
673
+ - Remove all vlans for all Mu interfaces.
674
+ - **`clear_vlans`**
675
+ - `mu cmd_netconfig:clear_vlans`
676
+
677
+ ***create***
678
+
679
+ - Create a network object such as a host or route.
680
+ - **`create -j`** *`object`* **`-e`** *`value`*
681
+ - `mu cmd_netconfig:create -j "{"default": false,"direct": false,"dst": "10.0.0.0","dst_pfx_len": 8,"gateway": "192.168.100.1","interface": "a1","interface_display_name": "A1","metric": 1,"readonly": false}" -e routes`
682
+
683
+ ***delete***
684
+
685
+ - Delete a network object such as host or route.
686
+ - **`delete -e`** *`value`*
687
+ - `mu cmd_netconfig:delete -e Web-Server`
688
+
689
+ ***get***
690
+
691
+ - Get details for a network object.
692
+ - **`get -e`** *`value`*
693
+ - `mu cmd_netconfig:get -e a1`
694
+
695
+ ***modify***
696
+
697
+ - Modify a network object such as a host or route.
698
+ - **`modify -j`** *`object`* **`-e`** *`value`*
699
+ - `mu cmd_netconfig:modify -j {"mac": "","name": "Web-Server","notes": "","v4_addr": "192.168.112.205", "v6_global_addr": "","v6_local_addr": ""} -e host`
700
+
701
+ ***resolve\_hosts***
702
+
703
+ - Get IP address for specified network host.
704
+ - **`resolve_hosts`** *`host`*
705
+ - `mu cmd_netconfig:resolve_hosts Web-Server`
706
+
707
+ ***restore***
708
+
709
+ - Restore from specified file (to overwrite existing object, use the -b
710
+ argument).
711
+ - **`restore -f`** *`filepath`* `[`**`-b`** *`clear-existing`*`]`
712
+ - `mu cmd_netconfig:restore -f my_muhosts/web-server.json true`
713
+
714
+ ***save***
715
+
716
+ - Save changes to the Mu system.
717
+ - **`save`**
718
+ - `mu cmd_netconfig:save`
719
+
720
+ ####Options <a id="cmd_netconfig_options"/>####
721
+
722
+ **-b/--boolean** *value*
723
+
724
+ > Specify a boolean value (true or false).
725
+
726
+ **-e/--element** *value*
727
+
728
+ > Specify a value for the associated command. Example: `interfaces` or `interfaces/a1`.
729
+
730
+ **-f/--filepath** *filepath*
731
+
732
+ > Specify the path to a file.
733
+
734
+ **-h/--help**
735
+
736
+ > Get help on command line options.
737
+
738
+ **-i/--interfaces** *interface-or-host*
739
+
740
+ > Specify Mu interfaces or network hosts as a comma-separated list. Example: `b1,web-server`.
741
+
742
+ **-j/--json** *object*
743
+
744
+ > Specify a json object as a text string.
745
+
746
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
747
+
748
+ > Specify a user, password, and management IP of a Mu system. Example: `admin:admin@10.9.8.7`.
749
+
750
+ **-o/--output** *filename*
751
+
752
+ > Specify the filename to which you want to output logs.
753
+
754
+ **-v/--verbose**
755
+
756
+ > Set the Logger::DEBUG level.
757
+
758
+ [back to top ↑](#top)
759
+
760
+ ###cmd\_ddt <a id="cmd_ddt"/>###
761
+ #####» see [cmd_ddt options](#cmd_ddt_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
762
+
763
+ Use to access the legacy REST API for Test Sets (Studio Verify).
764
+
765
+ ***display\_results***
766
+
767
+ - Displays results for the current Test Set.
768
+ - **`display_results`**
769
+ - `mu cmd_ddt:display_results`
770
+
771
+ ***new\_session***
772
+
773
+ - Create a new session.
774
+ - **`new_session`**
775
+ - `mu cmd_ddt:new_session`
776
+
777
+ ***load\_scenario***
778
+
779
+ - Load the specified Scenario template.
780
+ - **`load_scenario -u`** *`uuid`*
781
+ - `mu cmd_ddt:load_scenario -u 52add3cf-9040-42ce-b263-8233039931d5`
782
+
783
+ ***get\_hosts***
784
+
785
+ - Get a list of hosts in the Test Bed.
786
+ - **`get_hosts`**
787
+ - `mu cmd_ddt:get_hosts`
788
+
789
+ ***set\_hosts***
790
+
791
+ - Configure the hosts in the Test Bed. Requires host role, host name, and type (network layer).
792
+ - **`set_hosts -r`** *`role,role`* **`-n`** *`name,name`* **`-y`** *`type`*
793
+ - `mu cmd_ddt:set_hosts -r HTTP_Client,HTTP_Server -n a1,Web-Server -y v4`
794
+
795
+ ***get\_channels***
796
+
797
+ - Get a list of channels in the Test Bed.
798
+ - **`get_channels`**
799
+ - `mu cmd_ddt:get_channels`
800
+
801
+ ***set\_channels***
802
+
803
+ - Configure the channels in the Test Bed.
804
+ - **`set_channels -r`** *`role`* **`-n`** *`name`*
805
+ - `mu cmd_ddt:set_channels -r SSH_Channel -n Web-Server`
806
+
807
+ ***get\_options***
808
+
809
+ - Get a list of options in the Test Set.
810
+ - **`get_options`**
811
+ - `mu cmd_ddt:get_options`
812
+
813
+ ***set\_options***
814
+
815
+ - Configure the option values for the Test Set.
816
+ - **`set_options -n`** *`name`* **`-p`** *`value`*
817
+ - `mu cmd_ddt:set_options -n username -p jsmith`
818
+
819
+ ***get\_sessions***
820
+
821
+ - Get a list of all sessions.
822
+ - **`get_sessions`**
823
+ - `mu cmd_ddt:get_sessions`
824
+
825
+ ***setup\_test***
826
+
827
+ - Setup the Test Bed, reserving the Mu interfaces.
828
+ - **`setup_test`**
829
+ - `mu cmd_ddt:setup_test`
830
+
831
+ ***run***
832
+
833
+ - Run a Test Set.
834
+ - **`run`**
835
+ - `mu cmd_ddt:run`
836
+
837
+ ***run\_testset***
838
+
839
+ - Run the specified Test Set.
840
+ - **`run_testset -u`** *`uuid`*
841
+ - `mu cmd_ddt:run_testset -u 04aa248a-0b9b-4bf6-97e1-aab691d0acf1`
842
+
843
+ ***get\_testset\_results***
844
+
845
+ - Get results for the current Test Set.
846
+ - **`get_testset_results`**
847
+ - `mu cmd_ddt:get_testset_results`
848
+
849
+ ***get\_testset\_status***
850
+
851
+ - Get status for the current Test Set.
852
+ - **`get_testset_status`**
853
+ - `mu cmd_ddt:get_testset_status`
854
+
855
+ ***teardown\_test***
856
+
857
+ - Unsets the Test Bed selections, releasing the Mu interfaces.
858
+ - **`teardown_test`**
859
+ - `mu cmd_ddt:teardown_test`
860
+
861
+ ***close\_session***
862
+
863
+ - Closes the current session.
864
+ - **`close_session`**
865
+ - `mu cmd_ddt:close_session`
866
+
867
+ ***close\_all\_sessions***
868
+
869
+ - Closes all existing sessions.
870
+ - **`close_all_sessions`**
871
+ - `mu cmd_ddt:close_all_sessions`
872
+
873
+ ***csv\_export***
874
+
875
+ - Exports a Test Set from the Mu system to a csv file.
876
+ - **`csv_export -u`** *`uuid`*
877
+ - `mu cmd_ddt:csv_export -u 52add3cf-9040-42ce-b263-8233039931d5`
878
+
879
+ ***csv\_import***
880
+
881
+ - Imports a .csv file to create a Test Set on the Mu system.
882
+ - **`csv_import -t`** *`filename.csv`*
883
+ - `mu cmd_ddt:csv_import -t my-testset.csv`
884
+
885
+ ####Options <a id="cmd_ddt_options"/>####
886
+
887
+ **-f/--filename** *filename*
888
+
889
+ > Specify the template name for saving an imported Test Set.
890
+
891
+ **-h/--help**
892
+
893
+ > Get help on command line options.
894
+
895
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
896
+
897
+ > Specify a user, password, and management IP address of a Mu system. Example: `admin:admin@10.9.8.7`.
898
+
899
+ **-n/--names** *name-array*
900
+
901
+ > Specify host names or channel names in a comma-separated array. Example: `a1,Web-Server`.
902
+
903
+ **-o/--output** *filename*
904
+
905
+ > Specify the filename to which you want to output logs.
906
+
907
+ **-p/--option\_values** *value-array*
908
+
909
+ > Specify values for Test Set options in a comma-separated array. Example: `bob,jane,mary,tom`.
910
+
911
+ **-r/--roles** *role-array*
912
+
913
+ > Specify host roles in a comma-separated array. Example: `HTTP\_Client,HTTP\_Server`.
914
+
915
+ **-t/--testset** *filename.csv*
916
+
917
+ > Specify the name of the .csv file to import.
918
+
919
+ **-u/--uuid** *uuid*
920
+
921
+ > Specify the UUID of the Scenario or Test Set.
922
+
923
+ **-v/--verbose**
924
+
925
+ > Set the Logger::DEBUG level.
926
+
927
+ **-y/--type** *type*
928
+
929
+ > Specify network layer (v4, v6, l2) for all hosts in the Test Bed. Example: `v4`.
930
+
931
+ [back to top ↑](#top)
932
+
933
+ ###cmd\_scale <a id="cmd_scale"/>###
934
+ #####» see [cmd_scale options](#cmd_scale_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
935
+
936
+ Use to access the legacy REST API for Scale tests (Studio Scale).
937
+
938
+ ***about***
939
+
940
+ - Lists information for the Scale Player and all active and inactive Scale Engines.
941
+ - **`about`**
942
+ - `mu cmd_scale:about`
943
+
944
+ ***configure***
945
+
946
+ - Configure parameter values for any element of the scale json object.
947
+ - **`configure -p`** *`parameter`* **`-pv`** *`value`*
948
+ - `mu cmd_scale:configure -p json_element -pv json_element_value`
949
+
950
+ ***data***
951
+
952
+ - Gets chart data for the Scale test.
953
+ - **`data -w`** *`view`* **`-z`** *`zoom`* **`-ps`** *`position`* **`-b`** *`bot_id`*
954
+ - `mu cmd_scale:data -w TIMELINE -z 1 -ps 0 -b bots_10.10.6.200:1`
955
+
956
+ ***delete\_scale\_engine***
957
+
958
+ - Delete the specified Scale Engine.
959
+ - **`delete_scale_engine -b`** *`bot_id`*
960
+ - `mu cmd_scale:delete_scale_engine -b bots_10.10.6.200:1`
961
+
962
+ **help**
963
+
964
+ - Gets help for all cmd\_scale commands.
965
+ - **`help`**
966
+ - `mu cmd_scale:help`
967
+
968
+ ***list***
969
+
970
+ - Returns the current Scale Player's UUID.
971
+ - **`list`**
972
+ - `mu cmd_scale:list`
973
+
974
+ ***pcap***
975
+
976
+ - Gets a pcap from a specific Scale Engine.
977
+ - **`pcap -b`** *`bot_id`* **`-f`** *`filename`*
978
+ - `mu cmd_scale:pcap -b bots_10.10.6.200:1 -f bot_1_pcap`
979
+
980
+ ***release***
981
+
982
+ - Release the Scale Player.
983
+ - **`release`**
984
+ - `mu cmd_scale:release`
985
+
986
+ ***release\_scale\_engine***
987
+
988
+ - Releases the specified Scale Engine.
989
+ - **`release_scale_engine -b`** *`bot_id`*
990
+ - `mu cmd_scale:release_scale_engine -b bots_10.10.6.200:1`
991
+
992
+ ***reserve\_scale\_engine***
993
+
994
+ - Reserves the specified Scale Engine.
995
+ - **`reserve_scale_engine -b`** *`bot_id`*
996
+ - `mu cmd_scale:reserve_scale_engine -b bots_10.10.6.200:1`
997
+
998
+ ***session***
999
+
1000
+ - Create a new Scale Player session.
1001
+ - **`session`**
1002
+ - `mu cmd_scale:session`
1003
+
1004
+ ***start***
1005
+
1006
+ - Start the Scale test.
1007
+ - **`start -c`** *`scale-test`* **`-m`** *`user:pass@mu-ip`*
1008
+ - `mu cmd_scale:start -c scale.json -m admin:admin@10.10.2.2`
1009
+
1010
+ ***status***
1011
+
1012
+ - Gets information about the currently running Scale test.
1013
+ - **`status`**
1014
+ - `mu cmd_scale:status`
1015
+
1016
+ ***statuses***
1017
+
1018
+ - Gets the status of all active and inactive Scale engines.
1019
+ - **`statuses`**
1020
+ - `mu cmd_scale:statuses`
1021
+
1022
+ ***stop***
1023
+
1024
+ - Stops the Scale test.
1025
+ - **`stop`**
1026
+ - `mu cmd_scale:stop`
1027
+
1028
+ ***update***
1029
+
1030
+ - Update the pattern dynamically (while the Scale test is running).
1031
+ - **`update -p`** *`parameter`* **`-pv`** *`parameter-value`*
1032
+ - `mu cmd_scale:update -p delay -pv 250 -p volume -pv 100000`
1033
+
1034
+ ***verify***
1035
+
1036
+ - Verifies a Scale test.
1037
+ - **`verify`**
1038
+ - `mu cmd_scale:verify`
1039
+
1040
+ ####Options <a id="cmd_scale_options"/>####
1041
+
1042
+ **-b/--bot-id** *scale-engine-id*
1043
+
1044
+ > Specify a Scale Engine using its bot-id value.
1045
+
1046
+ **-c/--config-file** *json-filename*
1047
+
1048
+ > Specify a .json file that contains the configuration data.
1049
+
1050
+ **-f/--filename** *pcap-filename*
1051
+
1052
+ > Specify a name for the .pcap file.
1053
+
1054
+ **-h/--help**
1055
+
1056
+ > Get help on command line options.
1057
+
1058
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
1059
+
1060
+ > Specify a user, password, and mgmt IP of a Mu system. Example: `admin:admin@10.9.8.7`.
1061
+
1062
+ **-o/--output** *filename*
1063
+
1064
+ > Specify the filename to which you want to output logs.
1065
+
1066
+ **-p/--params** *parameters*
1067
+
1068
+ > Specify parameters for initial configuration or for update. Supports delay and volume parameters.
1069
+
1070
+ **-ps/--view\_position** *value*
1071
+
1072
+ > Specify the position in the timeline view for which to return data. At this time, only position 0 is supported.
1073
+
1074
+ **-pv/--param\_value** *value*
1075
+
1076
+ > Specify a value for a parameter.
1077
+
1078
+ **-v/--verbose**
1079
+
1080
+ > Set the Logger::DEBUG level.
1081
+
1082
+ **-w/--view** *view*
1083
+
1084
+ > Specify the view (RUNTIME or CALLGRAPH) for which to return data.
1085
+
1086
+ **-z/--zoom** *zoom-level*
1087
+
1088
+ > Specify the zoom level (0, .5, or 1) in the timeline view for which to return data. 1 returns data for 100% of the time range, 0.5 returns data for 50% of the time range, and 0 returns only the last minute of data.
1089
+
1090
+ [back to top ↑](#top)
1091
+
1092
+ ###cmd\_homepage <a id="cmd_homepage"/>###
1093
+ #####» see [cmd_homepage options](#cmd_homepage_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
1094
+
1095
+ Use to access information displayed on the Mu UI homepage, such as
1096
+ recent updates, backup status, or a list of latest test results.
1097
+
1098
+ ***all***
1099
+
1100
+ - Gets the complete set of information displayed on the Mu home page.
1101
+ - **`all`**
1102
+ - `mu cmd_homepage:all`
1103
+
1104
+ ***help***
1105
+
1106
+ - Gets help for all cmd\_homepage commands.
1107
+ - **`help`**
1108
+ - `mu cmd_homepage:help`
1109
+
1110
+ ***latest\_test***
1111
+
1112
+ - Gets an array of the latest test results.
1113
+ - **`latest_test`**
1114
+ - `mu cmd_homepage:latest_test`
1115
+
1116
+ ***queue\_test***
1117
+
1118
+ - Gets an array of tests in the Test Queue.
1119
+ - **`queue_test`**
1120
+ - `mu cmd_homepage:queue_test`
1121
+
1122
+ ***recent***
1123
+
1124
+ - Gets the "What's New" section from the Mu homepage.
1125
+ - **`recent`**
1126
+ - `mu cmd_homepage:recent`
1127
+
1128
+ ***status***
1129
+
1130
+ - Gets system status for licenses, backup, and updates.
1131
+ - **`status`**
1132
+ - `mu cmd_homepage:status`
1133
+
1134
+ ####Options <a id="cmd_homepage_options"/>####
1135
+
1136
+ **-h/--help**
1137
+
1138
+ > Get help on command line options.
1139
+
1140
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
1141
+
1142
+ > Specify a user, password, and management IP address of a Mu system. Example: `admin:admin@10.9.8.7`.
1143
+
1144
+ **-o/--output** *filename*
1145
+
1146
+ > Specify the filename to which you want to output logs.
1147
+
1148
+ **-v/--verbose**
1149
+
1150
+ > Set the Logger::DEBUG level.
1151
+
1152
+ [back to top ↑](#top)
1153
+
1154
+ ###cmd\_system <a id="cmd_system"/>###
1155
+ #####» see [cmd_system options](#cmd_system_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
1156
+
1157
+ Use to restart system services or to get status details for the Mu system.
1158
+
1159
+ ***restart***
1160
+
1161
+ - Restart Mu system services (this does not reboot the appliance).
1162
+ - **`restart`**
1163
+ - `mu cmd_system:restart`
1164
+
1165
+ ***status***
1166
+
1167
+ - Gets all information from the system status page.
1168
+ - **`status`**
1169
+ - `mu cmd_system:status`
1170
+
1171
+ ***status2***
1172
+
1173
+ - Gets additional system information such as hard drive status, platform model, serial number.
1174
+ - **`status2`**
1175
+ - `mu cmd_system:status2`
1176
+
1177
+ ####Options <a id="cmd_system_options"/>####
1178
+
1179
+ **-h/--help**
1180
+
1181
+ > Get help on command line options.
1182
+
1183
+ **-m/--mu\_string** *user*:*password*@*mu-ip*
1184
+
1185
+ > Specify a user, password, and management IP address of a Mu system. Example: `admin:admin@10.9.8.7`.
1186
+
1187
+ **-o/--output** *filename*
1188
+
1189
+ > Specify the filename to which you want to output logs.
1190
+
1191
+ **-v/--verbose**
1192
+
1193
+ > Set the Logger::DEBUG level.
1194
+
1195
+ [back to top ↑](#top)
1196
+
1197
+ ###cmd\_cli <a id="cmd_cli"/>###
1198
+ #####» see [cmd_cli options](#cmd_cli_options) | » see [documentation format](#documentation_format) | » back to [top](#top)#####
1199
+
1200
+ Use to access the Mu CLI.
1201
+
1202
+ ***cli\_help***
1203
+
1204
+ - Get help for all cmd\_cli commands.
1205
+ - **`cli_help`**
1206
+ - `mu cmd_cli:cli_help`
1207
+
1208
+ ***cli\_history***
1209
+
1210
+ - Display the command line history for the current session.
1211
+ - **`cli_help`**
1212
+ - `mu cmd_cli:history`
1213
+
1214
+ ***ping***
1215
+
1216
+ - Ping the specified IP address from the Mu system.
1217
+ - **`ping -a`** *`ip-address`*
1218
+ - `mu cmd_cli:ping -a 10.10.10.1`
1219
+
1220
+ ***question***
1221
+
1222
+ - Show the available CLI commands.
1223
+ - **`question`**
1224
+ - `mu cmd_cli:question`
1225
+
1226
+ ***traceroute***
1227
+
1228
+ - Get the network route to a specified IP address from the Mu system.
1229
+ - **`traceroute -a`** *`ip-address`*
1230
+ - `mu cmd_cli:traceroute -a 10.10.10.1`
1231
+
1232
+ ####Options <a id="cmd_cli_options"/>####
1233
+
1234
+ **-h/--help**
1235
+
1236
+ > Get help on command line options.
1237
+
1238
+ **-m/--mu\_string** *user***:***password***@***mu-ip*
1239
+
1240
+ > Specify a user, password, and management IP address of a Mu system. Example: `admin:admin@10.9.8.7`.
1241
+
1242
+ **-o/--output** *filename*
1243
+
1244
+ > Specify the filename to which you want to output logs.
1245
+
1246
+ **-v/--verbose**
1247
+
1248
+ > Set the Logger::DEBUG level.
1249
+
1250
+ [back to top ↑](#top)
1251
+
1252
+ * * * * *
1253
+ ##Mu Gem Library Classes <a id="library"/>##
1254
+
1255
+ These API library classes can be required and used within Ruby scripts (like most ruby gems).
1256
+
1257
+ ###muapi <a id="muapi"/>##
1258
+
1259
+ require 'rubygems'
1260
+ require 'mu'
1261
+ api = Mu::Muapi.new(“*mu-ip*”,”*user*”,”*pass*”)
1262
+ $log.level = Logger::INFO
1263
+ api.list_by_status("running")
1264
+
1265
+ ###ddt <a id="ddt"/>###
1266
+
1267
+ require 'rubygems'
1268
+ require 'mu'
1269
+ api = Mu::Ddt.new(“*mu-ip*”,”*user*”,”*pass*”)
1270
+ $log.level = Logger::INFO
1271
+ api.new_session
1272
+
1273
+ ###scale <a id="scale"/>###
1274
+
1275
+ require ‘rubygems’
1276
+ require ‘mu’
1277
+ api = Mu::Scale.new(“*mu-ip*”,”*user*”,”*pass*”)
1278
+ $log.level=Logger::INFO
1279
+ api.configure(musl, *scenario.msl*)
1280
+ api.configure(csv, *testset.csv*)
1281
+ api.configure(pattern, *pattern.json*)
1282
+
1283
+ For each file type (*scenario.msl*, *testset.csv*, *pattern.json*) you
1284
+ must pass the file contents encoded as a Ruby string. For example:
1285
+
1286
+ muslString = File.open(‘*scenario.msl*’, ‘r’, {|f| f.read}
1287
+ api.configure(musl, muslString)
1288
+ api.start
1289
+ api.status
1290
+ api.stop
1291
+ api.release
1292
+
1293
+ ###netconfig <a id="netconfig"/>###
1294
+
1295
+ require 'rubygems'
1296
+ require 'mu'
1297
+ api = Mu::Netconfig.new(“*mu-ip*”,”*user*”,”*pass*”)
1298
+ $log.level = Logger::INFO
1299
+ api.get("hosts")
1300
+
1301
+ [back to top ↑](#top)
1302
+
1303
+ * * * * *
1304
+
1305
+ Copyright 2012 Mu Dynamics Inc., All Rights Reserved.