mu 5.7.2.3 → 5.7.2.4
Sign up to get free protection for your applications and to get access to all the features.
- 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>cmd_init (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 6</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_init</span> <span class="ruby-identifier">argv</span>
|
15
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span> <span class="ruby-identifier">credentials_file</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-constant">API</span>.<span class="ruby-identifier">client</span>
|
17
|
+
|
18
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"You are now ready to use mu!"</span>
|
19
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"Try mu help to learn more about the commands."</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</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>client (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 14</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>
|
15
|
+
<span class="ruby-identifier">get_credentials</span>
|
16
|
+
<span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">host</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</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>user (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 19</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user</span>
|
15
|
+
<span class="ruby-identifier">get_credentials</span>
|
16
|
+
<span class="ruby-ivar">@credentials</span>[<span class="ruby-value">0</span>]
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</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>password (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 24</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">password</span>
|
15
|
+
<span class="ruby-identifier">get_credentials</span>
|
16
|
+
<span class="ruby-ivar">@credentials</span>[<span class="ruby-value">1</span>]
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>host (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 29</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">host</span>
|
15
|
+
<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_IP'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
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>credentials_file (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 33</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">credentials_file</span>
|
15
|
+
<span class="ruby-keyword kw">end</span></pre>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get_credentials (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 36</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_credentials</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@credentials</span>
|
16
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@credentials</span> = <span class="ruby-identifier">read_credentials</span>
|
17
|
+
<span class="ruby-ivar">@credentials</span> = <span class="ruby-identifier">ask_for_credentials</span>
|
18
|
+
<span class="ruby-identifier">save_credentials</span>
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
20
|
+
<span class="ruby-ivar">@credentials</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>read_credentials (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 45</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_credentials</span>
|
15
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">credentials_file</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">credentials_file</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</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>ask_for_credentials (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 49</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ask_for_credentials</span>
|
15
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"Enter your credentials."</span>
|
16
|
+
<span class="ruby-identifier">print</span> <span class="ruby-value str">"User-ID: "</span>
|
17
|
+
<span class="ruby-identifier">user</span> = <span class="ruby-identifier">ask</span>
|
18
|
+
<span class="ruby-identifier">print</span> <span class="ruby-value str">"API-Key: "</span>
|
19
|
+
<span class="ruby-identifier">apik</span> = <span class="ruby-identifier">ask</span>
|
20
|
+
<span class="ruby-identifier">apik2</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">apik</span>, <span class="ruby-identifier">host</span>).<span class="ruby-identifier">login</span>[<span class="ruby-value str">'api_key'</span>]
|
21
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">apik2</span>
|
22
|
+
<span class="ruby-identifier">error</span> <span class="ruby-value str">"Authentication failed"</span>
|
23
|
+
<span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
25
|
+
|
26
|
+
[ <span class="ruby-identifier">user</span>, <span class="ruby-identifier">apik2</span> ]
|
27
|
+
<span class="ruby-keyword kw">end</span></pre>
|
28
|
+
</body>
|
29
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>save_credentials (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 64</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_credentials</span>
|
15
|
+
<span class="ruby-identifier">write_credentials</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>write_credentials (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 68</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_credentials</span>
|
15
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">credentials_file</span>))
|
16
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">credentials_file</span>, <span class="ruby-value str">'w'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
17
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">credentials</span>
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-identifier">set_credentials_permissions</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</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>set_credentials_permissions (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 76</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_credentials_permissions</span>
|
15
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-value">0700</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">credentials_file</span>)
|
16
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-value">0600</span>, <span class="ruby-identifier">credentials_file</span>
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>instance (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 81</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>
|
15
|
+
<span class="ruby-ivar">@instance</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">API</span>.<span class="ruby-identifier">new</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>client (Mu::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 85</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">client</span>
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">client</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
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::Command::API)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 90</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
15
|
+
<span class="ruby-keyword kw">end</span></pre>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -86,21 +86,10 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#M000170">dump_status</a>
|
94
|
-
<a href="#M000172">get_all_hosts_from_musl</a>
|
95
|
-
<a href="#M000177">help</a>
|
96
|
-
<a href="#M000173">map_all_hosts_to_json</a>
|
97
|
-
<a href="#M000171">output_csv</a>
|
98
|
-
<a href="#M000176">parse_cli</a>
|
99
|
-
<a href="#M000175">parse_status</a>
|
100
|
-
<a href="#M000174">parse_verify_response</a>
|
101
|
-
<a href="#M000168">run</a>
|
102
|
-
<a href="#M000169">set_global_hosts</a>
|
103
|
-
<a href="#M000167">setup</a>
|
89
|
+
<a href="#M000145">cmd_help</a>
|
90
|
+
<a href="#M000148">cmd_run_dir</a>
|
91
|
+
<a href="#M000147">cmd_run_file</a>
|
92
|
+
<a href="#M000146">cmd_running?</a>
|
104
93
|
</div>
|
105
94
|
</div>
|
106
95
|
|
@@ -155,37 +144,29 @@
|
|
155
144
|
<div id="methods">
|
156
145
|
<h3 class="section-bar">Public Instance methods</h3>
|
157
146
|
|
158
|
-
<div id="method-
|
159
|
-
<a name="
|
147
|
+
<div id="method-M000145" class="method-detail">
|
148
|
+
<a name="M000145"></a>
|
160
149
|
|
161
150
|
<div class="method-heading">
|
162
|
-
<a href="
|
151
|
+
<a href="Cmd_appid.src/M000145.html" target="Code" class="method-signature"
|
152
|
+
onclick="popupCode('Cmd_appid.src/M000145.html');return false;">
|
163
153
|
<span class="method-name">cmd_help</span><span class="method-args">(argv)</span>
|
164
154
|
</a>
|
165
155
|
</div>
|
166
156
|
|
167
157
|
<div class="method-description">
|
168
158
|
<p>
|
169
|
-
displays command-line
|
159
|
+
displays command-line help
|
170
160
|
</p>
|
171
|
-
<p><a class="source-toggle" href="#"
|
172
|
-
onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
|
173
|
-
<div class="method-source-code" id="M000163-source">
|
174
|
-
<pre>
|
175
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 13</span>
|
176
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
|
177
|
-
<span class="ruby-identifier">help</span>
|
178
|
-
<span class="ruby-keyword kw">end</span>
|
179
|
-
</pre>
|
180
|
-
</div>
|
181
161
|
</div>
|
182
162
|
</div>
|
183
163
|
|
184
|
-
<div id="method-
|
185
|
-
<a name="
|
164
|
+
<div id="method-M000148" class="method-detail">
|
165
|
+
<a name="M000148"></a>
|
186
166
|
|
187
167
|
<div class="method-heading">
|
188
|
-
<a href="
|
168
|
+
<a href="Cmd_appid.src/M000148.html" target="Code" class="method-signature"
|
169
|
+
onclick="popupCode('Cmd_appid.src/M000148.html');return false;">
|
189
170
|
<span class="method-name">cmd_run_dir</span><span class="method-args">(argv)</span>
|
190
171
|
</a>
|
191
172
|
</div>
|
@@ -197,53 +178,17 @@ href="../Scale.html">Scale</a> test for each one
|
|
197
178
|
</p>
|
198
179
|
<pre>
|
199
180
|
* argv = command-line arguments, require a directory (-d) argument
|
181
|
+
* optional -r argument for recursive directory search (default is a flat directory)
|
200
182
|
</pre>
|
201
|
-
<p><a class="source-toggle" href="#"
|
202
|
-
onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
|
203
|
-
<div class="method-source-code" id="M000166-source">
|
204
|
-
<pre>
|
205
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 64</span>
|
206
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_dir</span> <span class="ruby-identifier">argv</span>
|
207
|
-
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
208
|
-
|
209
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
|
210
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"*** Error: directory required, using -d option"</span>
|
211
|
-
<span class="ruby-keyword kw">else</span>
|
212
|
-
<span class="ruby-identifier">dir</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
|
213
|
-
<span class="ruby-keyword kw">end</span>
|
214
|
-
|
215
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_status.json"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_status.json"</span>)
|
216
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_stats.csv"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_stats.csv"</span>)
|
217
|
-
|
218
|
-
<span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@mu_ip</span>, <span class="ruby-ivar">@@mu_admin_user</span>, <span class="ruby-ivar">@@mu_admin_pass</span>)
|
219
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"pattern"</span>, <span class="ruby-ivar">@cmd_line_pattern</span>)
|
220
|
-
<span class="ruby-ivar">@params</span> = {}
|
221
|
-
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"dir"</span>] = <span class="ruby-identifier">dir</span>
|
222
|
-
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"hosts"</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
|
223
|
-
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"dir"</span>])
|
224
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_status.json"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_status.json"</span>)
|
225
|
-
<span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">"*.msl"</span>)
|
226
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">files</span>.<span class="ruby-identifier">empty?</span>
|
227
|
-
<span class="ruby-identifier">files</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">|</span>
|
228
|
-
<span class="ruby-identifier">run</span>(<span class="ruby-identifier">f</span>)
|
229
|
-
<span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">f</span>)
|
230
|
-
<span class="ruby-identifier">sleep</span> <span class="ruby-value">2</span>
|
231
|
-
<span class="ruby-keyword kw">end</span>
|
232
|
-
<span class="ruby-keyword kw">else</span>
|
233
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"no msl files found in #{dir}"</span>
|
234
|
-
<span class="ruby-keyword kw">end</span>
|
235
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
|
236
|
-
<span class="ruby-keyword kw">end</span>
|
237
|
-
</pre>
|
238
|
-
</div>
|
239
183
|
</div>
|
240
184
|
</div>
|
241
185
|
|
242
|
-
<div id="method-
|
243
|
-
<a name="
|
186
|
+
<div id="method-M000147" class="method-detail">
|
187
|
+
<a name="M000147"></a>
|
244
188
|
|
245
189
|
<div class="method-heading">
|
246
|
-
<a href="
|
190
|
+
<a href="Cmd_appid.src/M000147.html" target="Code" class="method-signature"
|
191
|
+
onclick="popupCode('Cmd_appid.src/M000147.html');return false;">
|
247
192
|
<span class="method-name">cmd_run_file</span><span class="method-args">(argv)</span>
|
248
193
|
</a>
|
249
194
|
</div>
|
@@ -255,45 +200,15 @@ runs a single Studio <a href="../Scale.html">Scale</a> test
|
|
255
200
|
<pre>
|
256
201
|
* argv = command-line arguments, requires a scenario (-s) argument
|
257
202
|
</pre>
|
258
|
-
<p><a class="source-toggle" href="#"
|
259
|
-
onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
|
260
|
-
<div class="method-source-code" id="M000165-source">
|
261
|
-
<pre>
|
262
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 37</span>
|
263
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_file</span> <span class="ruby-identifier">argv</span>
|
264
|
-
<span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
265
|
-
|
266
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
|
267
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"*** Error: scenario required, using -s option"</span>
|
268
|
-
<span class="ruby-keyword kw">else</span>
|
269
|
-
<span class="ruby-identifier">scenario</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
|
270
|
-
<span class="ruby-keyword kw">end</span>
|
271
|
-
|
272
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">scenario</span>)
|
273
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"*** Error: Scenario file #{scenario} was not found"</span>
|
274
|
-
<span class="ruby-keyword kw">end</span>
|
275
|
-
|
276
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_status.json"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_status.json"</span>)
|
277
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"app_id_stats.csv"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">"app_id_stats.csv"</span>)
|
278
|
-
|
279
|
-
<span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@mu_ip</span>, <span class="ruby-ivar">@@mu_admin_user</span>, <span class="ruby-ivar">@@mu_admin_pass</span>)
|
280
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"pattern"</span>, <span class="ruby-ivar">@cmd_line_pattern</span>)
|
281
|
-
<span class="ruby-ivar">@params</span> = {}
|
282
|
-
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"msl"</span>] = <span class="ruby-identifier">scenario</span>
|
283
|
-
<span class="ruby-ivar">@params</span>[<span class="ruby-value str">"hosts"</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
|
284
|
-
<span class="ruby-identifier">run</span>(<span class="ruby-identifier">scenario</span>)
|
285
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
|
286
|
-
<span class="ruby-keyword kw">end</span>
|
287
|
-
</pre>
|
288
|
-
</div>
|
289
203
|
</div>
|
290
204
|
</div>
|
291
205
|
|
292
|
-
<div id="method-
|
293
|
-
<a name="
|
206
|
+
<div id="method-M000146" class="method-detail">
|
207
|
+
<a name="M000146"></a>
|
294
208
|
|
295
209
|
<div class="method-heading">
|
296
|
-
<a href="
|
210
|
+
<a href="Cmd_appid.src/M000146.html" target="Code" class="method-signature"
|
211
|
+
onclick="popupCode('Cmd_appid.src/M000146.html');return false;">
|
297
212
|
<span class="method-name">cmd_running?</span><span class="method-args">(argv)</span>
|
298
213
|
</a>
|
299
214
|
</div>
|
@@ -305,617 +220,6 @@ returns a boolean indicating whether the scale test is running or not
|
|
305
220
|
<pre>
|
306
221
|
* argv = command-line arguments
|
307
222
|
</pre>
|
308
|
-
<p><a class="source-toggle" href="#"
|
309
|
-
onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
|
310
|
-
<div class="method-source-code" id="M000164-source">
|
311
|
-
<pre>
|
312
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 19</span>
|
313
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_running?</span> <span class="ruby-identifier">argv</span>
|
314
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">nil?</span>
|
315
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"false"</span>
|
316
|
-
<span class="ruby-keyword kw">return</span>
|
317
|
-
<span class="ruby-keyword kw">end</span>
|
318
|
-
|
319
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
|
320
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
|
321
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>].<span class="ruby-identifier">nil?</span>
|
322
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"running"</span>]
|
323
|
-
<span class="ruby-keyword kw">end</span>
|
324
|
-
<span class="ruby-keyword kw">else</span>
|
325
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"false"</span>
|
326
|
-
<span class="ruby-keyword kw">end</span>
|
327
|
-
<span class="ruby-keyword kw">end</span>
|
328
|
-
</pre>
|
329
|
-
</div>
|
330
|
-
</div>
|
331
|
-
</div>
|
332
|
-
|
333
|
-
<h3 class="section-bar">Private Instance methods</h3>
|
334
|
-
|
335
|
-
<div id="method-M000170" class="method-detail">
|
336
|
-
<a name="M000170"></a>
|
337
|
-
|
338
|
-
<div class="method-heading">
|
339
|
-
<a href="#M000170" class="method-signature">
|
340
|
-
<span class="method-name">dump_status</span><span class="method-args">(status, msl)</span>
|
341
|
-
</a>
|
342
|
-
</div>
|
343
|
-
|
344
|
-
<div class="method-description">
|
345
|
-
<p><a class="source-toggle" href="#"
|
346
|
-
onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
|
347
|
-
<div class="method-source-code" id="M000170-source">
|
348
|
-
<pre>
|
349
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 211</span>
|
350
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">msl</span>)
|
351
|
-
<span class="ruby-identifier">filename</span> = <span class="ruby-value str">"app_id_status.json"</span>
|
352
|
-
<span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"a"</span>)
|
353
|
-
<span class="ruby-identifier">status</span>[<span class="ruby-value str">"filename"</span>] = <span class="ruby-identifier">msl</span>
|
354
|
-
<span class="ruby-identifier">str</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">status</span>)
|
355
|
-
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">","</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">zero?</span>(<span class="ruby-identifier">f</span>) <span class="ruby-comment cmt"># if appending, we need to insert a comma</span>
|
356
|
-
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">str</span>)
|
357
|
-
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
|
358
|
-
<span class="ruby-keyword kw">end</span>
|
359
|
-
</pre>
|
360
|
-
</div>
|
361
|
-
</div>
|
362
|
-
</div>
|
363
|
-
|
364
|
-
<div id="method-M000172" class="method-detail">
|
365
|
-
<a name="M000172"></a>
|
366
|
-
|
367
|
-
<div class="method-heading">
|
368
|
-
<a href="#M000172" class="method-signature">
|
369
|
-
<span class="method-name">get_all_hosts_from_musl</span><span class="method-args">(msl)</span>
|
370
|
-
</a>
|
371
|
-
</div>
|
372
|
-
|
373
|
-
<div class="method-description">
|
374
|
-
<p>
|
375
|
-
finds all the hosts in the musl file
|
376
|
-
</p>
|
377
|
-
<p><a class="source-toggle" href="#"
|
378
|
-
onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
|
379
|
-
<div class="method-source-code" id="M000172-source">
|
380
|
-
<pre>
|
381
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 229</span>
|
382
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_all_hosts_from_musl</span>(<span class="ruby-identifier">msl</span>)
|
383
|
-
<span class="ruby-identifier">f</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">msl</span>)
|
384
|
-
<span class="ruby-identifier">hosts</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/host_\d+/</span>)
|
385
|
-
<span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">uniq!</span>
|
386
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">hosts</span>
|
387
|
-
<span class="ruby-keyword kw">end</span>
|
388
|
-
</pre>
|
389
|
-
</div>
|
390
|
-
</div>
|
391
|
-
</div>
|
392
|
-
|
393
|
-
<div id="method-M000177" class="method-detail">
|
394
|
-
<a name="M000177"></a>
|
395
|
-
|
396
|
-
<div class="method-heading">
|
397
|
-
<a href="#M000177" class="method-signature">
|
398
|
-
<span class="method-name">help</span><span class="method-args">()</span>
|
399
|
-
</a>
|
400
|
-
</div>
|
401
|
-
|
402
|
-
<div class="method-description">
|
403
|
-
<p><a class="source-toggle" href="#"
|
404
|
-
onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
|
405
|
-
<div class="method-source-code" id="M000177-source">
|
406
|
-
<pre>
|
407
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 425</span>
|
408
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
|
409
|
-
<span class="ruby-identifier">helps</span> = [
|
410
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-c'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--csv'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'name of the csv testset to run'</span> },
|
411
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-d'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--dir'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'directory containing msl files, required for run_dir'</span> },
|
412
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-h'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--help'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'help on command line options'</span> },
|
413
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-i'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--interfaces'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'comma-separated list of interfaces, e.g. b1,b2 or b1-1000:0,b2 for ip range and offset'</span> },
|
414
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-m'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--mu_string'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'user, password, mu_ip in the form of admin:admin@10.9.8.7'</span> },
|
415
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-o'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--output'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'output logging to this file'</span> },
|
416
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-p'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--pattern'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'pattern in the form of comma-separated concurrency_start-end:duration strings, e.g. 1-10000:60,10000-1:30. Duration is in seconds'</span> },
|
417
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-s'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--scenario'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'<string>'</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'msl file, required for run_msl'</span> },
|
418
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-t'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--test'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'do verify only'</span> },
|
419
|
-
{ <span class="ruby-identifier">:short</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'-v'</span>, <span class="ruby-identifier">:long</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'--verbose'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:help</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'set Logger::DEBUG level'</span> }
|
420
|
-
]
|
421
|
-
|
422
|
-
<span class="ruby-identifier">cmds</span> = [
|
423
|
-
<span class="ruby-value str">"mu cmd_appid:help"</span>,
|
424
|
-
<span class="ruby-value str">"mu cmd_appid:run_file -s <file>"</span>,
|
425
|
-
<span class="ruby-value str">"mu cmd_appid:run_dir -d <dir>"</span>,
|
426
|
-
<span class="ruby-value str">"mu cmd_appid:running?"</span>
|
427
|
-
]
|
428
|
-
|
429
|
-
<span class="ruby-identifier">max_long_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-identifier">:long</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
|
430
|
-
<span class="ruby-identifier">max_value_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-identifier">:value</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
|
431
|
-
<span class="ruby-identifier">puts</span>
|
432
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Usage: mu cmd_appid:<command> <options>"</span>
|
433
|
-
<span class="ruby-identifier">puts</span>
|
434
|
-
<span class="ruby-identifier">helps</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span>
|
435
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"%-*s %*s %-*s %s"</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">max_long_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:long</span>], <span class="ruby-value">2</span>, <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:short</span>], <span class="ruby-identifier">max_value_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:value</span>], <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:help</span>]]
|
436
|
-
<span class="ruby-keyword kw">end</span>
|
437
|
-
<span class="ruby-identifier">puts</span>
|
438
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Available Commands"</span>
|
439
|
-
<span class="ruby-identifier">puts</span>
|
440
|
-
<span class="ruby-identifier">cmds</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">|</span>
|
441
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
|
442
|
-
<span class="ruby-keyword kw">end</span>
|
443
|
-
<span class="ruby-identifier">puts</span>
|
444
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Outputs"</span>
|
445
|
-
<span class="ruby-identifier">puts</span>
|
446
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"app_id_stats.csv"</span>
|
447
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"scenario_name , passed , errors , timeouts,"</span>
|
448
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"client tx bytes/sec , client tx msgs/sec , client rx bytes/sec , client rx msgs/src,"</span>
|
449
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"server tx bytes/sec , server tx msgs/sec , server rx bytes/sec , server rx msgs/src"</span>
|
450
|
-
<span class="ruby-identifier">puts</span>
|
451
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"app_id_status.json"</span>
|
452
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"contains the last status json object returned from polling, per scenario"</span>
|
453
|
-
<span class="ruby-keyword kw">end</span>
|
454
|
-
</pre>
|
455
|
-
</div>
|
456
|
-
</div>
|
457
|
-
</div>
|
458
|
-
|
459
|
-
<div id="method-M000173" class="method-detail">
|
460
|
-
<a name="M000173"></a>
|
461
|
-
|
462
|
-
<div class="method-heading">
|
463
|
-
<a href="#M000173" class="method-signature">
|
464
|
-
<span class="method-name">map_all_hosts_to_json</span><span class="method-args">(hosts=[])</span>
|
465
|
-
</a>
|
466
|
-
</div>
|
467
|
-
|
468
|
-
<div class="method-description">
|
469
|
-
<p>
|
470
|
-
maps host_0 to the client interface maps all other hosts to the server
|
471
|
-
interface
|
472
|
-
</p>
|
473
|
-
<p><a class="source-toggle" href="#"
|
474
|
-
onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
|
475
|
-
<div class="method-source-code" id="M000173-source">
|
476
|
-
<pre>
|
477
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 238</span>
|
478
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">map_all_hosts_to_json</span>(<span class="ruby-identifier">hosts</span>=[])
|
479
|
-
<span class="ruby-identifier">new_hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
480
|
-
<span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
|
481
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
482
|
-
<span class="ruby-identifier">new_hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@hosts</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span> <span class="ruby-node">"/*,#{@addr_indexes[0]}"</span>
|
483
|
-
<span class="ruby-keyword kw">else</span>
|
484
|
-
<span class="ruby-identifier">new_hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@hosts</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-node">"/*,#{@addr_indexes[1]}"</span>
|
485
|
-
<span class="ruby-keyword kw">end</span>
|
486
|
-
<span class="ruby-keyword kw">end</span>
|
487
|
-
|
488
|
-
<span class="ruby-identifier">hosts_config</span> = {}
|
489
|
-
|
490
|
-
<span class="ruby-comment cmt"># assign hosts to consecutive string keys, host_0, host_1, etc ...</span>
|
491
|
-
<span class="ruby-identifier">new_hosts</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
|
492
|
-
<span class="ruby-identifier">hosts_config</span>[<span class="ruby-node">"host_#{i}"</span>] = <span class="ruby-identifier">h</span> <span class="ruby-comment cmt"># new_hosts[i]</span>
|
493
|
-
<span class="ruby-keyword kw">end</span>
|
494
|
-
|
495
|
-
<span class="ruby-comment cmt"># convert keys to symbols</span>
|
496
|
-
<span class="ruby-identifier">new_hosts_config</span> = {}
|
497
|
-
<span class="ruby-identifier">hosts_config</span>.<span class="ruby-identifier">each_key</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">new_hosts_config</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">hosts_config</span>[<span class="ruby-identifier">k</span>] }
|
498
|
-
|
499
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">new_hosts_config</span>
|
500
|
-
<span class="ruby-keyword kw">end</span>
|
501
|
-
</pre>
|
502
|
-
</div>
|
503
|
-
</div>
|
504
|
-
</div>
|
505
|
-
|
506
|
-
<div id="method-M000171" class="method-detail">
|
507
|
-
<a name="M000171"></a>
|
508
|
-
|
509
|
-
<div class="method-heading">
|
510
|
-
<a href="#M000171" class="method-signature">
|
511
|
-
<span class="method-name">output_csv</span><span class="method-args">(msl_file)</span>
|
512
|
-
</a>
|
513
|
-
</div>
|
514
|
-
|
515
|
-
<div class="method-description">
|
516
|
-
<p><a class="source-toggle" href="#"
|
517
|
-
onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
|
518
|
-
<div class="method-source-code" id="M000171-source">
|
519
|
-
<pre>
|
520
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 221</span>
|
521
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">msl_file</span>)
|
522
|
-
<span class="ruby-identifier">filename</span> = <span class="ruby-value str">"app_id_stats.csv"</span>
|
523
|
-
<span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"a"</span>)
|
524
|
-
<span class="ruby-identifier">doc</span> = <span class="ruby-node">"#{msl_file},#{@executed},#{@errors.to_i},#{@timeouts.to_i},#{@client_tx_bytes},#{@client_tx_msgs},#{@client_rx_bytes},#{@client_rx_msgs},#{@server_tx_bytes},#{@server_tx_msgs},#{@server_rx_bytes},#{@server_rx_msgs}\n"</span>
|
525
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'a'</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">doc</span>) }
|
526
|
-
<span class="ruby-keyword kw">end</span>
|
527
|
-
</pre>
|
528
|
-
</div>
|
529
|
-
</div>
|
530
|
-
</div>
|
531
|
-
|
532
|
-
<div id="method-M000176" class="method-detail">
|
533
|
-
<a name="M000176"></a>
|
534
|
-
|
535
|
-
<div class="method-heading">
|
536
|
-
<a href="#M000176" class="method-signature">
|
537
|
-
<span class="method-name">parse_cli</span><span class="method-args">(argv)</span>
|
538
|
-
</a>
|
539
|
-
</div>
|
540
|
-
|
541
|
-
<div class="method-description">
|
542
|
-
<p><a class="source-toggle" href="#"
|
543
|
-
onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
|
544
|
-
<div class="method-source-code" id="M000176-source">
|
545
|
-
<pre>
|
546
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 340</span>
|
547
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
|
548
|
-
<span class="ruby-ivar">@hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
549
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">empty?</span>
|
550
|
-
<span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">first</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">'-'</span>
|
551
|
-
|
552
|
-
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
|
553
|
-
|
554
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-c'</span>, <span class="ruby-value str">'--csv'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
555
|
-
<span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
556
|
-
<span class="ruby-keyword kw">next</span>
|
557
|
-
<span class="ruby-keyword kw">end</span>
|
558
|
-
|
559
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-d'</span>, <span class="ruby-value str">'--dir'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
560
|
-
<span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
561
|
-
<span class="ruby-keyword kw">next</span>
|
562
|
-
<span class="ruby-keyword kw">end</span>
|
563
|
-
|
564
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-i'</span>, <span class="ruby-value str">'--interfaces'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
565
|
-
<span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
566
|
-
<span class="ruby-keyword kw">next</span>
|
567
|
-
<span class="ruby-keyword kw">end</span>
|
568
|
-
|
569
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-h'</span>, <span class="ruby-value str">'--help'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
570
|
-
<span class="ruby-identifier">help</span>
|
571
|
-
<span class="ruby-identifier">exit</span>
|
572
|
-
<span class="ruby-keyword kw">end</span>
|
573
|
-
|
574
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-m'</span>, <span class="ruby-value str">'--mu_string'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
575
|
-
<span class="ruby-identifier">mu_string</span> = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
576
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mu_string</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.+?):(.+?)@(.*)/</span>
|
577
|
-
<span class="ruby-ivar">@@mu_admin_user</span> = <span class="ruby-identifier">$1</span>
|
578
|
-
<span class="ruby-ivar">@@mu_admin_pass</span> = <span class="ruby-identifier">$2</span>
|
579
|
-
<span class="ruby-ivar">@@mu_ip</span> = <span class="ruby-identifier">$3</span>
|
580
|
-
<span class="ruby-keyword kw">end</span>
|
581
|
-
<span class="ruby-keyword kw">next</span>
|
582
|
-
<span class="ruby-keyword kw">end</span>
|
583
|
-
|
584
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-o'</span>, <span class="ruby-value str">'--output'</span>].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
585
|
-
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>), <span class="ruby-value str">"w"</span>)
|
586
|
-
<span class="ruby-keyword kw">next</span>
|
587
|
-
<span class="ruby-keyword kw">end</span>
|
588
|
-
|
589
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-p'</span>, <span class="ruby-value str">'--pattern'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
590
|
-
<span class="ruby-identifier">patterns</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
591
|
-
<span class="ruby-identifier">pattern_string</span> = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
592
|
-
<span class="ruby-identifier">pstrings</span> = <span class="ruby-identifier">pattern_string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">","</span>)
|
593
|
-
<span class="ruby-identifier">pstrings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">|</span>
|
594
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.+?)-(.+?):(.*)/</span> <span class="ruby-comment cmt"># e.g. 1-10000:60</span>
|
595
|
-
<span class="ruby-identifier">start_vol</span> = <span class="ruby-identifier">$1</span>
|
596
|
-
<span class="ruby-identifier">end_vol</span> = <span class="ruby-identifier">$2</span>
|
597
|
-
<span class="ruby-identifier">duration</span> = <span class="ruby-identifier">$3</span>
|
598
|
-
<span class="ruby-identifier">patterns</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"{\"iterations\":1, \"end\":#{end_vol}, \"start\":#{start_vol}, \"duration\":#{duration} }"</span>
|
599
|
-
<span class="ruby-keyword kw">end</span>
|
600
|
-
<span class="ruby-keyword kw">end</span>
|
601
|
-
<span class="ruby-identifier">ps</span> = <span class="ruby-value str">"{ \"iterations\": 1, \"intervals\": ["</span>
|
602
|
-
<span class="ruby-identifier">patterns</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">|</span>
|
603
|
-
<span class="ruby-identifier">ps</span> = <span class="ruby-identifier">ps</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">+</span> <span class="ruby-value str">","</span>
|
604
|
-
<span class="ruby-keyword kw">end</span>
|
605
|
-
<span class="ruby-identifier">ps</span> = <span class="ruby-identifier">ps</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">ps</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">2</span>] <span class="ruby-comment cmt"># remove final comma</span>
|
606
|
-
<span class="ruby-identifier">ps</span> = <span class="ruby-identifier">ps</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"] }"</span>
|
607
|
-
<span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>] = <span class="ruby-identifier">ps</span>
|
608
|
-
<span class="ruby-keyword kw">next</span>
|
609
|
-
<span class="ruby-keyword kw">end</span>
|
610
|
-
|
611
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-s'</span>, <span class="ruby-value str">'--scenario'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
612
|
-
<span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
|
613
|
-
<span class="ruby-keyword kw">next</span>
|
614
|
-
<span class="ruby-keyword kw">end</span>
|
615
|
-
|
616
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-t'</span>, <span class="ruby-value str">'--test'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
617
|
-
<span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'test'</span>] = <span class="ruby-keyword kw">true</span>
|
618
|
-
<span class="ruby-keyword kw">next</span>
|
619
|
-
<span class="ruby-keyword kw">end</span>
|
620
|
-
|
621
|
-
<span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-v'</span>, <span class="ruby-value str">'--verbose'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
|
622
|
-
<span class="ruby-identifier">$log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
623
|
-
<span class="ruby-keyword kw">next</span>
|
624
|
-
<span class="ruby-keyword kw">end</span>
|
625
|
-
|
626
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Unknown option #{k}"</span>
|
627
|
-
<span class="ruby-keyword kw">end</span>
|
628
|
-
|
629
|
-
<span class="ruby-identifier">hash</span>
|
630
|
-
<span class="ruby-keyword kw">end</span>
|
631
|
-
</pre>
|
632
|
-
</div>
|
633
|
-
</div>
|
634
|
-
</div>
|
635
|
-
|
636
|
-
<div id="method-M000175" class="method-detail">
|
637
|
-
<a name="M000175"></a>
|
638
|
-
|
639
|
-
<div class="method-heading">
|
640
|
-
<a href="#M000175" class="method-signature">
|
641
|
-
<span class="method-name">parse_status</span><span class="method-args">(status)</span>
|
642
|
-
</a>
|
643
|
-
</div>
|
644
|
-
|
645
|
-
<div class="method-description">
|
646
|
-
<p><a class="source-toggle" href="#"
|
647
|
-
onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
|
648
|
-
<div class="method-source-code" id="M000175-source">
|
649
|
-
<pre>
|
650
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 286</span>
|
651
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
|
652
|
-
<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">status</span>.<span class="ruby-identifier">nil?</span>
|
653
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">status</span>), <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
654
|
-
<span class="ruby-ivar">@reported_volume</span> = <span class="ruby-value">0</span>
|
655
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"error"</span>].<span class="ruby-identifier">nil?</span>
|
656
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"error"</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
|
657
|
-
<span class="ruby-ivar">@error</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"error"</span>]
|
658
|
-
<span class="ruby-ivar">@reason</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"reason"</span>]
|
659
|
-
<span class="ruby-comment cmt"># puts "*** Error = #{@error}, reason = #{@reason} ***\n\n"</span>
|
660
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
661
|
-
<span class="ruby-keyword kw">end</span>
|
662
|
-
<span class="ruby-keyword kw">end</span>
|
663
|
-
|
664
|
-
<span class="ruby-ivar">@stats_summary</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"statistics"</span>][<span class="ruby-value str">"summary"</span>]
|
665
|
-
<span class="ruby-ivar">@duration</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">"duration"</span>]
|
666
|
-
<span class="ruby-ivar">@instances</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">"instances"</span>]
|
667
|
-
<span class="ruby-ivar">@total_instances</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">"total"</span>]
|
668
|
-
<span class="ruby-ivar">@executed</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">"executed"</span>]
|
669
|
-
<span class="ruby-ivar">@timeouts</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">"timeouts"</span>]
|
670
|
-
<span class="ruby-ivar">@errors</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">"errors"</span>]
|
671
|
-
<span class="ruby-ivar">@asserts_failed</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">"asserts"</span>][<span class="ruby-value str">"failed"</span>]
|
672
|
-
<span class="ruby-ivar">@server</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">"server"</span>]
|
673
|
-
<span class="ruby-ivar">@server_tx_bytes</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">"tx"</span>][<span class="ruby-value str">"bytes"</span>]
|
674
|
-
<span class="ruby-ivar">@server_tx_msgs</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">"tx"</span>][<span class="ruby-value str">"msgs"</span>]
|
675
|
-
<span class="ruby-ivar">@server_rx_bytes</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">"rx"</span>][<span class="ruby-value str">"bytes"</span>]
|
676
|
-
<span class="ruby-ivar">@server_rx_msgs</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">"rx"</span>][<span class="ruby-value str">"msgs"</span>]
|
677
|
-
<span class="ruby-ivar">@client</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">"client"</span>]
|
678
|
-
<span class="ruby-ivar">@client_tx_bytes</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">"tx"</span>][<span class="ruby-value str">"bytes"</span>]
|
679
|
-
<span class="ruby-ivar">@client_tx_msgs</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">"tx"</span>][<span class="ruby-value str">"msgs"</span>]
|
680
|
-
<span class="ruby-ivar">@client_rx_bytes</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">"rx"</span>][<span class="ruby-value str">"bytes"</span>]
|
681
|
-
<span class="ruby-ivar">@client_rx_msgs</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">"rx"</span>][<span class="ruby-value str">"msgs"</span>]
|
682
|
-
<span class="ruby-ivar">@scenarios</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"statistics"</span>][<span class="ruby-value str">"scenarios"</span>]
|
683
|
-
<span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">scenario</span> <span class="ruby-operator">|</span>
|
684
|
-
<span class="ruby-ivar">@reported_volume</span> = <span class="ruby-ivar">@reported_volume</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scenario</span>[<span class="ruby-value str">"volume"</span>]
|
685
|
-
<span class="ruby-keyword kw">end</span>
|
686
|
-
|
687
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">""</span>
|
688
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"duration: #{format_float(2, @duration)}"</span>
|
689
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"concurrency: #{@reported_volume}"</span>
|
690
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"tests/sec: #{format_float(2, @executed.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
691
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"passed: #{@executed}"</span>
|
692
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"errors: #{@errors}"</span>
|
693
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"timeouts: #{@timeouts}"</span>
|
694
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"client tx bytes/sec #{format_float(2, @client_tx_bytes.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
695
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"client tx msgs/sec #{format_float(2, @client_tx_msgs.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
696
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"client rx bytes/sec #{format_float(2, @client_rx_bytes.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
697
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"client rx msgs/sec #{format_float(2, @client_rx_msgs.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
698
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"server tx bytes/sec #{format_float(2, @server_tx_bytes.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
699
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"server tx msgs/sec #{format_float(2, @server_tx_msgs.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
700
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"server rx bytes/sec #{format_float(2, @server_rx_bytes.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
701
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"server rx msgs/sec #{format_float(2, @server_rx_msgs.to_f / @duration)}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
702
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">""</span>
|
703
|
-
<span class="ruby-keyword kw">end</span>
|
704
|
-
</pre>
|
705
|
-
</div>
|
706
|
-
</div>
|
707
|
-
</div>
|
708
|
-
|
709
|
-
<div id="method-M000174" class="method-detail">
|
710
|
-
<a name="M000174"></a>
|
711
|
-
|
712
|
-
<div class="method-heading">
|
713
|
-
<a href="#M000174" class="method-signature">
|
714
|
-
<span class="method-name">parse_verify_response</span><span class="method-args">(response)</span>
|
715
|
-
</a>
|
716
|
-
</div>
|
717
|
-
|
718
|
-
<div class="method-description">
|
719
|
-
<p><a class="source-toggle" href="#"
|
720
|
-
onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
|
721
|
-
<div class="method-source-code" id="M000174-source">
|
722
|
-
<pre>
|
723
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 262</span>
|
724
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_verify_response</span>(<span class="ruby-identifier">response</span>)
|
725
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment cmt"># || response.empty?</span>
|
726
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"*** error = no response received from /verify ***\n\n"</span>
|
727
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
728
|
-
<span class="ruby-keyword kw">end</span>
|
729
|
-
<span class="ruby-keyword kw">begin</span>
|
730
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">response</span>), <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
731
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">response</span>[<span class="ruby-value str">"status"</span>].<span class="ruby-identifier">nil?</span>
|
732
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"error"</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
|
733
|
-
<span class="ruby-ivar">@error</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"error"</span>]
|
734
|
-
<span class="ruby-ivar">@reason</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"reason"</span>]
|
735
|
-
<span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">response</span>)
|
736
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"*** Error = #{@error}, reason = #{@reason} ***\n\n"</span>
|
737
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
738
|
-
<span class="ruby-keyword kw">end</span>
|
739
|
-
<span class="ruby-keyword kw">end</span>
|
740
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"*** verify: okay ***"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
741
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">"*** verify: okay ***"</span>
|
742
|
-
<span class="ruby-keyword kw">rescue</span>
|
743
|
-
<span class="ruby-comment cmt"># could nbe json parse error</span>
|
744
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
745
|
-
<span class="ruby-keyword kw">end</span>
|
746
|
-
<span class="ruby-keyword kw">end</span>
|
747
|
-
</pre>
|
748
|
-
</div>
|
749
|
-
</div>
|
750
|
-
</div>
|
751
|
-
|
752
|
-
<div id="method-M000168" class="method-detail">
|
753
|
-
<a name="M000168"></a>
|
754
|
-
|
755
|
-
<div class="method-heading">
|
756
|
-
<a href="#M000168" class="method-signature">
|
757
|
-
<span class="method-name">run</span><span class="method-args">(msl)</span>
|
758
|
-
</a>
|
759
|
-
</div>
|
760
|
-
|
761
|
-
<div class="method-description">
|
762
|
-
<p><a class="source-toggle" href="#"
|
763
|
-
onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
|
764
|
-
<div class="method-source-code" id="M000168-source">
|
765
|
-
<pre>
|
766
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 128</span>
|
767
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">msl</span>)
|
768
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">msl</span>)
|
769
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"file not found: #{msl}"</span>
|
770
|
-
<span class="ruby-keyword kw">end</span>
|
771
|
-
|
772
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"musl"</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">msl</span>))
|
773
|
-
|
774
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@testset</span>.<span class="ruby-identifier">empty?</span>
|
775
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@testset</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"/"</span>) <span class="ruby-comment cmt"># assume it is the full path in this case</span>
|
776
|
-
<span class="ruby-identifier">csv_file</span> = <span class="ruby-ivar">@testset</span>
|
777
|
-
<span class="ruby-keyword kw">else</span>
|
778
|
-
<span class="ruby-identifier">csv_file</span> = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">"dir"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@testset</span>
|
779
|
-
<span class="ruby-keyword kw">end</span>
|
780
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"csv"</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">csv_file</span>))
|
781
|
-
<span class="ruby-keyword kw">end</span>
|
782
|
-
|
783
|
-
<span class="ruby-identifier">set_global_hosts</span>
|
784
|
-
<span class="ruby-identifier">all_hosts</span> = <span class="ruby-identifier">get_all_hosts_from_musl</span>(<span class="ruby-identifier">msl</span>)
|
785
|
-
<span class="ruby-ivar">@hosts_config</span> = <span class="ruby-identifier">map_all_hosts_to_json</span>(<span class="ruby-identifier">all_hosts</span>)
|
786
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">"hosts"</span>, <span class="ruby-ivar">@hosts_config</span>)
|
787
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"verifying #{msl} ..."</span>
|
788
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">verify</span>
|
789
|
-
<span class="ruby-comment cmt"># sleep 3</span>
|
790
|
-
<span class="ruby-identifier">v</span> = <span class="ruby-identifier">parse_verify_response</span>(<span class="ruby-identifier">response</span>)
|
791
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
|
792
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"error in verify"</span>
|
793
|
-
<span class="ruby-keyword kw">return</span>
|
794
|
-
<span class="ruby-keyword kw">end</span>
|
795
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@verify_only</span>
|
796
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">v</span>
|
797
|
-
<span class="ruby-keyword kw">return</span>
|
798
|
-
<span class="ruby-keyword kw">end</span>
|
799
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"starting #{msl} ..."</span>
|
800
|
-
<span class="ruby-ivar">@api</span>.<span class="ruby-identifier">start</span>
|
801
|
-
<span class="ruby-identifier">start_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
|
802
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
|
803
|
-
<span class="ruby-identifier">sleep</span> <span class="ruby-value">5</span>
|
804
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
|
805
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
|
806
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>].<span class="ruby-identifier">nil?</span>
|
807
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span>[<span class="ruby-value str">"status"</span>][<span class="ruby-value str">"running"</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
|
808
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"running = #{status["status"]["running"]}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
809
|
-
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
|
810
|
-
<span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">msl</span>)
|
811
|
-
<span class="ruby-keyword kw">return</span>
|
812
|
-
<span class="ruby-keyword kw">else</span>
|
813
|
-
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
|
814
|
-
<span class="ruby-keyword kw">end</span>
|
815
|
-
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># status['status'].nil? ... no bonafide status was returned</span>
|
816
|
-
<span class="ruby-identifier">time_now</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
|
817
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">time_now</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">start_time</span> <span class="ruby-operator">></span> <span class="ruby-value">20</span>
|
818
|
-
<span class="ruby-comment cmt"># puts "\nError: timing out after 20 seconds. Test had failed to start or verify"</span>
|
819
|
-
<span class="ruby-keyword kw">break</span>
|
820
|
-
<span class="ruby-keyword kw">end</span>
|
821
|
-
<span class="ruby-keyword kw">end</span>
|
822
|
-
<span class="ruby-keyword kw">end</span>
|
823
|
-
<span class="ruby-keyword kw">end</span>
|
824
|
-
<span class="ruby-keyword kw">ensure</span>
|
825
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"stopping #{msl} ..."</span>
|
826
|
-
<span class="ruby-keyword kw">end</span>
|
827
|
-
</pre>
|
828
|
-
</div>
|
829
|
-
</div>
|
830
|
-
</div>
|
831
|
-
|
832
|
-
<div id="method-M000169" class="method-detail">
|
833
|
-
<a name="M000169"></a>
|
834
|
-
|
835
|
-
<div class="method-heading">
|
836
|
-
<a href="#M000169" class="method-signature">
|
837
|
-
<span class="method-name">set_global_hosts</span><span class="method-args">()</span>
|
838
|
-
</a>
|
839
|
-
</div>
|
840
|
-
|
841
|
-
<div class="method-description">
|
842
|
-
<p><a class="source-toggle" href="#"
|
843
|
-
onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
|
844
|
-
<div class="method-source-code" id="M000169-source">
|
845
|
-
<pre>
|
846
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 189</span>
|
847
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_global_hosts</span>
|
848
|
-
<span class="ruby-ivar">@hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
849
|
-
<span class="ruby-ivar">@addr_indexes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
850
|
-
<span class="ruby-identifier">hosts</span> = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">"hosts"</span>]
|
851
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">nil?</span>
|
852
|
-
<span class="ruby-identifier">p</span> = <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">","</span>)
|
853
|
-
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">h</span> <span class="ruby-operator">|</span>
|
854
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"-"</span>) <span class="ruby-comment cmt"># b1-1000,b2-1 to indicate addr_count</span>
|
855
|
-
<span class="ruby-identifier">q</span> = <span class="ruby-identifier">h</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"-"</span>)
|
856
|
-
<span class="ruby-ivar">@hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">q</span>[<span class="ruby-value">0</span>]
|
857
|
-
<span class="ruby-ivar">@addr_indexes</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">q</span>[<span class="ruby-value">1</span>]
|
858
|
-
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># default to the 1st addr index</span>
|
859
|
-
<span class="ruby-ivar">@hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">h</span>
|
860
|
-
<span class="ruby-ivar">@addr_indexes</span> <span class="ruby-operator"><<</span> <span class="ruby-value">1</span>
|
861
|
-
<span class="ruby-keyword kw">end</span>
|
862
|
-
<span class="ruby-keyword kw">end</span>
|
863
|
-
<span class="ruby-keyword kw">else</span>
|
864
|
-
<span class="ruby-ivar">@hosts</span> = [<span class="ruby-value str">'b1'</span>,<span class="ruby-value str">'b2'</span>]
|
865
|
-
<span class="ruby-ivar">@addr_indexes</span> = [<span class="ruby-value">1</span>,<span class="ruby-value">1</span>]
|
866
|
-
<span class="ruby-keyword kw">end</span>
|
867
|
-
<span class="ruby-keyword kw">end</span>
|
868
|
-
</pre>
|
869
|
-
</div>
|
870
|
-
</div>
|
871
|
-
</div>
|
872
|
-
|
873
|
-
<div id="method-M000167" class="method-detail">
|
874
|
-
<a name="M000167"></a>
|
875
|
-
|
876
|
-
<div class="method-heading">
|
877
|
-
<a href="#M000167" class="method-signature">
|
878
|
-
<span class="method-name">setup</span><span class="method-args">(argv)</span>
|
879
|
-
</a>
|
880
|
-
</div>
|
881
|
-
|
882
|
-
<div class="method-description">
|
883
|
-
<p><a class="source-toggle" href="#"
|
884
|
-
onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
|
885
|
-
<div class="method-source-code" id="M000167-source">
|
886
|
-
<pre>
|
887
|
-
<span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 98</span>
|
888
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
|
889
|
-
<span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
|
890
|
-
<span class="ruby-ivar">@params</span> = {}
|
891
|
-
|
892
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'test'</span>]
|
893
|
-
<span class="ruby-ivar">@verify_only</span> = <span class="ruby-keyword kw">true</span>
|
894
|
-
<span class="ruby-keyword kw">else</span>
|
895
|
-
<span class="ruby-ivar">@verify_only</span> = <span class="ruby-keyword kw">false</span>
|
896
|
-
<span class="ruby-keyword kw">end</span>
|
897
|
-
|
898
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>]
|
899
|
-
<span class="ruby-ivar">@cmd_line_pattern</span> = <span class="ruby-value str">"{ \"iterations\": 1, \"intervals\": [ {\"iterations\":1, \"end\":100, \"start\":1, \"duration\":20 } ] }"</span>
|
900
|
-
<span class="ruby-keyword kw">else</span>
|
901
|
-
<span class="ruby-ivar">@cmd_line_pattern</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>]
|
902
|
-
<span class="ruby-keyword kw">end</span>
|
903
|
-
|
904
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>]
|
905
|
-
<span class="ruby-ivar">@cmd_line_hosts</span> = <span class="ruby-value str">"b1,b2"</span>
|
906
|
-
<span class="ruby-keyword kw">else</span>
|
907
|
-
<span class="ruby-ivar">@cmd_line_hosts</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>]
|
908
|
-
<span class="ruby-keyword kw">end</span>
|
909
|
-
|
910
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>]
|
911
|
-
<span class="ruby-ivar">@testset</span> = <span class="ruby-value str">""</span>
|
912
|
-
<span class="ruby-keyword kw">else</span>
|
913
|
-
<span class="ruby-ivar">@testset</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>]
|
914
|
-
<span class="ruby-keyword kw">end</span>
|
915
|
-
|
916
|
-
<span class="ruby-keyword kw">end</span>
|
917
|
-
</pre>
|
918
|
-
</div>
|
919
223
|
</div>
|
920
224
|
</div>
|
921
225
|
|