mu 5.7.2.3 → 5.7.2.4
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 +1 -1
- data/lib/mu/api/netconfig.rb +5 -3
- data/lib/mu/api/scale.rb +16 -1
- data/lib/mu/command/cmd_netconfig.rb +1 -1
- data/lib/mu/command/cmd_runscale.rb +2 -2
- data/rdoc/classes/Mu.html +24 -142
- data/rdoc/classes/Mu.src/M000001.html +39 -0
- data/rdoc/classes/Mu.src/M000002.html +29 -0
- data/rdoc/classes/Mu.src/M000053.html +39 -0
- data/rdoc/classes/Mu.src/M000054.html +29 -0
- data/rdoc/classes/Mu/Client.html +26 -77
- data/rdoc/classes/Mu/Client.src/M000212.html +24 -0
- data/rdoc/classes/Mu/Client.src/M000213.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000214.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000215.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000216.html +18 -0
- data/rdoc/classes/Mu/Command.html +1 -92
- data/rdoc/classes/Mu/Command/API.html +75 -237
- data/rdoc/classes/Mu/Command/API.src/M000130.html +22 -0
- data/rdoc/classes/Mu/Command/API.src/M000131.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000132.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000133.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000134.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000135.html +17 -0
- data/rdoc/classes/Mu/Command/API.src/M000136.html +23 -0
- data/rdoc/classes/Mu/Command/API.src/M000137.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000138.html +29 -0
- data/rdoc/classes/Mu/Command/API.src/M000139.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000140.html +22 -0
- data/rdoc/classes/Mu/Command/API.src/M000141.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000142.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000143.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000144.html +17 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.html +22 -718
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000145.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000146.html +30 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000147.html +39 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000148.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.html +32 -274
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000200.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000201.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000202.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000203.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000204.html +20 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000205.html +20 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.html +126 -656
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000101.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000102.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000103.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000104.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000105.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000106.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000107.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000108.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000109.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000110.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000111.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000112.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000113.html +43 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000114.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000115.html +38 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000116.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000117.html +38 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000118.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000119.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000120.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000121.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000122.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.html +31 -244
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000206.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000207.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000208.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000209.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000210.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000211.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.html +86 -527
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000164.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000165.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000166.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000167.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000168.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000169.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000170.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000171.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000172.html +28 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000173.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000174.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000175.html +28 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000176.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000177.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000178.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000179.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000180.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +61 -405
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000152.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000153.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000154.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000155.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000156.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000157.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000158.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000159.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000160.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000161.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000162.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000163.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +17 -766
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000003.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000004.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000005.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000149.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000150.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000151.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.html +11 -344
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000128.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000129.html +144 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.html +11 -436
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000198.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000199.html +200 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.html +86 -514
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000181.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000182.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000183.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000184.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000185.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000186.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000187.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000188.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000189.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000190.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000191.html +29 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000192.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000193.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000194.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000195.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000196.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000197.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_system.html +21 -211
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000097.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000098.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000099.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000100.html +21 -0
- data/rdoc/classes/Mu/Command/Curl.html +19 -361
- data/rdoc/classes/Mu/Command/Curl.src/M000124.html +18 -0
- data/rdoc/classes/Mu/Command/Curl.src/M000125.html +21 -0
- data/rdoc/classes/Mu/Command/Curl.src/M000126.html +26 -0
- data/rdoc/classes/Mu/Command/Help.html +5 -34
- data/rdoc/classes/Mu/Command/Help.src/M000123.html +38 -0
- data/rdoc/classes/Mu/Curl/Error.html +5 -14
- data/rdoc/classes/Mu/Curl/Error.src/M000063.html +18 -0
- data/rdoc/classes/Mu/Curl/Error/Authorize.html +5 -18
- data/rdoc/classes/Mu/Curl/Error/Authorize.src/M000065.html +22 -0
- data/rdoc/classes/Mu/Curl/Error/Connect.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Connect.src/M000068.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Region.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Region.src/M000066.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Status.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Status.src/M000064.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Timeout.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Timeout.src/M000067.html +19 -0
- data/rdoc/classes/Mu/Curl/Verify.html +20 -95
- data/rdoc/classes/Mu/Curl/Verify.src/M000055.html +29 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000056.html +18 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000057.html +46 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000058.html +18 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.html +10 -50
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000061.html +35 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000062.html +23 -0
- data/rdoc/classes/Mu/Curl/Verify/Response.html +5 -20
- data/rdoc/classes/Mu/Curl/Verify/Response.src/M000059.html +24 -0
- data/rdoc/classes/Mu/Curl/Verify/Result.html +5 -21
- data/rdoc/classes/Mu/Curl/Verify/Result.src/M000060.html +25 -0
- data/rdoc/classes/Mu/Ddt.html +132 -436
- data/rdoc/classes/Mu/Ddt.src/M000242.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000243.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000244.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000245.html +23 -0
- data/rdoc/classes/Mu/Ddt.src/M000246.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000247.html +32 -0
- data/rdoc/classes/Mu/Ddt.src/M000248.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000249.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000250.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000251.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000252.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000253.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000254.html +25 -0
- data/rdoc/classes/Mu/Ddt.src/M000255.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000256.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000257.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000258.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000259.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000260.html +35 -0
- data/rdoc/classes/Mu/Ddt.src/M000261.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000262.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000263.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000264.html +22 -0
- data/rdoc/classes/Mu/Homepage.html +34 -105
- data/rdoc/classes/Mu/Homepage.src/M000236.html +25 -0
- data/rdoc/classes/Mu/Homepage.src/M000237.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000238.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000239.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000240.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000241.html +20 -0
- data/rdoc/classes/Mu/HttpHelper.html +68 -314
- data/rdoc/classes/Mu/HttpHelper.src/M000069.html +22 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000070.html +25 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000071.html +34 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000072.html +39 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000073.html +36 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000074.html +34 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000075.html +46 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000076.html +24 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000077.html +19 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000078.html +33 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000079.html +29 -0
- data/rdoc/classes/Mu/Muapi.html +92 -359
- data/rdoc/classes/Mu/Muapi.src/M000080.html +25 -0
- data/rdoc/classes/Mu/Muapi.src/M000081.html +27 -0
- data/rdoc/classes/Mu/Muapi.src/M000082.html +24 -0
- data/rdoc/classes/Mu/Muapi.src/M000083.html +27 -0
- data/rdoc/classes/Mu/Muapi.src/M000084.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000085.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000086.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000087.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000088.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000089.html +22 -0
- data/rdoc/classes/Mu/Muapi.src/M000090.html +21 -0
- data/rdoc/classes/Mu/Muapi.src/M000091.html +19 -0
- data/rdoc/classes/Mu/Muapi.src/M000092.html +18 -0
- data/rdoc/classes/Mu/Muapi.src/M000093.html +18 -0
- data/rdoc/classes/Mu/Muapi.src/M000094.html +36 -0
- data/rdoc/classes/Mu/Muapi.src/M000095.html +34 -0
- data/rdoc/classes/Mu/Muapi.src/M000096.html +34 -0
- data/rdoc/classes/Mu/Netconfig.html +79 -382
- data/rdoc/classes/Mu/Netconfig.src/M000217.html +25 -0
- data/rdoc/classes/Mu/Netconfig.src/M000218.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000219.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000220.html +24 -0
- data/rdoc/classes/Mu/Netconfig.src/M000221.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000222.html +36 -0
- data/rdoc/classes/Mu/Netconfig.src/M000223.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000224.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000225.html +37 -0
- data/rdoc/classes/Mu/Netconfig.src/M000226.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000227.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000228.html +26 -0
- data/rdoc/classes/Mu/Netconfig.src/M000229.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000230.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000231.html +19 -0
- data/rdoc/classes/Mu/Scale.html +133 -385
- data/rdoc/classes/Mu/Scale.src/M000006.html +47 -0
- data/rdoc/classes/Mu/Scale.src/M000007.html +27 -0
- data/rdoc/classes/Mu/Scale.src/M000008.html +22 -0
- data/rdoc/classes/Mu/Scale.src/M000009.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000010.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000011.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000012.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000013.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000014.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000015.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000016.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000017.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000018.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000019.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000020.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000021.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000022.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000023.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000024.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000025.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000265.html +46 -0
- data/rdoc/classes/Mu/Scale.src/M000266.html +27 -0
- data/rdoc/classes/Mu/Scale.src/M000267.html +22 -0
- data/rdoc/classes/Mu/Scale.src/M000268.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000269.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000270.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000271.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000272.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000273.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000274.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000275.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000276.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000277.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000278.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000279.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000280.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000281.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000282.html +20 -0
- data/rdoc/classes/Mu/System.html +23 -72
- data/rdoc/classes/Mu/System.src/M000232.html +25 -0
- data/rdoc/classes/Mu/System.src/M000233.html +20 -0
- data/rdoc/classes/Mu/System.src/M000234.html +20 -0
- data/rdoc/classes/Mu/System.src/M000235.html +20 -0
- data/rdoc/classes/Object.html +5 -14
- data/rdoc/classes/Object.src/M000052.html +18 -0
- data/rdoc/classes/TCTestMu.html +254 -1099
- data/rdoc/classes/TCTestMu.src/M000001.html +24 -0
- data/rdoc/classes/TCTestMu.src/M000002.html +18 -0
- data/rdoc/classes/TCTestMu.src/M000003.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000004.html +33 -0
- data/rdoc/classes/TCTestMu.src/M000005.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000006.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000007.html +26 -0
- data/rdoc/classes/TCTestMu.src/M000008.html +29 -0
- data/rdoc/classes/TCTestMu.src/M000009.html +39 -0
- data/rdoc/classes/TCTestMu.src/M000010.html +38 -0
- data/rdoc/classes/TCTestMu.src/M000011.html +38 -0
- data/rdoc/classes/TCTestMu.src/M000012.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000013.html +25 -0
- data/rdoc/classes/TCTestMu.src/M000014.html +25 -0
- data/rdoc/classes/TCTestMu.src/M000015.html +33 -0
- data/rdoc/classes/TCTestMu.src/M000016.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000017.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000018.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000019.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000020.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000021.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000022.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000023.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000024.html +44 -0
- data/rdoc/classes/TCTestMu.src/M000025.html +53 -0
- data/rdoc/classes/TCTestMu.src/M000026.html +22 -0
- data/rdoc/classes/TCTestMu.src/M000027.html +49 -0
- data/rdoc/classes/TCTestMu.src/M000028.html +40 -0
- data/rdoc/classes/TCTestMu.src/M000029.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000030.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000031.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000032.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000033.html +27 -0
- data/rdoc/classes/TCTestMu.src/M000034.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000035.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000036.html +41 -0
- data/rdoc/classes/TCTestMu.src/M000037.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000038.html +24 -0
- data/rdoc/classes/TCTestMu.src/M000039.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000040.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000041.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000042.html +26 -0
- data/rdoc/classes/TCTestMu.src/M000043.html +28 -0
- data/rdoc/classes/TCTestMu.src/M000044.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000045.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000046.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000047.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000048.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000049.html +22 -0
- data/rdoc/classes/TCTestMu.src/M000050.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000051.html +35 -0
- data/rdoc/created.rid +1 -1
- data/rdoc/files/lib/mu/api/ddt_rb.html +1 -1
- data/rdoc/files/lib/mu/api/homepage_rb.html +1 -1
- data/rdoc/files/lib/mu/api/muapi_rb.html +1 -1
- data/rdoc/files/lib/mu/api/netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/api/scale_rb.html +1 -1
- data/rdoc/files/lib/mu/api/system_rb.html +1 -1
- data/rdoc/files/lib/mu/client_rb.html +1 -1
- data/rdoc/files/lib/mu/command/api_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_cli_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +4 -5
- data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +3 -4
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +5 -4
- data/rdoc/files/lib/mu/command/cmd_scale_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_system_rb.html +1 -1
- data/rdoc/files/lib/mu/command/curl_rb.html +1 -1
- data/rdoc/files/lib/mu/command/help_rb.html +1 -1
- data/rdoc/files/lib/mu/command_rb.html +1 -1
- data/rdoc/files/lib/mu/curl/error_rb.html +1 -1
- data/rdoc/files/lib/mu/curl/verify_rb.html +1 -1
- data/rdoc/files/lib/mu/http_helper_rb.html +1 -1
- data/rdoc/files/lib/mu_rb.html +1 -1
- data/rdoc/files/test/tc_test_mu_rb.html +1 -1
- data/rdoc/fr_class_index.html +0 -38
- data/rdoc/fr_file_index.html +0 -26
- data/rdoc/fr_method_index.html +25 -348
- data/rdoc/index.html +3 -3
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +156 -0
- data/test/tc_test_mu.rb +1 -1
- metadata +314 -8
- data/Mu_Gem.html +0 -1591
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>new (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 5</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">docroot</span>)
|
|
15
|
+
<span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
16
|
+
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
17
|
+
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
18
|
+
<span class="ruby-ivar">@docroot</span> = <span class="ruby-identifier">docroot</span>
|
|
19
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-value str">""</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">nil?</span>
|
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
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>get (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 18</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
17
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
18
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
19
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
20
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
21
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
22
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
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>get_json (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 32</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
17
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
18
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
19
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
20
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
21
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
22
|
+
<span class="ruby-keyword kw">begin</span>
|
|
23
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
24
|
+
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
25
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
26
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
|
28
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
29
|
+
<span class="ruby-comment cmt"># nothing to do</span>
|
|
30
|
+
<span class="ruby-keyword kw">end</span>
|
|
31
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
32
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
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>get_xml (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 55</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_xml</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
17
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
18
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
19
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
20
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
21
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
22
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
23
|
+
<span class="ruby-keyword kw">begin</span>
|
|
24
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/<.+>/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">resp</span>)
|
|
25
|
+
<span class="ruby-identifier">xmldoc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">resp</span>)
|
|
26
|
+
<span class="ruby-keyword kw">else</span>
|
|
27
|
+
<span class="ruby-identifier">err_node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'err_node'</span>, <span class="ruby-identifier">xmldoc</span>)
|
|
28
|
+
<span class="ruby-identifier">err_node</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">resp</span>
|
|
29
|
+
<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">err_node</span>
|
|
30
|
+
<span class="ruby-keyword kw">end</span>
|
|
31
|
+
<span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
32
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"Error parsing XML "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
33
|
+
<span class="ruby-keyword kw">ensure</span>
|
|
34
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">xmldoc</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
35
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">xmldoc</span>
|
|
36
|
+
<span class="ruby-keyword kw">end</span>
|
|
37
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
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>post (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 84</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">body</span>=<span class="ruby-value str">""</span>, <span class="ruby-identifier">p</span> = {})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"#{url} #{body}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
17
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
18
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
19
|
+
<span class="ruby-identifier">msg</span>(<span class="ruby-node">"using cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
20
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">body</span>, <span class="ruby-identifier">params</span>)
|
|
21
|
+
<span class="ruby-comment cmt"># msg resp.headers</span>
|
|
22
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
23
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
24
|
+
<span class="ruby-keyword kw">begin</span>
|
|
25
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
26
|
+
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
28
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
|
30
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
31
|
+
<span class="ruby-comment cmt"># do nothing</span>
|
|
32
|
+
<span class="ruby-keyword kw">end</span>
|
|
33
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
34
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
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>post_json (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 110</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">p</span> = {})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"#{url} #{json}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
17
|
+
<span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/json"</span> }.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
18
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
19
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">params</span> )
|
|
20
|
+
<span class="ruby-keyword kw">begin</span>
|
|
21
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
22
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
23
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
24
|
+
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
25
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
26
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
|
28
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
29
|
+
<span class="ruby-comment cmt"># msg e, Logger::DEBUG</span>
|
|
30
|
+
<span class="ruby-keyword kw">end</span>
|
|
31
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
32
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
@@ -0,0 +1,46 @@
|
|
|
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>post_xml (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 134</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_xml</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">doc</span>, <span class="ruby-identifier">p</span> = {})
|
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
17
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"post to #{url}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
18
|
+
<span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/xml"</span> }.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
19
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
20
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">params</span> )
|
|
21
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
22
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
23
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
24
|
+
<span class="ruby-comment cmt"># XML Document</span>
|
|
25
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/<.+>/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">resp</span>)
|
|
26
|
+
<span class="ruby-identifier">xmldoc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">resp</span>)
|
|
27
|
+
<span class="ruby-keyword kw">else</span>
|
|
28
|
+
<span class="ruby-identifier">err_node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'err_node'</span>, <span class="ruby-identifier">xmldoc</span>)
|
|
29
|
+
<span class="ruby-identifier">err_node</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">resp</span>
|
|
30
|
+
<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">err_node</span>
|
|
31
|
+
<span class="ruby-keyword kw">end</span>
|
|
32
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SocketError</span>
|
|
33
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Host "</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@host</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" nicht erreichbar"</span>
|
|
34
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
35
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"error parsing XML "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
36
|
+
<span class="ruby-keyword kw">end</span>
|
|
37
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//err_node"</span>).<span class="ruby-identifier">empty?</span>)
|
|
38
|
+
<span class="ruby-ivar">@posted_uuid</span> = <span class="ruby-keyword kw">nil</span>
|
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
|
40
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">nil?</span>
|
|
41
|
+
<span class="ruby-ivar">@posted_uuid</span> = <span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//uuid"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">text</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//uuid"</span>).<span class="ruby-identifier">empty?</span>
|
|
42
|
+
<span class="ruby-keyword kw">end</span>
|
|
43
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">xmldoc</span>
|
|
44
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
@@ -0,0 +1,24 @@
|
|
|
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>post_form (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 170</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_form</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">p</span> = {})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
17
|
+
<span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/x-www-form-urlencoded"</span>, <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filepath</span>, <span class="ruby-value str">'rb'</span>) }
|
|
18
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
19
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
20
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
21
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
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>delete (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 184</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">url</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,33 @@
|
|
|
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>put_json (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 193</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">p</span>={})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
17
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
18
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">put</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">json</span>, { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/json"</span> } )
|
|
19
|
+
<span class="ruby-keyword kw">begin</span>
|
|
20
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
21
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
22
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
23
|
+
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
24
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
25
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
|
27
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
28
|
+
<span class="ruby-comment cmt"># msg e, Logger::DEBUG</span>
|
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
|
30
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
31
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
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>download_file (Mu::HttpHelper)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 216</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">download_file</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">p</span>={})
|
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
16
|
+
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
17
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
18
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>)
|
|
19
|
+
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
20
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
21
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"Could not download"</span>)
|
|
22
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"==> Could not download the file"</span>
|
|
23
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-value">-1</span>
|
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
|
25
|
+
<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"wb"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">body</span>) }
|
|
26
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">filename</span>)
|
|
27
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
data/rdoc/classes/Mu/Muapi.html
CHANGED
|
@@ -88,23 +88,23 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
101
|
-
<a href="#
|
|
102
|
-
<a href="#
|
|
103
|
-
<a href="#
|
|
104
|
-
<a href="#
|
|
105
|
-
<a href="#
|
|
106
|
-
<a href="#
|
|
107
|
-
<a href="#
|
|
91
|
+
<a href="#M000094">archive</a>
|
|
92
|
+
<a href="#M000095">backup</a>
|
|
93
|
+
<a href="#M000096">capture</a>
|
|
94
|
+
<a href="#M000087">delete</a>
|
|
95
|
+
<a href="#M000092">export_by_type_and_name</a>
|
|
96
|
+
<a href="#M000093">export_by_uuid</a>
|
|
97
|
+
<a href="#M000088">get_faults</a>
|
|
98
|
+
<a href="#M000089">get_name</a>
|
|
99
|
+
<a href="#M000090">list</a>
|
|
100
|
+
<a href="#M000081">list_by_status</a>
|
|
101
|
+
<a href="#M000080">new</a>
|
|
102
|
+
<a href="#M000085">pause</a>
|
|
103
|
+
<a href="#M000086">resume</a>
|
|
104
|
+
<a href="#M000083">run</a>
|
|
105
|
+
<a href="#M000082">status</a>
|
|
106
|
+
<a href="#M000084">stop</a>
|
|
107
|
+
<a href="#M000091">types</a>
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
110
110
|
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<h3 class="section-bar">Included Modules</h3>
|
|
117
117
|
|
|
118
118
|
<div id="includes-list">
|
|
119
|
-
<span class="include-name"
|
|
119
|
+
<span class="include-name">Helper</span>
|
|
120
120
|
</div>
|
|
121
121
|
</div>
|
|
122
122
|
|
|
@@ -186,50 +186,35 @@
|
|
|
186
186
|
<div id="methods">
|
|
187
187
|
<h3 class="section-bar">Public Class methods</h3>
|
|
188
188
|
|
|
189
|
-
<div id="method-
|
|
190
|
-
<a name="
|
|
189
|
+
<div id="method-M000080" class="method-detail">
|
|
190
|
+
<a name="M000080"></a>
|
|
191
191
|
|
|
192
192
|
<div class="method-heading">
|
|
193
|
-
<a href="
|
|
193
|
+
<a href="Muapi.src/M000080.html" target="Code" class="method-signature"
|
|
194
|
+
onclick="popupCode('Muapi.src/M000080.html');return false;">
|
|
194
195
|
<span class="method-name">new</span><span class="method-args">(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])</span>
|
|
195
196
|
</a>
|
|
196
197
|
</div>
|
|
197
198
|
|
|
198
199
|
<div class="method-description">
|
|
199
|
-
<p><a class="source-toggle" href="#"
|
|
200
|
-
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
|
201
|
-
<div class="method-source-code" id="M000084-source">
|
|
202
|
-
<pre>
|
|
203
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 7</span>
|
|
204
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_IP'</span>], <span class="ruby-identifier">username</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_ADMIN_USER'</span>], <span class="ruby-identifier">password</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_ADMIN_PASS'</span>])
|
|
205
|
-
<span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
206
|
-
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
207
|
-
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
208
|
-
<span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">"/api/v3/"</span>
|
|
209
|
-
<span class="ruby-ivar">@params</span> = <span class="ruby-keyword kw">nil</span>
|
|
210
|
-
<span class="ruby-ivar">@expected_error</span> = <span class="ruby-keyword kw">nil</span>
|
|
211
|
-
<span class="ruby-ivar">@http</span> = <span class="ruby-constant">HttpHelper</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@username</span>, <span class="ruby-ivar">@password</span>, <span class="ruby-ivar">@docroot</span>)
|
|
212
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Created Mu Api object to :#{@host}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
213
|
-
<span class="ruby-keyword kw">end</span>
|
|
214
|
-
</pre>
|
|
215
|
-
</div>
|
|
216
200
|
</div>
|
|
217
201
|
</div>
|
|
218
202
|
|
|
219
203
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
220
204
|
|
|
221
|
-
<div id="method-
|
|
222
|
-
<a name="
|
|
205
|
+
<div id="method-M000094" class="method-detail">
|
|
206
|
+
<a name="M000094"></a>
|
|
223
207
|
|
|
224
208
|
<div class="method-heading">
|
|
225
|
-
<a href="
|
|
209
|
+
<a href="Muapi.src/M000094.html" target="Code" class="method-signature"
|
|
210
|
+
onclick="popupCode('Muapi.src/M000094.html');return false;">
|
|
226
211
|
<span class="method-name">archive</span><span class="method-args">(command="run", id=@run_uuid)</span>
|
|
227
212
|
</a>
|
|
228
213
|
</div>
|
|
229
214
|
|
|
230
215
|
<div class="method-description">
|
|
231
216
|
<p>
|
|
232
|
-
performs <a href="Muapi.html#
|
|
217
|
+
performs <a href="Muapi.html#M000094">archive</a> operations
|
|
233
218
|
</p>
|
|
234
219
|
<pre>
|
|
235
220
|
* command=run to create a test archive
|
|
@@ -237,49 +222,22 @@ performs <a href="Muapi.html#M000098">archive</a> operations
|
|
|
237
222
|
* command=get to download a test archive job
|
|
238
223
|
* uuid = the uuid of the test
|
|
239
224
|
</pre>
|
|
240
|
-
<p><a class="source-toggle" href="#"
|
|
241
|
-
onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
|
|
242
|
-
<div class="method-source-code" id="M000098-source">
|
|
243
|
-
<pre>
|
|
244
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 157</span>
|
|
245
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">archive</span>(<span class="ruby-identifier">command</span>=<span class="ruby-value str">"run"</span>, <span class="ruby-identifier">id</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
246
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">command</span>
|
|
247
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'run'</span>
|
|
248
|
-
<span class="ruby-identifier">request_string</span> = <span class="ruby-node">"archive/run?uuid=#{id}"</span>
|
|
249
|
-
<span class="ruby-identifier">request_string</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@params</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">nil?</span>
|
|
250
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-identifier">request_string</span>)
|
|
251
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//job"</span>).<span class="ruby-identifier">empty?</span>
|
|
252
|
-
<span class="ruby-ivar">@job_id</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//job"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'id'</span>)
|
|
253
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"job_id = #{@job_id}"</span>
|
|
254
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@job_id</span>
|
|
255
|
-
<span class="ruby-keyword kw">end</span>
|
|
256
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
257
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'status'</span>
|
|
258
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"archive/status?jobId=#{id}"</span>)
|
|
259
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
260
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'get'</span>
|
|
261
|
-
<span class="ruby-identifier">file_size</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">download_file</span>(<span class="ruby-node">"archive/get?jobId=#{id}"</span>,<span class="ruby-node">"#{id}.zip"</span>)
|
|
262
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{id}.zip file size = #{file_size}"</span>
|
|
263
|
-
<span class="ruby-keyword kw">end</span>
|
|
264
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
265
|
-
<span class="ruby-keyword kw">end</span>
|
|
266
|
-
</pre>
|
|
267
|
-
</div>
|
|
268
225
|
</div>
|
|
269
226
|
</div>
|
|
270
227
|
|
|
271
|
-
<div id="method-
|
|
272
|
-
<a name="
|
|
228
|
+
<div id="method-M000095" class="method-detail">
|
|
229
|
+
<a name="M000095"></a>
|
|
273
230
|
|
|
274
231
|
<div class="method-heading">
|
|
275
|
-
<a href="
|
|
232
|
+
<a href="Muapi.src/M000095.html" target="Code" class="method-signature"
|
|
233
|
+
onclick="popupCode('Muapi.src/M000095.html');return false;">
|
|
276
234
|
<span class="method-name">backup</span><span class="method-args">(command="run", name="")</span>
|
|
277
235
|
</a>
|
|
278
236
|
</div>
|
|
279
237
|
|
|
280
238
|
<div class="method-description">
|
|
281
239
|
<p>
|
|
282
|
-
performs <a href="Muapi.html#
|
|
240
|
+
performs <a href="Muapi.html#M000095">backup</a> operations
|
|
283
241
|
</p>
|
|
284
242
|
<pre>
|
|
285
243
|
* command=run to create a system backup file.
|
|
@@ -287,47 +245,22 @@ performs <a href="Muapi.html#M000099">backup</a> operations
|
|
|
287
245
|
* command=get to retrieve the backup file
|
|
288
246
|
* name = backup file name
|
|
289
247
|
</pre>
|
|
290
|
-
<p><a class="source-toggle" href="#"
|
|
291
|
-
onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
|
|
292
|
-
<div class="method-source-code" id="M000099-source">
|
|
293
|
-
<pre>
|
|
294
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 184</span>
|
|
295
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backup</span>(<span class="ruby-identifier">command</span>=<span class="ruby-value str">"run"</span>, <span class="ruby-identifier">name</span>=<span class="ruby-value str">""</span>)
|
|
296
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">command</span>
|
|
297
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'run'</span>
|
|
298
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-value str">"backup/run"</span>)
|
|
299
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//job"</span>).<span class="ruby-identifier">empty?</span>
|
|
300
|
-
<span class="ruby-ivar">@job_id</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//job"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'id'</span>)
|
|
301
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"job_id = #{@job_id}"</span>
|
|
302
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@job_id</span>
|
|
303
|
-
<span class="ruby-keyword kw">end</span>
|
|
304
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
305
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'status'</span>
|
|
306
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"backup/status"</span>)
|
|
307
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
308
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'get'</span>
|
|
309
|
-
<span class="ruby-identifier">file_size</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">download_file</span>(<span class="ruby-value str">"backup/get"</span>,<span class="ruby-node">"#{name}.dat"</span>)
|
|
310
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{name}.dat file size = #{file_size}"</span>
|
|
311
|
-
<span class="ruby-keyword kw">end</span>
|
|
312
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
313
|
-
<span class="ruby-keyword kw">end</span>
|
|
314
|
-
</pre>
|
|
315
|
-
</div>
|
|
316
248
|
</div>
|
|
317
249
|
</div>
|
|
318
250
|
|
|
319
|
-
<div id="method-
|
|
320
|
-
<a name="
|
|
251
|
+
<div id="method-M000096" class="method-detail">
|
|
252
|
+
<a name="M000096"></a>
|
|
321
253
|
|
|
322
254
|
<div class="method-heading">
|
|
323
|
-
<a href="
|
|
255
|
+
<a href="Muapi.src/M000096.html" target="Code" class="method-signature"
|
|
256
|
+
onclick="popupCode('Muapi.src/M000096.html');return false;">
|
|
324
257
|
<span class="method-name">capture</span><span class="method-args">(command='run', port='a1', id=@job_id)</span>
|
|
325
258
|
</a>
|
|
326
259
|
</div>
|
|
327
260
|
|
|
328
261
|
<div class="method-description">
|
|
329
262
|
<p>
|
|
330
|
-
packet <a href="Muapi.html#
|
|
263
|
+
packet <a href="Muapi.html#M000096">capture</a> operations
|
|
331
264
|
</p>
|
|
332
265
|
<pre>
|
|
333
266
|
* command=run to start capturing packets on the specified Mu appliance port
|
|
@@ -336,40 +269,15 @@ packet <a href="Muapi.html#M000100">capture</a> operations
|
|
|
336
269
|
* port = the Mu appliance port
|
|
337
270
|
* id = job_id for status and get commands
|
|
338
271
|
</pre>
|
|
339
|
-
<p><a class="source-toggle" href="#"
|
|
340
|
-
onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
|
|
341
|
-
<div class="method-source-code" id="M000100-source">
|
|
342
|
-
<pre>
|
|
343
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 210</span>
|
|
344
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">capture</span>(<span class="ruby-identifier">command</span>=<span class="ruby-value str">'run'</span>, <span class="ruby-identifier">port</span>=<span class="ruby-value str">'a1'</span>, <span class="ruby-identifier">id</span>=<span class="ruby-ivar">@job_id</span>)
|
|
345
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">command</span>
|
|
346
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'run'</span>
|
|
347
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"capture/run?port=#{port}"</span>)
|
|
348
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//job"</span>).<span class="ruby-identifier">empty?</span>
|
|
349
|
-
<span class="ruby-ivar">@job_id</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//job"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'id'</span>)
|
|
350
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"job_id = #{@job_id}"</span>
|
|
351
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@job_id</span>
|
|
352
|
-
<span class="ruby-keyword kw">end</span>
|
|
353
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
354
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'status'</span>
|
|
355
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"capture/status?jobId=#{id}"</span>)
|
|
356
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
357
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'get'</span>
|
|
358
|
-
<span class="ruby-identifier">file_size</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">download_file</span>(<span class="ruby-node">"capture/get?jobId=#{id}"</span>,<span class="ruby-node">"#{id}.pcap"</span>)
|
|
359
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{id}.pcap file size = #{file_size}"</span>
|
|
360
|
-
<span class="ruby-keyword kw">end</span>
|
|
361
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
362
|
-
<span class="ruby-keyword kw">end</span>
|
|
363
|
-
</pre>
|
|
364
|
-
</div>
|
|
365
272
|
</div>
|
|
366
273
|
</div>
|
|
367
274
|
|
|
368
|
-
<div id="method-
|
|
369
|
-
<a name="
|
|
275
|
+
<div id="method-M000087" class="method-detail">
|
|
276
|
+
<a name="M000087"></a>
|
|
370
277
|
|
|
371
278
|
<div class="method-heading">
|
|
372
|
-
<a href="
|
|
279
|
+
<a href="Muapi.src/M000087.html" target="Code" class="method-signature"
|
|
280
|
+
onclick="popupCode('Muapi.src/M000087.html');return false;">
|
|
373
281
|
<span class="method-name">delete</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
374
282
|
</a>
|
|
375
283
|
</div>
|
|
@@ -381,29 +289,15 @@ deletes the specified test
|
|
|
381
289
|
<pre>
|
|
382
290
|
* uuid = the uuid of the test
|
|
383
291
|
</pre>
|
|
384
|
-
<p><a class="source-toggle" href="#"
|
|
385
|
-
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
|
386
|
-
<div class="method-source-code" id="M000091-source">
|
|
387
|
-
<pre>
|
|
388
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 95</span>
|
|
389
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
390
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/delete?uuid=#{uuid}"</span>)
|
|
391
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
392
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'status'</span>)
|
|
393
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
|
|
394
|
-
<span class="ruby-keyword kw">end</span>
|
|
395
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
396
|
-
<span class="ruby-keyword kw">end</span>
|
|
397
|
-
</pre>
|
|
398
|
-
</div>
|
|
399
292
|
</div>
|
|
400
293
|
</div>
|
|
401
294
|
|
|
402
|
-
<div id="method-
|
|
403
|
-
<a name="
|
|
295
|
+
<div id="method-M000092" class="method-detail">
|
|
296
|
+
<a name="M000092"></a>
|
|
404
297
|
|
|
405
298
|
<div class="method-heading">
|
|
406
|
-
<a href="
|
|
299
|
+
<a href="Muapi.src/M000092.html" target="Code" class="method-signature"
|
|
300
|
+
onclick="popupCode('Muapi.src/M000092.html');return false;">
|
|
407
301
|
<span class="method-name">export_by_type_and_name</span><span class="method-args">(type, name)</span>
|
|
408
302
|
</a>
|
|
409
303
|
</div>
|
|
@@ -416,24 +310,15 @@ template type and template name
|
|
|
416
310
|
<pre>
|
|
417
311
|
* name = the template name
|
|
418
312
|
</pre>
|
|
419
|
-
<p><a class="source-toggle" href="#"
|
|
420
|
-
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
|
421
|
-
<div class="method-source-code" id="M000096-source">
|
|
422
|
-
<pre>
|
|
423
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 142</span>
|
|
424
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">export_by_type_and_name</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>)
|
|
425
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"templates/export?type=#{type}&name=#{name}"</span>)
|
|
426
|
-
<span class="ruby-keyword kw">end</span>
|
|
427
|
-
</pre>
|
|
428
|
-
</div>
|
|
429
313
|
</div>
|
|
430
314
|
</div>
|
|
431
315
|
|
|
432
|
-
<div id="method-
|
|
433
|
-
<a name="
|
|
316
|
+
<div id="method-M000093" class="method-detail">
|
|
317
|
+
<a name="M000093"></a>
|
|
434
318
|
|
|
435
319
|
<div class="method-heading">
|
|
436
|
-
<a href="
|
|
320
|
+
<a href="Muapi.src/M000093.html" target="Code" class="method-signature"
|
|
321
|
+
onclick="popupCode('Muapi.src/M000093.html');return false;">
|
|
437
322
|
<span class="method-name">export_by_uuid</span><span class="method-args">(uuid)</span>
|
|
438
323
|
</a>
|
|
439
324
|
</div>
|
|
@@ -446,59 +331,36 @@ template uuid
|
|
|
446
331
|
<pre>
|
|
447
332
|
* uuid = the template uuid
|
|
448
333
|
</pre>
|
|
449
|
-
<p><a class="source-toggle" href="#"
|
|
450
|
-
onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
|
|
451
|
-
<div class="method-source-code" id="M000097-source">
|
|
452
|
-
<pre>
|
|
453
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 148</span>
|
|
454
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">export_by_uuid</span>(<span class="ruby-identifier">uuid</span>)
|
|
455
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"templates/export?uuid=#{uuid}"</span>)
|
|
456
|
-
<span class="ruby-keyword kw">end</span>
|
|
457
|
-
</pre>
|
|
458
|
-
</div>
|
|
459
334
|
</div>
|
|
460
335
|
</div>
|
|
461
336
|
|
|
462
|
-
<div id="method-
|
|
463
|
-
<a name="
|
|
337
|
+
<div id="method-M000088" class="method-detail">
|
|
338
|
+
<a name="M000088"></a>
|
|
464
339
|
|
|
465
340
|
<div class="method-heading">
|
|
466
|
-
<a href="
|
|
341
|
+
<a href="Muapi.src/M000088.html" target="Code" class="method-signature"
|
|
342
|
+
onclick="popupCode('Muapi.src/M000088.html');return false;">
|
|
467
343
|
<span class="method-name">get_faults</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
468
344
|
</a>
|
|
469
345
|
</div>
|
|
470
346
|
|
|
471
347
|
<div class="method-description">
|
|
472
348
|
<p>
|
|
473
|
-
returns a <a href="Muapi.html#
|
|
349
|
+
returns a <a href="Muapi.html#M000090">list</a> of faults from the
|
|
474
350
|
specified test
|
|
475
351
|
</p>
|
|
476
352
|
<pre>
|
|
477
353
|
* uuid = the uuid of the test
|
|
478
354
|
</pre>
|
|
479
|
-
<p><a class="source-toggle" href="#"
|
|
480
|
-
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
|
481
|
-
<div class="method-source-code" id="M000092-source">
|
|
482
|
-
<pre>
|
|
483
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 106</span>
|
|
484
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_faults</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
485
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"templates/export?uuid=#{uuid}"</span>)
|
|
486
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
487
|
-
<span class="ruby-identifier">faults</span> = <span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/getFaultList?uuid=#{uuid}"</span>,<span class="ruby-keyword kw">true</span>)
|
|
488
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">faults</span>
|
|
489
|
-
<span class="ruby-keyword kw">end</span>
|
|
490
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"error: no analysis with uuid: #{uuid} found"</span>
|
|
491
|
-
<span class="ruby-keyword kw">end</span>
|
|
492
|
-
</pre>
|
|
493
|
-
</div>
|
|
494
355
|
</div>
|
|
495
356
|
</div>
|
|
496
357
|
|
|
497
|
-
<div id="method-
|
|
498
|
-
<a name="
|
|
358
|
+
<div id="method-M000089" class="method-detail">
|
|
359
|
+
<a name="M000089"></a>
|
|
499
360
|
|
|
500
361
|
<div class="method-heading">
|
|
501
|
-
<a href="
|
|
362
|
+
<a href="Muapi.src/M000089.html" target="Code" class="method-signature"
|
|
363
|
+
onclick="popupCode('Muapi.src/M000089.html');return false;">
|
|
502
364
|
<span class="method-name">get_name</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
503
365
|
</a>
|
|
504
366
|
</div>
|
|
@@ -510,28 +372,15 @@ returns the name of an test
|
|
|
510
372
|
<pre>
|
|
511
373
|
* uuid = the uuid of the test
|
|
512
374
|
</pre>
|
|
513
|
-
<p><a class="source-toggle" href="#"
|
|
514
|
-
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
|
515
|
-
<div class="method-source-code" id="M000093-source">
|
|
516
|
-
<pre>
|
|
517
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 117</span>
|
|
518
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_name</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
519
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"templates/export?uuid=#{uuid}"</span>)
|
|
520
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
521
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'name'</span>)
|
|
522
|
-
<span class="ruby-keyword kw">end</span>
|
|
523
|
-
<span class="ruby-keyword kw">return</span>
|
|
524
|
-
<span class="ruby-keyword kw">end</span>
|
|
525
|
-
</pre>
|
|
526
|
-
</div>
|
|
527
375
|
</div>
|
|
528
376
|
</div>
|
|
529
377
|
|
|
530
|
-
<div id="method-
|
|
531
|
-
<a name="
|
|
378
|
+
<div id="method-M000090" class="method-detail">
|
|
379
|
+
<a name="M000090"></a>
|
|
532
380
|
|
|
533
381
|
<div class="method-heading">
|
|
534
|
-
<a href="
|
|
382
|
+
<a href="Muapi.src/M000090.html" target="Code" class="method-signature"
|
|
383
|
+
onclick="popupCode('Muapi.src/M000090.html');return false;">
|
|
535
384
|
<span class="method-name">list</span><span class="method-args">(type)</span>
|
|
536
385
|
</a>
|
|
537
386
|
</div>
|
|
@@ -544,27 +393,15 @@ template type and template name:
|
|
|
544
393
|
<pre>
|
|
545
394
|
* type = the template type, such as 'scenario' or 'monitor'
|
|
546
395
|
</pre>
|
|
547
|
-
<p><a class="source-toggle" href="#"
|
|
548
|
-
onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
|
|
549
|
-
<div class="method-source-code" id="M000094-source">
|
|
550
|
-
<pre>
|
|
551
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 127</span>
|
|
552
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-identifier">type</span>)
|
|
553
|
-
<span class="ruby-identifier">names</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
|
554
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"templates/list?type=#{type}"</span>)
|
|
555
|
-
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//templates/*"</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">names</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'name'</span>) }
|
|
556
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">names</span>
|
|
557
|
-
<span class="ruby-keyword kw">end</span>
|
|
558
|
-
</pre>
|
|
559
|
-
</div>
|
|
560
396
|
</div>
|
|
561
397
|
</div>
|
|
562
398
|
|
|
563
|
-
<div id="method-
|
|
564
|
-
<a name="
|
|
399
|
+
<div id="method-M000081" class="method-detail">
|
|
400
|
+
<a name="M000081"></a>
|
|
565
401
|
|
|
566
402
|
<div class="method-heading">
|
|
567
|
-
<a href="
|
|
403
|
+
<a href="Muapi.src/M000081.html" target="Code" class="method-signature"
|
|
404
|
+
onclick="popupCode('Muapi.src/M000081.html');return false;">
|
|
568
405
|
<span class="method-name">list_by_status</span><span class="method-args">(status="")</span>
|
|
569
406
|
</a>
|
|
570
407
|
</div>
|
|
@@ -576,33 +413,15 @@ lists the statuses of tests
|
|
|
576
413
|
<pre>
|
|
577
414
|
* status = the status type, such as 'running' or 'failed'
|
|
578
415
|
</pre>
|
|
579
|
-
<p><a class="source-toggle" href="#"
|
|
580
|
-
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
|
581
|
-
<div class="method-source-code" id="M000085-source">
|
|
582
|
-
<pre>
|
|
583
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 20</span>
|
|
584
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_by_status</span>(<span class="ruby-identifier">status</span>=<span class="ruby-value str">""</span>)
|
|
585
|
-
<span class="ruby-identifier">uuid_list</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>()
|
|
586
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">empty?</span>
|
|
587
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/list?status=#{status}"</span>)
|
|
588
|
-
<span class="ruby-keyword kw">else</span>
|
|
589
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-value str">"analysis/list"</span>)
|
|
590
|
-
<span class="ruby-keyword kw">end</span>
|
|
591
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
592
|
-
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">'//analysis'</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">uuid_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'uuid'</span>) }
|
|
593
|
-
<span class="ruby-keyword kw">end</span>
|
|
594
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uuid_list</span>
|
|
595
|
-
<span class="ruby-keyword kw">end</span>
|
|
596
|
-
</pre>
|
|
597
|
-
</div>
|
|
598
416
|
</div>
|
|
599
417
|
</div>
|
|
600
418
|
|
|
601
|
-
<div id="method-
|
|
602
|
-
<a name="
|
|
419
|
+
<div id="method-M000085" class="method-detail">
|
|
420
|
+
<a name="M000085"></a>
|
|
603
421
|
|
|
604
422
|
<div class="method-heading">
|
|
605
|
-
<a href="
|
|
423
|
+
<a href="Muapi.src/M000085.html" target="Code" class="method-signature"
|
|
424
|
+
onclick="popupCode('Muapi.src/M000085.html');return false;">
|
|
606
425
|
<span class="method-name">pause</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
607
426
|
</a>
|
|
608
427
|
</div>
|
|
@@ -614,29 +433,15 @@ pauses a running test
|
|
|
614
433
|
<pre>
|
|
615
434
|
* uuid = the uuid of the test
|
|
616
435
|
</pre>
|
|
617
|
-
<p><a class="source-toggle" href="#"
|
|
618
|
-
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
|
619
|
-
<div class="method-source-code" id="M000089-source">
|
|
620
|
-
<pre>
|
|
621
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 73</span>
|
|
622
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pause</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
623
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/pause?uuid=#{uuid}"</span>)
|
|
624
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
625
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'status'</span>)
|
|
626
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
|
|
627
|
-
<span class="ruby-keyword kw">end</span>
|
|
628
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
629
|
-
<span class="ruby-keyword kw">end</span>
|
|
630
|
-
</pre>
|
|
631
|
-
</div>
|
|
632
436
|
</div>
|
|
633
437
|
</div>
|
|
634
438
|
|
|
635
|
-
<div id="method-
|
|
636
|
-
<a name="
|
|
439
|
+
<div id="method-M000086" class="method-detail">
|
|
440
|
+
<a name="M000086"></a>
|
|
637
441
|
|
|
638
442
|
<div class="method-heading">
|
|
639
|
-
<a href="
|
|
443
|
+
<a href="Muapi.src/M000086.html" target="Code" class="method-signature"
|
|
444
|
+
onclick="popupCode('Muapi.src/M000086.html');return false;">
|
|
640
445
|
<span class="method-name">resume</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
641
446
|
</a>
|
|
642
447
|
</div>
|
|
@@ -648,29 +453,15 @@ resumes a suspended test
|
|
|
648
453
|
<pre>
|
|
649
454
|
* uuid = the uuid of the test
|
|
650
455
|
</pre>
|
|
651
|
-
<p><a class="source-toggle" href="#"
|
|
652
|
-
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
|
653
|
-
<div class="method-source-code" id="M000090-source">
|
|
654
|
-
<pre>
|
|
655
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 84</span>
|
|
656
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resume</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
657
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/resume?uuid=#{uuid}"</span>)
|
|
658
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
659
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'status'</span>)
|
|
660
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
|
|
661
|
-
<span class="ruby-keyword kw">end</span>
|
|
662
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
663
|
-
<span class="ruby-keyword kw">end</span>
|
|
664
|
-
</pre>
|
|
665
|
-
</div>
|
|
666
456
|
</div>
|
|
667
457
|
</div>
|
|
668
458
|
|
|
669
|
-
<div id="method-
|
|
670
|
-
<a name="
|
|
459
|
+
<div id="method-M000083" class="method-detail">
|
|
460
|
+
<a name="M000083"></a>
|
|
671
461
|
|
|
672
462
|
<div class="method-heading">
|
|
673
|
-
<a href="
|
|
463
|
+
<a href="Muapi.src/M000083.html" target="Code" class="method-signature"
|
|
464
|
+
onclick="popupCode('Muapi.src/M000083.html');return false;">
|
|
674
465
|
<span class="method-name">run</span><span class="method-args">(uuid, rename="")</span>
|
|
675
466
|
</a>
|
|
676
467
|
</div>
|
|
@@ -682,68 +473,35 @@ starts a test
|
|
|
682
473
|
<pre>
|
|
683
474
|
* uuid = the uuid of the test
|
|
684
475
|
</pre>
|
|
685
|
-
<p><a class="source-toggle" href="#"
|
|
686
|
-
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
|
687
|
-
<div class="method-source-code" id="M000087-source">
|
|
688
|
-
<pre>
|
|
689
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 47</span>
|
|
690
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">uuid</span>, <span class="ruby-identifier">rename</span>=<span class="ruby-value str">""</span>)
|
|
691
|
-
<span class="ruby-identifier">req</span> = <span class="ruby-node">"analysis/run?uuid=#{uuid}"</span>
|
|
692
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">rename</span>.<span class="ruby-identifier">empty?</span>
|
|
693
|
-
<span class="ruby-identifier">req</span> = <span class="ruby-node">"#{req}&rename=#{rename}"</span>
|
|
694
|
-
<span class="ruby-keyword kw">end</span>
|
|
695
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-identifier">req</span>)
|
|
696
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
697
|
-
<span class="ruby-ivar">@run_uuid</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'uuid'</span>)
|
|
698
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@run_uuid</span>
|
|
699
|
-
<span class="ruby-keyword kw">end</span>
|
|
700
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@run_uuid</span>
|
|
701
|
-
<span class="ruby-keyword kw">end</span>
|
|
702
|
-
</pre>
|
|
703
|
-
</div>
|
|
704
476
|
</div>
|
|
705
477
|
</div>
|
|
706
478
|
|
|
707
|
-
<div id="method-
|
|
708
|
-
<a name="
|
|
479
|
+
<div id="method-M000082" class="method-detail">
|
|
480
|
+
<a name="M000082"></a>
|
|
709
481
|
|
|
710
482
|
<div class="method-heading">
|
|
711
|
-
<a href="
|
|
483
|
+
<a href="Muapi.src/M000082.html" target="Code" class="method-signature"
|
|
484
|
+
onclick="popupCode('Muapi.src/M000082.html');return false;">
|
|
712
485
|
<span class="method-name">status</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
713
486
|
</a>
|
|
714
487
|
</div>
|
|
715
488
|
|
|
716
489
|
<div class="method-description">
|
|
717
490
|
<p>
|
|
718
|
-
returns the <a href="Muapi.html#
|
|
491
|
+
returns the <a href="Muapi.html#M000082">status</a> of a test
|
|
719
492
|
</p>
|
|
720
493
|
<pre>
|
|
721
494
|
* uuid = the uuid of the test
|
|
722
495
|
</pre>
|
|
723
|
-
<p><a class="source-toggle" href="#"
|
|
724
|
-
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
|
725
|
-
<div class="method-source-code" id="M000086-source">
|
|
726
|
-
<pre>
|
|
727
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 35</span>
|
|
728
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
729
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/status?uuid=#{uuid}"</span>)
|
|
730
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">nil?</span>
|
|
731
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
732
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//status"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">text</span>
|
|
733
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
|
|
734
|
-
<span class="ruby-keyword kw">end</span>
|
|
735
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
736
|
-
<span class="ruby-keyword kw">end</span>
|
|
737
|
-
</pre>
|
|
738
|
-
</div>
|
|
739
496
|
</div>
|
|
740
497
|
</div>
|
|
741
498
|
|
|
742
|
-
<div id="method-
|
|
743
|
-
<a name="
|
|
499
|
+
<div id="method-M000084" class="method-detail">
|
|
500
|
+
<a name="M000084"></a>
|
|
744
501
|
|
|
745
502
|
<div class="method-heading">
|
|
746
|
-
<a href="
|
|
503
|
+
<a href="Muapi.src/M000084.html" target="Code" class="method-signature"
|
|
504
|
+
onclick="popupCode('Muapi.src/M000084.html');return false;">
|
|
747
505
|
<span class="method-name">stop</span><span class="method-args">(uuid=@run_uuid)</span>
|
|
748
506
|
</a>
|
|
749
507
|
</div>
|
|
@@ -755,49 +513,24 @@ stops a running test
|
|
|
755
513
|
<pre>
|
|
756
514
|
* uuid = the uuid of the test
|
|
757
515
|
</pre>
|
|
758
|
-
<p><a class="source-toggle" href="#"
|
|
759
|
-
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
|
760
|
-
<div class="method-source-code" id="M000088-source">
|
|
761
|
-
<pre>
|
|
762
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 62</span>
|
|
763
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@run_uuid</span>)
|
|
764
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_xml</span>(<span class="ruby-node">"analysis/stop?uuid=#{uuid}"</span>)
|
|
765
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>).<span class="ruby-identifier">empty?</span>
|
|
766
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//analysis"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">'status'</span>)
|
|
767
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">status</span>
|
|
768
|
-
<span class="ruby-keyword kw">end</span>
|
|
769
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
770
|
-
<span class="ruby-keyword kw">end</span>
|
|
771
|
-
</pre>
|
|
772
|
-
</div>
|
|
773
516
|
</div>
|
|
774
517
|
</div>
|
|
775
518
|
|
|
776
|
-
<div id="method-
|
|
777
|
-
<a name="
|
|
519
|
+
<div id="method-M000091" class="method-detail">
|
|
520
|
+
<a name="M000091"></a>
|
|
778
521
|
|
|
779
522
|
<div class="method-heading">
|
|
780
|
-
<a href="
|
|
523
|
+
<a href="Muapi.src/M000091.html" target="Code" class="method-signature"
|
|
524
|
+
onclick="popupCode('Muapi.src/M000091.html');return false;">
|
|
781
525
|
<span class="method-name">types</span><span class="method-args">()</span>
|
|
782
526
|
</a>
|
|
783
527
|
</div>
|
|
784
528
|
|
|
785
529
|
<div class="method-description">
|
|
786
530
|
<p>
|
|
787
|
-
lists the <a href="Muapi.html#
|
|
531
|
+
lists the <a href="Muapi.html#M000091">types</a> of templates on the <a
|
|
788
532
|
href="../Mu.html">Mu</a> system
|
|
789
533
|
</p>
|
|
790
|
-
<p><a class="source-toggle" href="#"
|
|
791
|
-
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
|
792
|
-
<div class="method-source-code" id="M000095-source">
|
|
793
|
-
<pre>
|
|
794
|
-
<span class="ruby-comment cmt"># File lib/mu/api/muapi.rb, line 135</span>
|
|
795
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">types</span>
|
|
796
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"templates/types?"</span>)
|
|
797
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
|
798
|
-
<span class="ruby-keyword kw">end</span>
|
|
799
|
-
</pre>
|
|
800
|
-
</div>
|
|
801
534
|
</div>
|
|
802
535
|
</div>
|
|
803
536
|
|