mu 5.7.2.6 → 5.7.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mu.rb +0 -1
- data/lib/mu/api/scale.rb +1 -1
- data/rdoc/Gemfile.html +194 -0
- data/rdoc/LICENSE_txt.html +201 -0
- data/rdoc/Mu.html +478 -0
- data/rdoc/Mu/Client.html +461 -0
- data/rdoc/Mu/Command.html +338 -0
- data/rdoc/Mu/Command/API.html +844 -0
- data/rdoc/Mu/Command/Cmd_appid.html +1342 -0
- data/rdoc/Mu/Command/Cmd_cli.html +800 -0
- data/rdoc/Mu/Command/Cmd_ddt.html +1612 -0
- data/rdoc/Mu/Command/Cmd_homepage.html +762 -0
- data/rdoc/Mu/Command/Cmd_muapi.html +1363 -0
- data/rdoc/Mu/Command/Cmd_netconfig.html +1077 -0
- data/rdoc/Mu/Command/Cmd_runscale.html +1441 -0
- data/rdoc/Mu/Command/Cmd_runscenario.html +787 -0
- data/rdoc/Mu/Command/Cmd_runverify.html +893 -0
- data/rdoc/Mu/Command/Cmd_scale.html +1323 -0
- data/rdoc/Mu/Command/Cmd_system.html +677 -0
- data/rdoc/Mu/Command/Curl.html +751 -0
- data/rdoc/Mu/Command/Help.html +305 -0
- data/rdoc/Mu/Curl.html +243 -0
- data/rdoc/Mu/Curl/Error.html +304 -0
- data/rdoc/Mu/Curl/Error/Authorize.html +355 -0
- data/rdoc/Mu/Curl/Error/Connect.html +286 -0
- data/rdoc/Mu/Curl/Error/DNS.html +236 -0
- data/rdoc/Mu/Curl/Error/Region.html +307 -0
- data/rdoc/Mu/Curl/Error/Status.html +286 -0
- data/rdoc/Mu/Curl/Error/Timeout.html +286 -0
- data/rdoc/Mu/Curl/Verify.html +472 -0
- data/rdoc/Mu/Curl/Verify/Request.html +424 -0
- data/rdoc/Mu/Curl/Verify/Response.html +372 -0
- data/rdoc/Mu/Curl/Verify/Result.html +373 -0
- data/rdoc/Mu/Ddt.html +1347 -0
- data/rdoc/Mu/Helper.html +517 -0
- data/rdoc/Mu/Homepage.html +719 -0
- data/rdoc/Mu/HttpHelper.html +890 -0
- data/rdoc/Mu/Muapi.html +1226 -0
- data/rdoc/Mu/Netconfig.html +1178 -0
- data/rdoc/Mu/Scale.html +1359 -0
- data/rdoc/Mu/System.html +504 -0
- data/rdoc/Object.html +285 -0
- data/rdoc/README_rdoc.html +892 -0
- data/rdoc/Rakefile.html +257 -0
- data/rdoc/TCTestMu.html +2583 -0
- data/rdoc/Test.html +235 -0
- data/rdoc/Test/Unit.html +235 -0
- data/rdoc/Test/Unit/TestCase.html +236 -0
- data/rdoc/Test/helper_rb.html +62 -0
- data/rdoc/Test/tc_test_mu_rb.html +60 -0
- data/rdoc/VERSION.html +179 -0
- data/rdoc/bin/mu.html +54 -0
- data/rdoc/created.rid +36 -1
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +880 -20
- data/rdoc/js/darkfish.js +116 -0
- data/rdoc/js/jquery.js +32 -0
- data/rdoc/js/quicksearch.js +114 -0
- data/rdoc/js/thickbox-compressed.js +10 -0
- data/rdoc/lib/mu/api/ddt_rb.html +52 -0
- data/rdoc/lib/mu/api/homepage_rb.html +52 -0
- data/rdoc/lib/mu/api/muapi_rb.html +52 -0
- data/rdoc/lib/mu/api/netconfig_rb.html +52 -0
- data/rdoc/lib/mu/api/scale_rb.html +52 -0
- data/rdoc/lib/mu/api/system_rb.html +52 -0
- data/rdoc/lib/mu/client_rb.html +52 -0
- data/rdoc/lib/mu/command/api_rb.html +52 -0
- data/rdoc/lib/mu/command/cmd_appid_rb.html +62 -0
- data/rdoc/lib/mu/command/cmd_cli_rb.html +55 -0
- data/rdoc/lib/mu/command/cmd_ddt_rb.html +60 -0
- data/rdoc/lib/mu/command/cmd_homepage_rb.html +57 -0
- data/rdoc/lib/mu/command/cmd_muapi_rb.html +59 -0
- data/rdoc/lib/mu/command/cmd_netconfig_rb.html +58 -0
- data/rdoc/lib/mu/command/cmd_runscale_rb.html +62 -0
- data/rdoc/lib/mu/command/cmd_runscenario_rb.html +57 -0
- data/rdoc/lib/mu/command/cmd_runverify_rb.html +61 -0
- data/rdoc/lib/mu/command/cmd_scale_rb.html +58 -0
- data/rdoc/lib/mu/command/cmd_system_rb.html +59 -0
- data/rdoc/lib/mu/command/curl_rb.html +52 -0
- data/rdoc/lib/mu/command/help_rb.html +52 -0
- data/rdoc/lib/mu/command_rb.html +55 -0
- data/rdoc/lib/mu/curl/error_rb.html +52 -0
- data/rdoc/lib/mu/curl/verify_rb.html +52 -0
- data/rdoc/lib/mu/helper_rb.html +52 -0
- data/rdoc/lib/mu/http_helper_rb.html +52 -0
- data/rdoc/lib/mu_rb.html +80 -0
- data/rdoc/rdoc.css +706 -0
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +117 -117
- data/test/data/{scale_configuration.json → scale.json} +11 -11
- metadata +142 -407
- data/rdoc/classes/Mu.src/M000001.html +0 -39
- data/rdoc/classes/Mu.src/M000002.html +0 -29
- data/rdoc/classes/Mu.src/M000053.html +0 -39
- data/rdoc/classes/Mu.src/M000054.html +0 -29
- data/rdoc/classes/Mu/Client.src/M000212.html +0 -24
- data/rdoc/classes/Mu/Client.src/M000213.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000214.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000215.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000216.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000130.html +0 -22
- data/rdoc/classes/Mu/Command/API.src/M000131.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000132.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000133.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000134.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000135.html +0 -17
- data/rdoc/classes/Mu/Command/API.src/M000136.html +0 -23
- data/rdoc/classes/Mu/Command/API.src/M000137.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000138.html +0 -29
- data/rdoc/classes/Mu/Command/API.src/M000139.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000140.html +0 -22
- data/rdoc/classes/Mu/Command/API.src/M000141.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000142.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000143.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000144.html +0 -17
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000053.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000054.html +0 -30
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000055.html +0 -39
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000056.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000145.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000146.html +0 -30
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000147.html +0 -39
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000148.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000200.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000201.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000202.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000203.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000204.html +0 -20
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000205.html +0 -20
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000101.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000102.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000103.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000104.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000105.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000106.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000107.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000108.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000109.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000110.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000111.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000112.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000113.html +0 -43
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000114.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000115.html +0 -38
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000116.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000117.html +0 -38
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000118.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000119.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000120.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000121.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000122.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000206.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000207.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000208.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000209.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000210.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000211.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000164.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000165.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000166.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000167.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000168.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000169.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000170.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000171.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000172.html +0 -28
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000173.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000174.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000175.html +0 -28
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000176.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000177.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000178.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000179.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000180.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000060.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000061.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000062.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000063.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000064.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000065.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000066.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000067.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000068.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000069.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000070.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000071.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000152.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000153.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000154.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000155.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000156.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000157.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000158.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000159.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000160.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000161.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000162.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000163.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000003.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000004.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000005.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000057.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000058.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000059.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000149.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000150.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000151.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000128.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000129.html +0 -144
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000198.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000199.html +0 -200
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000181.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000182.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000183.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000184.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000185.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000186.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000187.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000188.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000189.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000190.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000191.html +0 -29
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000192.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000193.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000194.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000195.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000196.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000197.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000097.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000098.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000099.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000100.html +0 -21
- data/rdoc/classes/Mu/Command/Curl.src/M000124.html +0 -18
- data/rdoc/classes/Mu/Command/Curl.src/M000125.html +0 -21
- data/rdoc/classes/Mu/Command/Curl.src/M000126.html +0 -26
- data/rdoc/classes/Mu/Command/Help.src/M000123.html +0 -38
- data/rdoc/classes/Mu/Curl/Error.src/M000063.html +0 -18
- data/rdoc/classes/Mu/Curl/Error/Authorize.src/M000065.html +0 -22
- data/rdoc/classes/Mu/Curl/Error/Connect.src/M000068.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Region.src/M000066.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Status.src/M000064.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Timeout.src/M000067.html +0 -19
- data/rdoc/classes/Mu/Curl/Verify.src/M000055.html +0 -29
- data/rdoc/classes/Mu/Curl/Verify.src/M000056.html +0 -18
- data/rdoc/classes/Mu/Curl/Verify.src/M000057.html +0 -46
- data/rdoc/classes/Mu/Curl/Verify.src/M000058.html +0 -18
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000061.html +0 -35
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000062.html +0 -23
- data/rdoc/classes/Mu/Curl/Verify/Response.src/M000059.html +0 -24
- data/rdoc/classes/Mu/Curl/Verify/Result.src/M000060.html +0 -25
- data/rdoc/classes/Mu/Ddt.src/M000242.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000243.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000244.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000245.html +0 -23
- data/rdoc/classes/Mu/Ddt.src/M000246.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000247.html +0 -32
- data/rdoc/classes/Mu/Ddt.src/M000248.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000249.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000250.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000251.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000252.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000253.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000254.html +0 -25
- data/rdoc/classes/Mu/Ddt.src/M000255.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000256.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000257.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000258.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000259.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000260.html +0 -35
- data/rdoc/classes/Mu/Ddt.src/M000261.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000262.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000263.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000264.html +0 -22
- data/rdoc/classes/Mu/Homepage.src/M000236.html +0 -25
- data/rdoc/classes/Mu/Homepage.src/M000237.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000238.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000239.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000240.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000241.html +0 -20
- data/rdoc/classes/Mu/HttpHelper.src/M000069.html +0 -22
- data/rdoc/classes/Mu/HttpHelper.src/M000070.html +0 -25
- data/rdoc/classes/Mu/HttpHelper.src/M000071.html +0 -34
- data/rdoc/classes/Mu/HttpHelper.src/M000072.html +0 -39
- data/rdoc/classes/Mu/HttpHelper.src/M000073.html +0 -36
- data/rdoc/classes/Mu/HttpHelper.src/M000074.html +0 -34
- data/rdoc/classes/Mu/HttpHelper.src/M000075.html +0 -46
- data/rdoc/classes/Mu/HttpHelper.src/M000076.html +0 -24
- data/rdoc/classes/Mu/HttpHelper.src/M000077.html +0 -19
- data/rdoc/classes/Mu/HttpHelper.src/M000078.html +0 -33
- data/rdoc/classes/Mu/HttpHelper.src/M000079.html +0 -29
- data/rdoc/classes/Mu/Muapi.src/M000080.html +0 -25
- data/rdoc/classes/Mu/Muapi.src/M000081.html +0 -27
- data/rdoc/classes/Mu/Muapi.src/M000082.html +0 -24
- data/rdoc/classes/Mu/Muapi.src/M000083.html +0 -27
- data/rdoc/classes/Mu/Muapi.src/M000084.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000085.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000086.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000087.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000088.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000089.html +0 -22
- data/rdoc/classes/Mu/Muapi.src/M000090.html +0 -21
- data/rdoc/classes/Mu/Muapi.src/M000091.html +0 -19
- data/rdoc/classes/Mu/Muapi.src/M000092.html +0 -18
- data/rdoc/classes/Mu/Muapi.src/M000093.html +0 -18
- data/rdoc/classes/Mu/Muapi.src/M000094.html +0 -36
- data/rdoc/classes/Mu/Muapi.src/M000095.html +0 -34
- data/rdoc/classes/Mu/Muapi.src/M000096.html +0 -34
- data/rdoc/classes/Mu/Netconfig.src/M000072.html +0 -25
- data/rdoc/classes/Mu/Netconfig.src/M000073.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000074.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000075.html +0 -24
- data/rdoc/classes/Mu/Netconfig.src/M000076.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000077.html +0 -36
- data/rdoc/classes/Mu/Netconfig.src/M000078.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000079.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000080.html +0 -39
- data/rdoc/classes/Mu/Netconfig.src/M000081.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000082.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000083.html +0 -26
- data/rdoc/classes/Mu/Netconfig.src/M000084.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000085.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000086.html +0 -19
- data/rdoc/classes/Mu/Netconfig.src/M000217.html +0 -25
- data/rdoc/classes/Mu/Netconfig.src/M000218.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000219.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000220.html +0 -24
- data/rdoc/classes/Mu/Netconfig.src/M000221.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000222.html +0 -36
- data/rdoc/classes/Mu/Netconfig.src/M000223.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000224.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000225.html +0 -37
- data/rdoc/classes/Mu/Netconfig.src/M000226.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000227.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000228.html +0 -26
- data/rdoc/classes/Mu/Netconfig.src/M000229.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000230.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000231.html +0 -19
- data/rdoc/classes/Mu/Scale.src/M000006.html +0 -47
- data/rdoc/classes/Mu/Scale.src/M000007.html +0 -27
- data/rdoc/classes/Mu/Scale.src/M000008.html +0 -22
- data/rdoc/classes/Mu/Scale.src/M000009.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000010.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000011.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000012.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000013.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000014.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000015.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000016.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000017.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000018.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000019.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000020.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000021.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000022.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000023.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000024.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000025.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000265.html +0 -46
- data/rdoc/classes/Mu/Scale.src/M000266.html +0 -27
- data/rdoc/classes/Mu/Scale.src/M000267.html +0 -22
- data/rdoc/classes/Mu/Scale.src/M000268.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000269.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000270.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000271.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000272.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000273.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000274.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000275.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000276.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000277.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000278.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000279.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000280.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000281.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000282.html +0 -20
- data/rdoc/classes/Mu/System.src/M000232.html +0 -25
- data/rdoc/classes/Mu/System.src/M000233.html +0 -20
- data/rdoc/classes/Mu/System.src/M000234.html +0 -20
- data/rdoc/classes/Mu/System.src/M000235.html +0 -20
- data/rdoc/classes/Object.src/M000052.html +0 -18
- data/rdoc/classes/TCTestMu.src/M000001.html +0 -24
- data/rdoc/classes/TCTestMu.src/M000002.html +0 -18
- data/rdoc/classes/TCTestMu.src/M000003.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000004.html +0 -33
- data/rdoc/classes/TCTestMu.src/M000005.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000006.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000007.html +0 -26
- data/rdoc/classes/TCTestMu.src/M000008.html +0 -29
- data/rdoc/classes/TCTestMu.src/M000009.html +0 -39
- data/rdoc/classes/TCTestMu.src/M000010.html +0 -38
- data/rdoc/classes/TCTestMu.src/M000011.html +0 -38
- data/rdoc/classes/TCTestMu.src/M000012.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000013.html +0 -25
- data/rdoc/classes/TCTestMu.src/M000014.html +0 -25
- data/rdoc/classes/TCTestMu.src/M000015.html +0 -33
- data/rdoc/classes/TCTestMu.src/M000016.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000017.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000018.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000019.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000020.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000021.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000022.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000023.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000024.html +0 -44
- data/rdoc/classes/TCTestMu.src/M000025.html +0 -53
- data/rdoc/classes/TCTestMu.src/M000026.html +0 -22
- data/rdoc/classes/TCTestMu.src/M000027.html +0 -49
- data/rdoc/classes/TCTestMu.src/M000028.html +0 -40
- data/rdoc/classes/TCTestMu.src/M000029.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000030.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000031.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000032.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000033.html +0 -27
- data/rdoc/classes/TCTestMu.src/M000034.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000035.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000036.html +0 -41
- data/rdoc/classes/TCTestMu.src/M000037.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000038.html +0 -24
- data/rdoc/classes/TCTestMu.src/M000039.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000040.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000041.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000042.html +0 -26
- data/rdoc/classes/TCTestMu.src/M000043.html +0 -28
- data/rdoc/classes/TCTestMu.src/M000044.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000045.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000046.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000047.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000048.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000049.html +0 -22
- data/rdoc/classes/TCTestMu.src/M000050.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000051.html +0 -35
- data/test/helper.rb +0 -18
- data/test/tc_test_mu.rb +0 -720
|
@@ -1,21 +0,0 @@
|
|
|
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>test_scale_new (TCTestMu)</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 test/tc_test_mu.rb, line 636</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scale_new</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</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>)
|
|
16
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">api</span>.<span class="ruby-identifier">host</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@mu_ip</span>, <span class="ruby-value str">"failed to set mu_ip"</span>)
|
|
17
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">api</span>.<span class="ruby-identifier">docroot</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"/api/v5/scale/"</span>, <span class="ruby-value str">"failed to set docroot"</span>)
|
|
18
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">api</span>.<span class="ruby-identifier">uuid</span>.<span class="ruby-identifier">nil?</span>, <span class="ruby-value str">"uuid is nil"</span>)
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,23 +0,0 @@
|
|
|
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>test_scale_about (TCTestMu)</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 test/tc_test_mu.rb, line 643</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scale_about</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</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>)
|
|
16
|
-
<span class="ruby-identifier">about</span> = <span class="ruby-identifier">api</span>.<span class="ruby-identifier">about</span>
|
|
17
|
-
<span class="ruby-comment cmt"># puts JSON.pretty_generate about</span>
|
|
18
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">about</span>[<span class="ruby-value">0</span>][<span class="ruby-value str">"group"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"active"</span>, <span class="ruby-node">"expected 'active' group, got #{about[0]["group"]}"</span>)
|
|
19
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">about</span>[<span class="ruby-value">0</span>][<span class="ruby-value str">"type"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"bot"</span>, <span class="ruby-node">"expected 'bot' type, got #{about[0]["type"]}"</span>)
|
|
20
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">api</span>.<span class="ruby-identifier">uuid</span>.<span class="ruby-identifier">nil?</span>, <span class="ruby-value str">"uuid is nil"</span>)
|
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
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>test_scale_list (TCTestMu)</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 test/tc_test_mu.rb, line 652</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scale_list</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</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>)
|
|
16
|
-
<span class="ruby-identifier">list</span> = <span class="ruby-identifier">api</span>.<span class="ruby-identifier">list</span>
|
|
17
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> , <span class="ruby-node">"expected list of length 1, got #{list.length}"</span>)
|
|
18
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">api</span>.<span class="ruby-identifier">uuid</span>.<span class="ruby-identifier">nil?</span>, <span class="ruby-value str">"uuid is nil"</span>)
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,20 +0,0 @@
|
|
|
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>test_scale_session (TCTestMu)</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 test/tc_test_mu.rb, line 659</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scale_session</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</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>)
|
|
16
|
-
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">session</span>
|
|
17
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">api</span>.<span class="ruby-identifier">uuid</span>.<span class="ruby-identifier">nil?</span>, <span class="ruby-value str">"uuid is nil"</span>)
|
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
-
</body>
|
|
20
|
-
</html>
|
|
@@ -1,20 +0,0 @@
|
|
|
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>test_system_new (TCTestMu)</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 test/tc_test_mu.rb, line 669</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_system_new</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">System</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>)
|
|
16
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">api</span>.<span class="ruby-identifier">host</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@mu_ip</span>, <span class="ruby-value str">"failed to set mu_ip"</span>)
|
|
17
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">api</span>.<span class="ruby-identifier">docroot</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"/api/v5/system/"</span>, <span class="ruby-value str">"failed to set docroot"</span>)
|
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
-
</body>
|
|
20
|
-
</html>
|
|
@@ -1,22 +0,0 @@
|
|
|
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>test_cmd_system_status (TCTestMu)</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 test/tc_test_mu.rb, line 679</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_cmd_system_status</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span><span class="ruby-operator">::</span><span class="ruby-constant">Cmd_system</span>.<span class="ruby-identifier">new</span>
|
|
16
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">api</span>.<span class="ruby-identifier">cmd_status</span> []
|
|
17
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">result</span>)
|
|
18
|
-
<span class="ruby-identifier">ports</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//ports"</span>)
|
|
19
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">ports</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">>=</span> <span class="ruby-value">5</span>, <span class="ruby-node">"expected to find at least 5 ports, but got #{ports.length}"</span>)
|
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
@@ -1,20 +0,0 @@
|
|
|
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>test_cmd_system_status2 (TCTestMu)</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 test/tc_test_mu.rb, line 687</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_cmd_system_status2</span>
|
|
15
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span><span class="ruby-operator">::</span><span class="ruby-constant">Cmd_system</span>.<span class="ruby-identifier">new</span>
|
|
16
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">api</span>.<span class="ruby-identifier">cmd_status2</span> []
|
|
17
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">result</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"raid"</span>), <span class="ruby-node">"expected to find 'raid' in results, but got #{result}"</span>)
|
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
-
</body>
|
|
20
|
-
</html>
|
|
@@ -1,35 +0,0 @@
|
|
|
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>add_localhost_with_channel (TCTestMu)</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 test/tc_test_mu.rb, line 695</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_localhost_with_channel</span>
|
|
15
|
-
<span class="ruby-identifier">local_host</span> = {
|
|
16
|
-
<span class="ruby-value str">"name"</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"localhost"</span>,
|
|
17
|
-
<span class="ruby-value str">"ssh_channel"</span>=<span class="ruby-operator">></span> {
|
|
18
|
-
<span class="ruby-value str">"username"</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"root"</span>,
|
|
19
|
-
<span class="ruby-value str">"prompt"</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"]#"</span>,
|
|
20
|
-
<span class="ruby-value str">"commands"</span>=<span class="ruby-operator">></span> [
|
|
21
|
-
|
|
22
|
-
],
|
|
23
|
-
<span class="ruby-value str">"tcp_port"</span>=<span class="ruby-operator">></span> <span class="ruby-value">22</span>,
|
|
24
|
-
<span class="ruby-value str">"password"</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"bogus"</span>
|
|
25
|
-
},
|
|
26
|
-
<span class="ruby-value str">"v4_addr"</span>=<span class="ruby-operator">></span> <span class="ruby-ivar">@mu_ip</span>
|
|
27
|
-
}
|
|
28
|
-
<span class="ruby-comment cmt"># $log.level = Logger::DEBUG</span>
|
|
29
|
-
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span><span class="ruby-operator">::</span><span class="ruby-constant">Cmd_netconfig</span>.<span class="ruby-identifier">new</span>
|
|
30
|
-
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">cmd_delete</span> [<span class="ruby-value str">"-e"</span>, <span class="ruby-value str">"hosts/localhost"</span>] <span class="ruby-comment cmt"># may not exist</span>
|
|
31
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">api</span>.<span class="ruby-identifier">cmd_create</span> [<span class="ruby-value str">"-j"</span>, <span class="ruby-constant">JSON</span>(<span class="ruby-identifier">local_host</span>), <span class="ruby-value str">"-e"</span>, <span class="ruby-value str">"hosts"</span>]
|
|
32
|
-
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"created"</span>), <span class="ruby-value str">"Failed to create host:"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">to_s</span>)
|
|
33
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|
data/test/helper.rb
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'bundler'
|
|
3
|
-
begin
|
|
4
|
-
Bundler.setup(:default, :development)
|
|
5
|
-
rescue Bundler::BundlerError => e
|
|
6
|
-
$stderr.puts e.message
|
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
|
8
|
-
exit e.status_code
|
|
9
|
-
end
|
|
10
|
-
require 'test/unit'
|
|
11
|
-
require 'shoulda'
|
|
12
|
-
|
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
15
|
-
require 'mu'
|
|
16
|
-
|
|
17
|
-
class Test::Unit::TestCase
|
|
18
|
-
end
|
data/test/tc_test_mu.rb
DELETED
|
@@ -1,720 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'test/unit'
|
|
3
|
-
require 'lib/mu'
|
|
4
|
-
require 'json'
|
|
5
|
-
|
|
6
|
-
class Object
|
|
7
|
-
def deep_clone
|
|
8
|
-
Marshal::load(Marshal.dump(self))
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
class TCTestMu < Test::Unit::TestCase
|
|
13
|
-
|
|
14
|
-
$dir = Dir.pwd
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def setup
|
|
19
|
-
$log.level = Logger::INFO
|
|
20
|
-
@mu_ip = ENV['MU_IP']
|
|
21
|
-
@mu_admin_user = ENV['MU_ADMIN_USER']
|
|
22
|
-
@mu_admin_pass = ENV['MU_ADMIN_PASS']
|
|
23
|
-
Dir.chdir($dir)
|
|
24
|
-
$cookie = nil # reset for htto_helper
|
|
25
|
-
# puts "pwd = #{Dir.pwd}"
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def teardown
|
|
29
|
-
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# -------------- cmd_appid ----------------
|
|
33
|
-
|
|
34
|
-
# use ip range setting and a brief pattern
|
|
35
|
-
def test_cmd_appid_run_file
|
|
36
|
-
File.delete("app_id_status.json") if File.exists?("app_id_status.json")
|
|
37
|
-
app = Mu::Command::Cmd_appid.new
|
|
38
|
-
args = Array.new
|
|
39
|
-
args << "-s"
|
|
40
|
-
args << "#{Dir.pwd}/test/data/data_cgi.msl"
|
|
41
|
-
args << "-i"
|
|
42
|
-
args << "b1-10000,b2"
|
|
43
|
-
args << "-p"
|
|
44
|
-
args << "1-100:10"
|
|
45
|
-
app.cmd_run_file args
|
|
46
|
-
assert(File.exists?("app_id_status.json"), "app_id_status.json file was not created")
|
|
47
|
-
j = JSON File.read("app_id_status.json")
|
|
48
|
-
status = j["status"]
|
|
49
|
-
assert(status["statistics"]["summary"]["duration"].to_f >= 10.0, "expected summary duration > 10, but got #{status["statistics"]["summary"]["duration"]}")
|
|
50
|
-
assert(status["statistics"]["summary"]["instances"]["executed"].to_i > 10, "expected instances executed > 0, but got #{status["statistics"]["summary"]["instances"]["executed"]}")
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# use ip range setting and a brief pattern
|
|
54
|
-
def test_cmd_appid_run_dir
|
|
55
|
-
File.delete("app_id_status.json") if File.exists?("app_id_status.json")
|
|
56
|
-
app = Mu::Command::Cmd_appid.new
|
|
57
|
-
args = Array.new
|
|
58
|
-
args << "-d"
|
|
59
|
-
args << "#{Dir.pwd}/test/data"
|
|
60
|
-
args << "-i"
|
|
61
|
-
args << "b1-10000,b2"
|
|
62
|
-
args << "-p"
|
|
63
|
-
args << "1-100:10"
|
|
64
|
-
app.cmd_run_dir args
|
|
65
|
-
sleep 2
|
|
66
|
-
assert(File.exists?("app_id_status.json"), "app_id_status.json file was not created")
|
|
67
|
-
j = JSON File.read("app_id_status.json")
|
|
68
|
-
status = j["status"]
|
|
69
|
-
assert(status["statistics"]["summary"]["duration"].to_f >= 10.0, "expected summary duration > 10, but got #{status["statistics"]["summary"]["duration"]}")
|
|
70
|
-
assert(status["statistics"]["summary"]["instances"]["executed"].to_i > 10, "expected instances executed > 0, but got #{status["statistics"]["summary"]["instances"]["executed"]}")
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
# -------------- cmd_cli ----------------
|
|
75
|
-
|
|
76
|
-
def test_cli_history
|
|
77
|
-
api = Mu::Command::Cmd_cli.new
|
|
78
|
-
result = api.cmd_history []
|
|
79
|
-
puts result
|
|
80
|
-
assert result==true, "expected 'true'"
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
def test_cli_question
|
|
84
|
-
api = Mu::Command::Cmd_cli.new
|
|
85
|
-
result = api.cmd_question []
|
|
86
|
-
puts result
|
|
87
|
-
assert result==true, "expected 'true'"
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# -------------- cmd_ddt --------------
|
|
91
|
-
|
|
92
|
-
def test_cmd_ddt_get_all_sessions
|
|
93
|
-
api = Mu::Command::Cmd_ddt.new
|
|
94
|
-
api.cmd_close_all_sessions []
|
|
95
|
-
api.cmd_new_session []
|
|
96
|
-
api.cmd_new_session []
|
|
97
|
-
sessions = Nokogiri::XML(api.cmd_get_all_sessions [])
|
|
98
|
-
sess = sessions.xpath("//session")
|
|
99
|
-
assert(sess.length == 2, "expected 2 sessions, got #{sess.length}")
|
|
100
|
-
ensure
|
|
101
|
-
api.cmd_close_all_sessions []
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
def test_cmd_ddt_csv_import_export
|
|
105
|
-
api = Mu::Command::Cmd_ddt.new
|
|
106
|
-
api.cmd_close_all_sessions []
|
|
107
|
-
api.cmd_new_session []
|
|
108
|
-
response = Nokogiri::XML(api.cmd_csv_import [ "-t", "#{Dir.pwd}/test/data/default_test.csv"])
|
|
109
|
-
status = response.xpath("//status")[0].content
|
|
110
|
-
assert(status == "true", "expected status=true, got #{status}")
|
|
111
|
-
uuid = response.xpath("//message")[0].content
|
|
112
|
-
response = Nokogiri::XML(api.cmd_csv_export ["-u", uuid ])
|
|
113
|
-
status = response.xpath("//status")[0].content
|
|
114
|
-
assert(status == "true", "expected status=true, got #{status}")
|
|
115
|
-
ensure
|
|
116
|
-
api.cmd_close_all_sessions []
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
def test_cmd_ddt_get_set_options
|
|
120
|
-
scenario_uuid = "ef6fe3eb-4e9f-44b5-a99e-c431d82e4eeb"
|
|
121
|
-
#test_set_uuid = "49cd406e-a8ca-4360-a115-e7ac33e8034f"
|
|
122
|
-
api = Mu::Command::Cmd_ddt.new
|
|
123
|
-
api.cmd_close_all_sessions []
|
|
124
|
-
api.cmd_new_session []
|
|
125
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
126
|
-
http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/data_cgi.xml"))
|
|
127
|
-
# http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/test_data_cgi_error.xml"))
|
|
128
|
-
api.cmd_load_scenario [ "-u", scenario_uuid ]
|
|
129
|
-
api.cmd_setup_test []
|
|
130
|
-
response = api.cmd_get_options []
|
|
131
|
-
doc = Nokogiri::XML(response)
|
|
132
|
-
options = doc.xpath("//option/name")
|
|
133
|
-
assert options.length==8, "expected 8 scenario options, found #{options.length}"
|
|
134
|
-
response = api.cmd_set_options [ "-n", "scenario_user_options.url", "-p", "hullo" ]
|
|
135
|
-
response.each do | resp |
|
|
136
|
-
doc = Nokogiri::XML(resp)
|
|
137
|
-
message = doc.xpath("//message").text
|
|
138
|
-
assert message.include?("Option set") , "expected 'Option set' but got #{message}"
|
|
139
|
-
end
|
|
140
|
-
ensure
|
|
141
|
-
api.cmd_close_all_sessions []
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
def test_cmd_ddt_get_set_hosts
|
|
145
|
-
scenario_uuid = "ef6fe3eb-4e9f-44b5-a99e-c431d82e4eeb"
|
|
146
|
-
api = Mu::Command::Cmd_ddt.new
|
|
147
|
-
api.cmd_close_all_sessions [ "-v" ]
|
|
148
|
-
api.cmd_new_session []
|
|
149
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
150
|
-
http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/data_cgi.xml"))
|
|
151
|
-
api.cmd_load_scenario [ "-u", scenario_uuid ]
|
|
152
|
-
api.cmd_setup_test []
|
|
153
|
-
response = api.cmd_get_hosts []
|
|
154
|
-
doc = Nokogiri::XML(response)
|
|
155
|
-
hosts = doc.xpath("//host")
|
|
156
|
-
role = doc.xpath("//host/role")[0].text
|
|
157
|
-
assert hosts.length==2, "expected 2 scenario hosts, found #{hosts.length}"
|
|
158
|
-
response = api.cmd_set_hosts [ "-r", role, "-n", "a3" ]
|
|
159
|
-
response.each do | resp |
|
|
160
|
-
doc = Nokogiri::XML(resp)
|
|
161
|
-
message = doc.xpath("//message").text
|
|
162
|
-
assert message.include?("Bind host successfully") , "expected 'Bind host successfully' but got #{message}"
|
|
163
|
-
end
|
|
164
|
-
ensure
|
|
165
|
-
api.cmd_close_all_sessions []
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
def test_cmd_ddt_get_set_channels
|
|
169
|
-
add_localhost_with_channel
|
|
170
|
-
scenario_uuid = "379a4cf8-8fe7-4d2d-8f6b-b8c6b71557b4" # ftp_with_channel
|
|
171
|
-
api = Mu::Command::Cmd_ddt.new
|
|
172
|
-
api.cmd_close_all_sessions [ "-v" ]
|
|
173
|
-
api.cmd_new_session []
|
|
174
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
175
|
-
http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/ftp_with_channel.xml"))
|
|
176
|
-
api.cmd_load_scenario [ "-u", scenario_uuid ]
|
|
177
|
-
api.cmd_setup_test []
|
|
178
|
-
response = api.cmd_get_channels []
|
|
179
|
-
doc = Nokogiri::XML(response)
|
|
180
|
-
channels = doc.xpath("//channel")
|
|
181
|
-
assert channels.length==1, "expected 1 scenario channel, found #{channels.length}"
|
|
182
|
-
response = api.cmd_set_channels [ "-r", "channel", "-n", "localhost" ]
|
|
183
|
-
response.each do | resp |
|
|
184
|
-
doc = Nokogiri::XML(resp)
|
|
185
|
-
message = doc.xpath("//message").text
|
|
186
|
-
assert message.include?("Bind channel successfully") , "expected 'Bind host successfully' but got #{message}"
|
|
187
|
-
end
|
|
188
|
-
ensure
|
|
189
|
-
api.cmd_close_all_sessions []
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
# -------------- ddt ------------------
|
|
193
|
-
|
|
194
|
-
def test_ddt_new
|
|
195
|
-
api = Mu::Ddt.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
196
|
-
assert(api.host == @mu_ip, "failed to set mu_ip")
|
|
197
|
-
assert(api.docroot == "/api/v5/ddt/", "failed to set docroot")
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
def test_ddt_get_all_sessions
|
|
201
|
-
api = Mu::Ddt.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
202
|
-
api.new_session
|
|
203
|
-
api.new_session
|
|
204
|
-
sessions = Nokogiri::XML(api.get_all_sessions)
|
|
205
|
-
sess = sessions.xpath("//session")
|
|
206
|
-
assert(sess.length == 2, "expected 2 sessions, got #{sess.length}")
|
|
207
|
-
ensure
|
|
208
|
-
api.close_all_sessions
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
def test_ddt_close_all_sessions
|
|
212
|
-
api = Mu::Ddt.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
213
|
-
api.new_session
|
|
214
|
-
api.new_session
|
|
215
|
-
api.new_session
|
|
216
|
-
api.close_all_sessions
|
|
217
|
-
sessions = Nokogiri::XML(api.get_all_sessions)
|
|
218
|
-
sess = sessions.xpath("//session")
|
|
219
|
-
assert(sess.length == 0, "expected 0 sessions, got #{sess.length}")
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
def test_ddt_set_hosts
|
|
223
|
-
$log.level = Logger::DEBUG
|
|
224
|
-
data_cgi_uuid = "ef6fe3eb-4e9f-44b5-a99e-c431d82e4eeb"
|
|
225
|
-
api = Mu::Ddt.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
226
|
-
api.new_session
|
|
227
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
228
|
-
http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/data_cgi.xml"))
|
|
229
|
-
api.load_scenario(data_cgi_uuid)
|
|
230
|
-
api.setup_test
|
|
231
|
-
response = api.set_hosts( ["192.168.40.217","192.168.40.9"], ["a1", "a2"] )
|
|
232
|
-
response.each do | resp |
|
|
233
|
-
doc = Nokogiri::XML(resp)
|
|
234
|
-
message = doc.xpath("//message").text
|
|
235
|
-
assert message.include?("Bind host successfully") , "expected 'Bind host successfully' but got #{message}"
|
|
236
|
-
end
|
|
237
|
-
ensure
|
|
238
|
-
api.close_all_sessions
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
# -------------- cmd_homepage -------------
|
|
242
|
-
|
|
243
|
-
def test_homepage_status
|
|
244
|
-
api = Mu::Command::Cmd_homepage.new
|
|
245
|
-
result = JSON api.cmd_status []
|
|
246
|
-
assert result[0]["title"] == "Licenses", "expected 'Licenses'"
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
def test_homepage_recent
|
|
250
|
-
api = Mu::Command::Cmd_homepage.new
|
|
251
|
-
result = JSON api.cmd_recent []
|
|
252
|
-
assert !result[0]["summary"].nil?, "expected to find a summary field but didn't"
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
def test_homepage_all
|
|
256
|
-
api = Mu::Command::Cmd_homepage.new
|
|
257
|
-
result = JSON api.cmd_all []
|
|
258
|
-
assert !result["status"].nil?, "expected to find a status field but didn't"
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
def test_homepage_latest_test
|
|
262
|
-
api = Mu::Command::Cmd_homepage.new
|
|
263
|
-
result = JSON api.cmd_latest_test []
|
|
264
|
-
assert !result.nil?, "expected to get something back but didn't"
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
# -------------- homepage -------------
|
|
268
|
-
|
|
269
|
-
def test_homepage_new
|
|
270
|
-
api = Mu::Homepage.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
271
|
-
assert(api.host == @mu_ip, "failed to set mu_ip")
|
|
272
|
-
assert(api.docroot == "/api/v5/homepage/", "failed to set docroot")
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
# -------------- cmd_muapi ------------
|
|
276
|
-
|
|
277
|
-
def test_cmd_muapi_types
|
|
278
|
-
api = Mu::Command::Cmd_muapi.new
|
|
279
|
-
response = api.cmd_types []
|
|
280
|
-
assert(response.include?("scenario"), "expected scenario got #{response}")
|
|
281
|
-
end
|
|
282
|
-
|
|
283
|
-
def test_cmd_muapi_export_by_uuid
|
|
284
|
-
api = Mu::Command::Cmd_muapi.new
|
|
285
|
-
scenario_uuid = "379a4cf8-8fe7-4d2d-8f6b-b8c6b71557b4" # ftp_with_channel
|
|
286
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
287
|
-
http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/ftp_with_channel.xml"))
|
|
288
|
-
response = api.cmd_export_by_uuid(["-u", scenario_uuid]).to_s
|
|
289
|
-
assert response.include?(scenario_uuid), "expected #{scenario_uuid} but did not find it"
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
def test_cmd_muapi_export_by_type_and_name
|
|
293
|
-
api = Mu::Command::Cmd_muapi.new
|
|
294
|
-
scenario_uuid = "379a4cf8-8fe7-4d2d-8f6b-b8c6b71557b4" # ftp_with_channel
|
|
295
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
296
|
-
http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/ftp_with_channel.xml"))
|
|
297
|
-
response = api.cmd_export_by_type_and_name(["-n", "ftp_with_channel", "-t", "scenario"]).to_s
|
|
298
|
-
assert response.include?(scenario_uuid), "expected #{scenario_uuid} but did not find it"
|
|
299
|
-
end
|
|
300
|
-
|
|
301
|
-
def test_cmd_muapi_capture
|
|
302
|
-
api = Mu::Command::Cmd_muapi.new
|
|
303
|
-
run_args = Array.new
|
|
304
|
-
run_args << "-c"
|
|
305
|
-
run_args << "run"
|
|
306
|
-
run_args << "-p"
|
|
307
|
-
run_args << "a1"
|
|
308
|
-
job_id = api.cmd_capture run_args
|
|
309
|
-
sleep 2
|
|
310
|
-
status_args = Array.new
|
|
311
|
-
status_args << "-c"
|
|
312
|
-
status_args << "status"
|
|
313
|
-
status_args << "-p"
|
|
314
|
-
status_args << "a1"
|
|
315
|
-
status_args << "-u"
|
|
316
|
-
status_args << job_id
|
|
317
|
-
status = api.cmd_capture status_args
|
|
318
|
-
sleep 2
|
|
319
|
-
get_args = Array.new
|
|
320
|
-
get_args << "-c"
|
|
321
|
-
get_args << "get"
|
|
322
|
-
get_args << "-p"
|
|
323
|
-
get_args << "a1"
|
|
324
|
-
get_args << "-u"
|
|
325
|
-
get_args << job_id
|
|
326
|
-
api.cmd_capture get_args
|
|
327
|
-
sleep 2
|
|
328
|
-
assert( File.exists?("#{job_id}.pcap"), "expected to find #{job_id}.pcap but didn't")
|
|
329
|
-
end
|
|
330
|
-
|
|
331
|
-
def test_cmd_muapi_analysis
|
|
332
|
-
# $log.level = Logger::DEBUG
|
|
333
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
334
|
-
response = http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/irc.xml"))
|
|
335
|
-
uuid = response.xpath("//uuid")[0].content
|
|
336
|
-
api = Mu::Command::Cmd_muapi.new
|
|
337
|
-
|
|
338
|
-
run_uuid = api.cmd_run make_uuid_args(uuid) # use the run_uuid for subsequent calls
|
|
339
|
-
sleep 2
|
|
340
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
341
|
-
assert(status == "RUNNING", "after RUN, expected status=RUNNING, got #{status}")
|
|
342
|
-
api.cmd_pause make_uuid_args(run_uuid)
|
|
343
|
-
while true
|
|
344
|
-
sleep 2
|
|
345
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
346
|
-
break if status == "SUSPENDED"
|
|
347
|
-
end
|
|
348
|
-
api.cmd_resume make_uuid_args(run_uuid)
|
|
349
|
-
while true
|
|
350
|
-
sleep 2
|
|
351
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
352
|
-
break if status == "RUNNING"
|
|
353
|
-
end
|
|
354
|
-
list = api.cmd_list_by_status ["-s", "running"]
|
|
355
|
-
assert(list.to_s.include?(run_uuid), "expected run_uuid #{run_uuid}in the list_by_status for running, but got #{list}")
|
|
356
|
-
api.cmd_stop make_uuid_args(run_uuid)
|
|
357
|
-
sleep 2
|
|
358
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
359
|
-
assert(status == "ABORTED", "after STOP, expected status=ABORTED, got #{status}")
|
|
360
|
-
name = api.cmd_get_name make_uuid_args(run_uuid) # returns a Nokogiri::XML::Attr
|
|
361
|
-
assert(name.value.include?("irc_scenario_mugem"), "expected name = irc_scenario_mugem but got #{name.value}")
|
|
362
|
-
ensure
|
|
363
|
-
begin
|
|
364
|
-
api.cmd_stop make_uuid_args(run_uuid)
|
|
365
|
-
rescue
|
|
366
|
-
# do nothing. probably already stopped
|
|
367
|
-
end
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
def make_uuid_args(uuid)
|
|
371
|
-
args = Array.new
|
|
372
|
-
args << "-u"
|
|
373
|
-
args << uuid
|
|
374
|
-
args << "-v"
|
|
375
|
-
return args
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
def test_cmd_muapi_archive
|
|
379
|
-
# $log.level = Logger::DEBUG
|
|
380
|
-
# load it
|
|
381
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
382
|
-
response = http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/irc.xml"))
|
|
383
|
-
uuid = response.xpath("//uuid")[0].content
|
|
384
|
-
api = Mu::Command::Cmd_muapi.new
|
|
385
|
-
|
|
386
|
-
# run it
|
|
387
|
-
run_uuid = api.cmd_run make_uuid_args(uuid) # use the run_uuid for subsequent calls
|
|
388
|
-
sleep 2
|
|
389
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
390
|
-
assert(status == "RUNNING", "after RUN, expected status=RUNNING, got #{status}")
|
|
391
|
-
while status == "RUNNING"
|
|
392
|
-
sleep 5
|
|
393
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
# archive it
|
|
397
|
-
response = api.cmd_archive ["-c", "run", "-u", run_uuid ]
|
|
398
|
-
sleep 5
|
|
399
|
-
status = api.cmd_archive ["-s", "status", "-u", run_uuid ]
|
|
400
|
-
|
|
401
|
-
while true
|
|
402
|
-
status = api.cmd_archive ["-s", "status", "-u", run_uuid ]
|
|
403
|
-
break if status == false
|
|
404
|
-
sleep 5
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
# now get it
|
|
408
|
-
api.cmd_archive ["-c", "get", "-u", run_uuid ]
|
|
409
|
-
file_name = run_uuid.to_s + ".zip"
|
|
410
|
-
assert(File.exists?(file_name), "did not find the expected file #{file_name}")
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
def test_cmd_muapi_delete
|
|
414
|
-
# $log.level = Logger::DEBUG"
|
|
415
|
-
# load it
|
|
416
|
-
http_helper = Mu::HttpHelper.new(@mu_ip, @mu_admin_user, @mu_admin_pass, "/api/v3/")
|
|
417
|
-
response = http_helper.post_xml("templates/import", File.read("#{Dir.pwd}/test/data/irc.xml"))
|
|
418
|
-
uuid = response.xpath("//uuid")[0].content
|
|
419
|
-
api = Mu::Command::Cmd_muapi.new
|
|
420
|
-
|
|
421
|
-
# run it
|
|
422
|
-
run_uuid = api.cmd_run make_uuid_args(uuid) # use the run_uuid for subsequent calls
|
|
423
|
-
sleep 2
|
|
424
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
425
|
-
assert(status == "RUNNING", "after RUN, expected status=RUNNING, got #{status}")
|
|
426
|
-
while status == "RUNNING"
|
|
427
|
-
sleep 5
|
|
428
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
429
|
-
end
|
|
430
|
-
|
|
431
|
-
# now delete it
|
|
432
|
-
status = api.cmd_delete [ "-u", run_uuid ]
|
|
433
|
-
puts status
|
|
434
|
-
|
|
435
|
-
status = api.cmd_status make_uuid_args(run_uuid)
|
|
436
|
-
assert(status.nil?, "expected status=nil, got #{status}")
|
|
437
|
-
end
|
|
438
|
-
|
|
439
|
-
# -------------- muapi ----------------
|
|
440
|
-
|
|
441
|
-
def test_muapi_new
|
|
442
|
-
api = Mu::Muapi.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
443
|
-
assert(api.host == @mu_ip, "failed to set mu_ip")
|
|
444
|
-
assert(api.docroot == "/api/v3/", "failed to set docroot")
|
|
445
|
-
end
|
|
446
|
-
|
|
447
|
-
def test_muapi_list_by_status
|
|
448
|
-
api = Mu::Muapi.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
449
|
-
response = api.list_by_status("finished")
|
|
450
|
-
assert(!response.empty?, "got empty response")
|
|
451
|
-
end
|
|
452
|
-
|
|
453
|
-
def test_muapi_types
|
|
454
|
-
api = Mu::Muapi.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
455
|
-
response = api.types
|
|
456
|
-
assert(response.include?("scenario"), "expected scenario, got\n#{response}")
|
|
457
|
-
end
|
|
458
|
-
|
|
459
|
-
# -------------- cmd_netfconfig -------
|
|
460
|
-
|
|
461
|
-
def test_cmd_netconfig_get_interfaces_a1
|
|
462
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
463
|
-
response = api.cmd_get ["-e", "interfaces/a1"]
|
|
464
|
-
assert(response["display_name"] == "A1", "expected A1 got #{response["display_name"]}")
|
|
465
|
-
end
|
|
466
|
-
|
|
467
|
-
def test_cmd_netconfig_modify_interfaces_a1
|
|
468
|
-
# $log.level = Logger::DEBUG
|
|
469
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
470
|
-
saved = api.cmd_get ["-e", "interfaces/a1"]
|
|
471
|
-
assert(saved["display_name"] == "A1", "expected A1 got #{saved["display_name"]}")
|
|
472
|
-
api.cmd_modify ["-e", "interfaces/a1", "-j", '{"v4_dhcp"=>false}']
|
|
473
|
-
sleep 2
|
|
474
|
-
modified = api.cmd_get ["-e", "interfaces/a1"]
|
|
475
|
-
assert(modified["v4_dhcp"] == false, "expected dhcp false but it wasn't")
|
|
476
|
-
ensure
|
|
477
|
-
api.cmd_modify ["-e", "interfaces/a1", "-j", '{"v4_dhcp"=>true}']
|
|
478
|
-
end
|
|
479
|
-
|
|
480
|
-
def test_cmd_netconfig_vlans
|
|
481
|
-
# $log.level = Logger::DEBUG
|
|
482
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
483
|
-
begin
|
|
484
|
-
api.cmd_delete ["-e", "interfaces/b1.222"]
|
|
485
|
-
rescue
|
|
486
|
-
# ignore. the vlan probably did not exist
|
|
487
|
-
end
|
|
488
|
-
vlan_222 = {"v4_addrs"=>["2.2.2.2"],"v4_mask"=>"26","v6_addrs"=>["2222:0:0:0:0:0:0:2"],"v6_mask"=>"64"}
|
|
489
|
-
api.cmd_create ["-j", '{"name"=>"b1","vlan"=>"222"}', "-e", "interfaces" ]
|
|
490
|
-
sleep 3
|
|
491
|
-
api.cmd_modify [ "-j", vlan_222, "-e", "interfaces/b1.222"]
|
|
492
|
-
b1 = api.cmd_get ["-e", "interfaces/b1.222"]
|
|
493
|
-
assert(b1["v4_addrs"]["begin"] == "2.2.2.2","vlan v4_addrs incorrect: #{b1["v4_addrs"]["begin"]}")
|
|
494
|
-
response = api.cmd_delete ["-e", "interfaces/b1.222"]
|
|
495
|
-
assert(response.include?("deleted"), "Failed to delete host:" + response)
|
|
496
|
-
end
|
|
497
|
-
|
|
498
|
-
def test_cmd_netconfig_create_delete_host
|
|
499
|
-
# $log.level = Logger::DEBUG
|
|
500
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
501
|
-
response = api.cmd_create ["-j", '{"name"=>"deleteme","v4_addr"=>"192.168.30.9"}', "-e", "hosts"]
|
|
502
|
-
assert(response.include?("created"), "Failed to create host:" + response.to_s)
|
|
503
|
-
response = api.cmd_delete ["-e", "hosts/deleteme"]
|
|
504
|
-
assert(response.include?("deleted"), "Failed to delete host:" + response.to_s)
|
|
505
|
-
end
|
|
506
|
-
|
|
507
|
-
def test_cmd_netconfig_add_modify_delete_route
|
|
508
|
-
puts "assumes a1 on 192.168.30.x subnet and a router at 192.168.30.247"
|
|
509
|
-
# $log.level = Logger::DEBUG
|
|
510
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
511
|
-
system = api.cmd_get ["-e", "system"]
|
|
512
|
-
# delete route if if already existsname"] ==
|
|
513
|
-
begin
|
|
514
|
-
response = api.cmd_delete ["-e", "routes/192.168.100.0-192.168.30.247-a1"]
|
|
515
|
-
rescue
|
|
516
|
-
# do nothing. route may not exists
|
|
517
|
-
end
|
|
518
|
-
# turn dhcp on
|
|
519
|
-
dhcp = {"name"=>"a1","v4_dhcp"=>"Enabled"}
|
|
520
|
-
response = api.cmd_modify ["-j", dhcp, "-e", "interfaces/a1"]
|
|
521
|
-
sleep 3
|
|
522
|
-
g = api.cmd_get ["-e", "interfaces/a1"]
|
|
523
|
-
assert(g["v4_addrs"]["begin"].include?("192.168.30"),"A1 DHCP failed")
|
|
524
|
-
new_route = {"interface"=>"a1", "dst"=>"192.168.100.0", "gateway"=>"192.168.30.247", "dst_pfx_len"=>24}
|
|
525
|
-
response = api.cmd_create ["-j", new_route, "-e", "routes"]
|
|
526
|
-
assert(response.include?("192.168.100.0-192.168.30.247-a1 created."), response) # not sure what this will be
|
|
527
|
-
update_mask = {"dst_pfx_len"=>24}
|
|
528
|
-
response = api.cmd_modify ["-j", update_mask, "-e", "routes/192.168.100.0-192.168.30.247-a1"]
|
|
529
|
-
ensure
|
|
530
|
-
response = api.cmd_delete ["-e", "routes/192.168.100.0-192.168.30.247-a1"]
|
|
531
|
-
assert(response.include?("deleted"),response)
|
|
532
|
-
end
|
|
533
|
-
|
|
534
|
-
def test_cmd_netconfig_resolve_hosts
|
|
535
|
-
# $log.level = Logger::DEBUG
|
|
536
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
537
|
-
add_localhost_with_channel
|
|
538
|
-
response = api.cmd_resolve_hosts ["-n", "localhost"]
|
|
539
|
-
response = api.cmd_get ["-e", "hosts/localhost"]
|
|
540
|
-
assert response["name"] == "localhost", "expected to find localhost but found #{response["name"]}"
|
|
541
|
-
end
|
|
542
|
-
|
|
543
|
-
def test_cmd_netconfig_save
|
|
544
|
-
# $log.level = Logger::DEBUG
|
|
545
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
546
|
-
File.delete("save.json") if File.exists?("save.json")
|
|
547
|
-
response = api.cmd_save ["-f", "save.json"]
|
|
548
|
-
assert(File.exists?("save.json"), "wxpected for find file 'save.json but did not")
|
|
549
|
-
ensure
|
|
550
|
-
File.delete("save.json") if File.exists?("save.json")
|
|
551
|
-
end
|
|
552
|
-
|
|
553
|
-
# -------------- netconfig -----------
|
|
554
|
-
|
|
555
|
-
def test_netconfig_new
|
|
556
|
-
api = Mu::Netconfig.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
557
|
-
assert(api.host == @mu_ip, "failed to set mu_ip")
|
|
558
|
-
assert(api.docroot == "/restlet/netconfig/", "failed to set docroot")
|
|
559
|
-
end
|
|
560
|
-
|
|
561
|
-
# -------------- cmd_runscale -------------
|
|
562
|
-
|
|
563
|
-
# use ip range setting and a brief pattern
|
|
564
|
-
def test_cmd_runscale_run_file
|
|
565
|
-
File.delete("app_id_status.json") if File.exists?("app_id_status.json")
|
|
566
|
-
app = Mu::Command::Cmd_runscale.new
|
|
567
|
-
args = Array.new
|
|
568
|
-
args << "-s"
|
|
569
|
-
args << "#{Dir.pwd}/test/data/data_cgi.msl"
|
|
570
|
-
args << "-i"
|
|
571
|
-
args << "b1-10000,b2"
|
|
572
|
-
args << "-p"
|
|
573
|
-
args << "1-100:20"
|
|
574
|
-
args << "-a" # vector address pairing
|
|
575
|
-
args << "-c"
|
|
576
|
-
args << "#{Dir.pwd}/test/data/default_test.csv"
|
|
577
|
-
app.cmd_run_file args
|
|
578
|
-
assert(File.exists?("app_id_status.json"), "app_id_status.json file was not created")
|
|
579
|
-
j = JSON File.read("app_id_status.json")
|
|
580
|
-
status = j["status"]
|
|
581
|
-
assert(status["statistics"]["summary"]["duration"].to_f >= 10.0, "expected summary duration > 10, but got #{status["statistics"]["summary"]["duration"]}")
|
|
582
|
-
assert(status["statistics"]["summary"]["instances"]["executed"].to_i > 10, "expected instances executed > 0, but got #{status["statistics"]["summary"]["instances"]["executed"]}")
|
|
583
|
-
assert(app.peak_concurrency == 1, "expected peak_concurrency = 1 due to vectorAddressPairing, but got #{app.peak_concurrency}")
|
|
584
|
-
end
|
|
585
|
-
|
|
586
|
-
# use ip range setting and a brief pattern
|
|
587
|
-
def test_cmd_runscale_run_dir
|
|
588
|
-
File.delete("app_id_status.json") if File.exists?("app_id_status.json")
|
|
589
|
-
app = Mu::Command::Cmd_runscale.new
|
|
590
|
-
args = Array.new
|
|
591
|
-
args << "-d"
|
|
592
|
-
args << "#{Dir.pwd}/test/data"
|
|
593
|
-
args << "-i"
|
|
594
|
-
args << "b1-10000,b2"
|
|
595
|
-
args << "-p"
|
|
596
|
-
args << "1-100:10"
|
|
597
|
-
app.cmd_run_dir args
|
|
598
|
-
assert(File.exists?("app_id_status.json"), "app_id_status.json file was not created")
|
|
599
|
-
j = JSON File.read("app_id_status.json")
|
|
600
|
-
status = j["status"]
|
|
601
|
-
assert(status["statistics"]["summary"]["duration"].to_f >= 10.0, "expected summary duration > 10, but got #{status["statistics"]["summary"]["duration"]}")
|
|
602
|
-
assert(status["statistics"]["summary"]["instances"]["executed"].to_i > 10, "expected instances executed > 0, but got #{status["statistics"]["summary"]["instances"]["executed"]}")
|
|
603
|
-
end
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
# -------------- cmd_runscenario ----------
|
|
607
|
-
|
|
608
|
-
def test_cmd_runscenario
|
|
609
|
-
app = Mu::Command::Cmd_runscenario.new
|
|
610
|
-
args = Array.new
|
|
611
|
-
args << "-s"
|
|
612
|
-
args << "#{Dir.pwd}/test/data/data_cgi.xml"
|
|
613
|
-
args << "-i"
|
|
614
|
-
args << "b1,b2"
|
|
615
|
-
args << "-v"
|
|
616
|
-
app.cmd_run args
|
|
617
|
-
assert(app.errors.size == 0, "expected 0 errors but got #{app.errors}")
|
|
618
|
-
end
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
# -------------- cmd_runverify ------------
|
|
622
|
-
|
|
623
|
-
def test_cmd_runverify
|
|
624
|
-
app = Mu::Command::Cmd_runverify.new
|
|
625
|
-
args = Array.new
|
|
626
|
-
args << "-s"
|
|
627
|
-
args << "#{Dir.pwd}/test/data/data_cgi.xml"
|
|
628
|
-
args << "-t"
|
|
629
|
-
args << "#{Dir.pwd}/test/data/default_test.csv"
|
|
630
|
-
args << "-i"
|
|
631
|
-
args << "b1,b2"
|
|
632
|
-
args << "-v"
|
|
633
|
-
app.cmd_run args
|
|
634
|
-
assert(app.errors.size == 0, "expected 0 errors but got #{app.errors.size}")
|
|
635
|
-
end
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
# -------------- scale ----------------
|
|
639
|
-
|
|
640
|
-
def test_scale_new
|
|
641
|
-
api = Mu::Scale.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
642
|
-
assert(api.host == @mu_ip, "failed to set mu_ip")
|
|
643
|
-
assert(api.docroot == "/api/v5/scale/", "failed to set docroot")
|
|
644
|
-
assert(!api.uuid.nil?, "uuid is nil")
|
|
645
|
-
end
|
|
646
|
-
|
|
647
|
-
def test_scale_about
|
|
648
|
-
api = Mu::Scale.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
649
|
-
about = api.about
|
|
650
|
-
# puts JSON.pretty_generate about
|
|
651
|
-
assert(about[0]["group"] == "active", "expected 'active' group, got #{about[0]["group"]}")
|
|
652
|
-
assert(about[0]["type"] == "bot", "expected 'bot' type, got #{about[0]["type"]}")
|
|
653
|
-
assert(!api.uuid.nil?, "uuid is nil")
|
|
654
|
-
end
|
|
655
|
-
|
|
656
|
-
def test_scale_list
|
|
657
|
-
api = Mu::Scale.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
658
|
-
list = api.list
|
|
659
|
-
assert(list.length == 1 , "expected list of length 1, got #{list.length}")
|
|
660
|
-
assert(!api.uuid.nil?, "uuid is nil")
|
|
661
|
-
end
|
|
662
|
-
|
|
663
|
-
def test_scale_session
|
|
664
|
-
api = Mu::Scale.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
665
|
-
api.session
|
|
666
|
-
assert(!api.uuid.nil?, "uuid is nil")
|
|
667
|
-
end
|
|
668
|
-
|
|
669
|
-
# -------------- system ---------------
|
|
670
|
-
|
|
671
|
-
# do NOT write a test for system:restart please!
|
|
672
|
-
|
|
673
|
-
def test_system_new
|
|
674
|
-
api = Mu::System.new(@mu_ip, @mu_admin_user, @mu_admin_pass)
|
|
675
|
-
assert(api.host == @mu_ip, "failed to set mu_ip")
|
|
676
|
-
assert(api.docroot == "/api/v5/system/", "failed to set docroot")
|
|
677
|
-
end
|
|
678
|
-
|
|
679
|
-
# -------------- cmd_system ----------------
|
|
680
|
-
|
|
681
|
-
# do NOT write a test for cmd_system:restart please!
|
|
682
|
-
|
|
683
|
-
def test_cmd_system_status
|
|
684
|
-
api = Mu::Command::Cmd_system.new
|
|
685
|
-
result = api.cmd_status []
|
|
686
|
-
doc = Nokogiri::XML(result)
|
|
687
|
-
ports = doc.xpath("//ports")
|
|
688
|
-
assert(ports.length >= 5, "expected to find at least 5 ports, but got #{ports.length}")
|
|
689
|
-
end
|
|
690
|
-
|
|
691
|
-
def test_cmd_system_status2
|
|
692
|
-
api = Mu::Command::Cmd_system.new
|
|
693
|
-
result = api.cmd_status2 []
|
|
694
|
-
assert(result.to_s.include?("raid"), "expected to find 'raid' in results, but got #{result}")
|
|
695
|
-
end
|
|
696
|
-
|
|
697
|
-
#---------------------- utility methods -----------------------
|
|
698
|
-
|
|
699
|
-
def add_localhost_with_channel
|
|
700
|
-
local_host = {
|
|
701
|
-
"name"=> "localhost",
|
|
702
|
-
"ssh_channel"=> {
|
|
703
|
-
"username"=> "root",
|
|
704
|
-
"prompt"=> "]#",
|
|
705
|
-
"commands"=> [
|
|
706
|
-
|
|
707
|
-
],
|
|
708
|
-
"tcp_port"=> 22,
|
|
709
|
-
"password"=> "bogus"
|
|
710
|
-
},
|
|
711
|
-
"v4_addr"=> @mu_ip
|
|
712
|
-
}
|
|
713
|
-
# $log.level = Logger::DEBUG
|
|
714
|
-
api = Mu::Command::Cmd_netconfig.new
|
|
715
|
-
api.cmd_delete ["-e", "hosts/localhost"] # may not exist
|
|
716
|
-
response = api.cmd_create ["-j", JSON(local_host), "-e", "hosts"]
|
|
717
|
-
assert(response.include?("created"), "Failed to create host:" + response.to_s)
|
|
718
|
-
end
|
|
719
|
-
|
|
720
|
-
end
|