mu 5.7.2.3 → 5.7.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mu.rb +1 -1
- data/lib/mu/api/netconfig.rb +5 -3
- data/lib/mu/api/scale.rb +16 -1
- data/lib/mu/command/cmd_netconfig.rb +1 -1
- data/lib/mu/command/cmd_runscale.rb +2 -2
- data/rdoc/classes/Mu.html +24 -142
- data/rdoc/classes/Mu.src/M000001.html +39 -0
- data/rdoc/classes/Mu.src/M000002.html +29 -0
- data/rdoc/classes/Mu.src/M000053.html +39 -0
- data/rdoc/classes/Mu.src/M000054.html +29 -0
- data/rdoc/classes/Mu/Client.html +26 -77
- data/rdoc/classes/Mu/Client.src/M000212.html +24 -0
- data/rdoc/classes/Mu/Client.src/M000213.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000214.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000215.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000216.html +18 -0
- data/rdoc/classes/Mu/Command.html +1 -92
- data/rdoc/classes/Mu/Command/API.html +75 -237
- data/rdoc/classes/Mu/Command/API.src/M000130.html +22 -0
- data/rdoc/classes/Mu/Command/API.src/M000131.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000132.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000133.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000134.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000135.html +17 -0
- data/rdoc/classes/Mu/Command/API.src/M000136.html +23 -0
- data/rdoc/classes/Mu/Command/API.src/M000137.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000138.html +29 -0
- data/rdoc/classes/Mu/Command/API.src/M000139.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000140.html +22 -0
- data/rdoc/classes/Mu/Command/API.src/M000141.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000142.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000143.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000144.html +17 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.html +22 -718
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000145.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000146.html +30 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000147.html +39 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000148.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.html +32 -274
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000200.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000201.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000202.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000203.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000204.html +20 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000205.html +20 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.html +126 -656
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000101.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000102.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000103.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000104.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000105.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000106.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000107.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000108.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000109.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000110.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000111.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000112.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000113.html +43 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000114.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000115.html +38 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000116.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000117.html +38 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000118.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000119.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000120.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000121.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000122.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.html +31 -244
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000206.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000207.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000208.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000209.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000210.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000211.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.html +86 -527
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000164.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000165.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000166.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000167.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000168.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000169.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000170.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000171.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000172.html +28 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000173.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000174.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000175.html +28 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000176.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000177.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000178.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000179.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000180.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +61 -405
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000152.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000153.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000154.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000155.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000156.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000157.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000158.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000159.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000160.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000161.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000162.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000163.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +17 -766
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000003.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000004.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000005.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000149.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000150.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000151.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.html +11 -344
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000128.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000129.html +144 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.html +11 -436
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000198.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000199.html +200 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.html +86 -514
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000181.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000182.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000183.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000184.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000185.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000186.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000187.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000188.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000189.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000190.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000191.html +29 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000192.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000193.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000194.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000195.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000196.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000197.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_system.html +21 -211
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000097.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000098.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000099.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000100.html +21 -0
- data/rdoc/classes/Mu/Command/Curl.html +19 -361
- data/rdoc/classes/Mu/Command/Curl.src/M000124.html +18 -0
- data/rdoc/classes/Mu/Command/Curl.src/M000125.html +21 -0
- data/rdoc/classes/Mu/Command/Curl.src/M000126.html +26 -0
- data/rdoc/classes/Mu/Command/Help.html +5 -34
- data/rdoc/classes/Mu/Command/Help.src/M000123.html +38 -0
- data/rdoc/classes/Mu/Curl/Error.html +5 -14
- data/rdoc/classes/Mu/Curl/Error.src/M000063.html +18 -0
- data/rdoc/classes/Mu/Curl/Error/Authorize.html +5 -18
- data/rdoc/classes/Mu/Curl/Error/Authorize.src/M000065.html +22 -0
- data/rdoc/classes/Mu/Curl/Error/Connect.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Connect.src/M000068.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Region.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Region.src/M000066.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Status.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Status.src/M000064.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Timeout.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Timeout.src/M000067.html +19 -0
- data/rdoc/classes/Mu/Curl/Verify.html +20 -95
- data/rdoc/classes/Mu/Curl/Verify.src/M000055.html +29 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000056.html +18 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000057.html +46 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000058.html +18 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.html +10 -50
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000061.html +35 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000062.html +23 -0
- data/rdoc/classes/Mu/Curl/Verify/Response.html +5 -20
- data/rdoc/classes/Mu/Curl/Verify/Response.src/M000059.html +24 -0
- data/rdoc/classes/Mu/Curl/Verify/Result.html +5 -21
- data/rdoc/classes/Mu/Curl/Verify/Result.src/M000060.html +25 -0
- data/rdoc/classes/Mu/Ddt.html +132 -436
- data/rdoc/classes/Mu/Ddt.src/M000242.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000243.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000244.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000245.html +23 -0
- data/rdoc/classes/Mu/Ddt.src/M000246.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000247.html +32 -0
- data/rdoc/classes/Mu/Ddt.src/M000248.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000249.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000250.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000251.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000252.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000253.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000254.html +25 -0
- data/rdoc/classes/Mu/Ddt.src/M000255.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000256.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000257.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000258.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000259.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000260.html +35 -0
- data/rdoc/classes/Mu/Ddt.src/M000261.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000262.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000263.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000264.html +22 -0
- data/rdoc/classes/Mu/Homepage.html +34 -105
- data/rdoc/classes/Mu/Homepage.src/M000236.html +25 -0
- data/rdoc/classes/Mu/Homepage.src/M000237.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000238.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000239.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000240.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000241.html +20 -0
- data/rdoc/classes/Mu/HttpHelper.html +68 -314
- data/rdoc/classes/Mu/HttpHelper.src/M000069.html +22 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000070.html +25 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000071.html +34 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000072.html +39 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000073.html +36 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000074.html +34 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000075.html +46 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000076.html +24 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000077.html +19 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000078.html +33 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000079.html +29 -0
- data/rdoc/classes/Mu/Muapi.html +92 -359
- data/rdoc/classes/Mu/Muapi.src/M000080.html +25 -0
- data/rdoc/classes/Mu/Muapi.src/M000081.html +27 -0
- data/rdoc/classes/Mu/Muapi.src/M000082.html +24 -0
- data/rdoc/classes/Mu/Muapi.src/M000083.html +27 -0
- data/rdoc/classes/Mu/Muapi.src/M000084.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000085.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000086.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000087.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000088.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000089.html +22 -0
- data/rdoc/classes/Mu/Muapi.src/M000090.html +21 -0
- data/rdoc/classes/Mu/Muapi.src/M000091.html +19 -0
- data/rdoc/classes/Mu/Muapi.src/M000092.html +18 -0
- data/rdoc/classes/Mu/Muapi.src/M000093.html +18 -0
- data/rdoc/classes/Mu/Muapi.src/M000094.html +36 -0
- data/rdoc/classes/Mu/Muapi.src/M000095.html +34 -0
- data/rdoc/classes/Mu/Muapi.src/M000096.html +34 -0
- data/rdoc/classes/Mu/Netconfig.html +79 -382
- data/rdoc/classes/Mu/Netconfig.src/M000217.html +25 -0
- data/rdoc/classes/Mu/Netconfig.src/M000218.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000219.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000220.html +24 -0
- data/rdoc/classes/Mu/Netconfig.src/M000221.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000222.html +36 -0
- data/rdoc/classes/Mu/Netconfig.src/M000223.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000224.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000225.html +37 -0
- data/rdoc/classes/Mu/Netconfig.src/M000226.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000227.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000228.html +26 -0
- data/rdoc/classes/Mu/Netconfig.src/M000229.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000230.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000231.html +19 -0
- data/rdoc/classes/Mu/Scale.html +133 -385
- data/rdoc/classes/Mu/Scale.src/M000006.html +47 -0
- data/rdoc/classes/Mu/Scale.src/M000007.html +27 -0
- data/rdoc/classes/Mu/Scale.src/M000008.html +22 -0
- data/rdoc/classes/Mu/Scale.src/M000009.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000010.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000011.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000012.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000013.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000014.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000015.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000016.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000017.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000018.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000019.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000020.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000021.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000022.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000023.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000024.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000025.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000265.html +46 -0
- data/rdoc/classes/Mu/Scale.src/M000266.html +27 -0
- data/rdoc/classes/Mu/Scale.src/M000267.html +22 -0
- data/rdoc/classes/Mu/Scale.src/M000268.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000269.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000270.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000271.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000272.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000273.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000274.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000275.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000276.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000277.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000278.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000279.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000280.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000281.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000282.html +20 -0
- data/rdoc/classes/Mu/System.html +23 -72
- data/rdoc/classes/Mu/System.src/M000232.html +25 -0
- data/rdoc/classes/Mu/System.src/M000233.html +20 -0
- data/rdoc/classes/Mu/System.src/M000234.html +20 -0
- data/rdoc/classes/Mu/System.src/M000235.html +20 -0
- data/rdoc/classes/Object.html +5 -14
- data/rdoc/classes/Object.src/M000052.html +18 -0
- data/rdoc/classes/TCTestMu.html +254 -1099
- data/rdoc/classes/TCTestMu.src/M000001.html +24 -0
- data/rdoc/classes/TCTestMu.src/M000002.html +18 -0
- data/rdoc/classes/TCTestMu.src/M000003.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000004.html +33 -0
- data/rdoc/classes/TCTestMu.src/M000005.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000006.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000007.html +26 -0
- data/rdoc/classes/TCTestMu.src/M000008.html +29 -0
- data/rdoc/classes/TCTestMu.src/M000009.html +39 -0
- data/rdoc/classes/TCTestMu.src/M000010.html +38 -0
- data/rdoc/classes/TCTestMu.src/M000011.html +38 -0
- data/rdoc/classes/TCTestMu.src/M000012.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000013.html +25 -0
- data/rdoc/classes/TCTestMu.src/M000014.html +25 -0
- data/rdoc/classes/TCTestMu.src/M000015.html +33 -0
- data/rdoc/classes/TCTestMu.src/M000016.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000017.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000018.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000019.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000020.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000021.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000022.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000023.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000024.html +44 -0
- data/rdoc/classes/TCTestMu.src/M000025.html +53 -0
- data/rdoc/classes/TCTestMu.src/M000026.html +22 -0
- data/rdoc/classes/TCTestMu.src/M000027.html +49 -0
- data/rdoc/classes/TCTestMu.src/M000028.html +40 -0
- data/rdoc/classes/TCTestMu.src/M000029.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000030.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000031.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000032.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000033.html +27 -0
- data/rdoc/classes/TCTestMu.src/M000034.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000035.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000036.html +41 -0
- data/rdoc/classes/TCTestMu.src/M000037.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000038.html +24 -0
- data/rdoc/classes/TCTestMu.src/M000039.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000040.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000041.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000042.html +26 -0
- data/rdoc/classes/TCTestMu.src/M000043.html +28 -0
- data/rdoc/classes/TCTestMu.src/M000044.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000045.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000046.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000047.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000048.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000049.html +22 -0
- data/rdoc/classes/TCTestMu.src/M000050.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000051.html +35 -0
- data/rdoc/created.rid +1 -1
- data/rdoc/files/lib/mu/api/ddt_rb.html +1 -1
- data/rdoc/files/lib/mu/api/homepage_rb.html +1 -1
- data/rdoc/files/lib/mu/api/muapi_rb.html +1 -1
- data/rdoc/files/lib/mu/api/netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/api/scale_rb.html +1 -1
- data/rdoc/files/lib/mu/api/system_rb.html +1 -1
- data/rdoc/files/lib/mu/client_rb.html +1 -1
- data/rdoc/files/lib/mu/command/api_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_cli_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +4 -5
- data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +3 -4
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +5 -4
- data/rdoc/files/lib/mu/command/cmd_scale_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_system_rb.html +1 -1
- data/rdoc/files/lib/mu/command/curl_rb.html +1 -1
- data/rdoc/files/lib/mu/command/help_rb.html +1 -1
- data/rdoc/files/lib/mu/command_rb.html +1 -1
- data/rdoc/files/lib/mu/curl/error_rb.html +1 -1
- data/rdoc/files/lib/mu/curl/verify_rb.html +1 -1
- data/rdoc/files/lib/mu/http_helper_rb.html +1 -1
- data/rdoc/files/lib/mu_rb.html +1 -1
- data/rdoc/files/test/tc_test_mu_rb.html +1 -1
- data/rdoc/fr_class_index.html +0 -38
- data/rdoc/fr_file_index.html +0 -26
- data/rdoc/fr_method_index.html +25 -348
- data/rdoc/index.html +3 -3
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +156 -0
- data/test/tc_test_mu.rb +1 -1
- metadata +314 -8
- data/Mu_Gem.html +0 -1591
|
@@ -88,23 +88,21 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
101
|
-
<a href="#
|
|
102
|
-
<a href="#
|
|
103
|
-
<a href="#
|
|
104
|
-
<a href="#
|
|
105
|
-
<a href="#
|
|
106
|
-
<a href="#M000292">restore_routes</a>
|
|
107
|
-
<a href="#M000293">save</a>
|
|
91
|
+
<a href="#M000223">clear_hosts</a>
|
|
92
|
+
<a href="#M000226">clear_interface</a>
|
|
93
|
+
<a href="#M000229">clear_routes</a>
|
|
94
|
+
<a href="#M000227">clear_vlans</a>
|
|
95
|
+
<a href="#M000220">create</a>
|
|
96
|
+
<a href="#M000221">delete</a>
|
|
97
|
+
<a href="#M000218">get</a>
|
|
98
|
+
<a href="#M000219">modify</a>
|
|
99
|
+
<a href="#M000217">new</a>
|
|
100
|
+
<a href="#M000225">resolve_hosts</a>
|
|
101
|
+
<a href="#M000222">restore</a>
|
|
102
|
+
<a href="#M000224">restore_hosts</a>
|
|
103
|
+
<a href="#M000228">restore_interfaces</a>
|
|
104
|
+
<a href="#M000230">restore_routes</a>
|
|
105
|
+
<a href="#M000231">save</a>
|
|
108
106
|
</div>
|
|
109
107
|
</div>
|
|
110
108
|
|
|
@@ -116,7 +114,7 @@
|
|
|
116
114
|
<h3 class="section-bar">Included Modules</h3>
|
|
117
115
|
|
|
118
116
|
<div id="includes-list">
|
|
119
|
-
<span class="include-name"
|
|
117
|
+
<span class="include-name">Helper</span>
|
|
120
118
|
</div>
|
|
121
119
|
</div>
|
|
122
120
|
|
|
@@ -176,43 +174,28 @@
|
|
|
176
174
|
<div id="methods">
|
|
177
175
|
<h3 class="section-bar">Public Class methods</h3>
|
|
178
176
|
|
|
179
|
-
<div id="method-
|
|
180
|
-
<a name="
|
|
177
|
+
<div id="method-M000217" class="method-detail">
|
|
178
|
+
<a name="M000217"></a>
|
|
181
179
|
|
|
182
180
|
<div class="method-heading">
|
|
183
|
-
<a href="
|
|
181
|
+
<a href="Netconfig.src/M000217.html" target="Code" class="method-signature"
|
|
182
|
+
onclick="popupCode('Netconfig.src/M000217.html');return false;">
|
|
184
183
|
<span class="method-name">new</span><span class="method-args">(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])</span>
|
|
185
184
|
</a>
|
|
186
185
|
</div>
|
|
187
186
|
|
|
188
187
|
<div class="method-description">
|
|
189
|
-
<p><a class="source-toggle" href="#"
|
|
190
|
-
onclick="toggleCode('M000279-source');return false;">[Source]</a></p>
|
|
191
|
-
<div class="method-source-code" id="M000279-source">
|
|
192
|
-
<pre>
|
|
193
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 7</span>
|
|
194
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_IP'</span>], <span class="ruby-identifier">username</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_ADMIN_USER'</span>], <span class="ruby-identifier">password</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_ADMIN_PASS'</span>])
|
|
195
|
-
<span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
196
|
-
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
197
|
-
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
198
|
-
<span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">"/restlet/netconfig/"</span>
|
|
199
|
-
<span class="ruby-ivar">@response</span> = <span class="ruby-keyword kw">nil</span>
|
|
200
|
-
<span class="ruby-ivar">@http</span> = <span class="ruby-constant">HttpHelper</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@username</span>, <span class="ruby-ivar">@password</span>, <span class="ruby-ivar">@docroot</span>)
|
|
201
|
-
<span class="ruby-ivar">@element</span> = <span class="ruby-value str">""</span> <span class="ruby-comment cmt"># sticky variable will hold a default element, the last element specified</span>
|
|
202
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Created Netconfig API object to :#{@host}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
203
|
-
<span class="ruby-keyword kw">end</span>
|
|
204
|
-
</pre>
|
|
205
|
-
</div>
|
|
206
188
|
</div>
|
|
207
189
|
</div>
|
|
208
190
|
|
|
209
191
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
210
192
|
|
|
211
|
-
<div id="method-
|
|
212
|
-
<a name="
|
|
193
|
+
<div id="method-M000223" class="method-detail">
|
|
194
|
+
<a name="M000223"></a>
|
|
213
195
|
|
|
214
196
|
<div class="method-heading">
|
|
215
|
-
<a href="
|
|
197
|
+
<a href="Netconfig.src/M000223.html" target="Code" class="method-signature"
|
|
198
|
+
onclick="popupCode('Netconfig.src/M000223.html');return false;">
|
|
216
199
|
<span class="method-name">clear_hosts</span><span class="method-args">()</span>
|
|
217
200
|
</a>
|
|
218
201
|
</div>
|
|
@@ -221,28 +204,15 @@
|
|
|
221
204
|
<p>
|
|
222
205
|
clears the network hosts
|
|
223
206
|
</p>
|
|
224
|
-
<p><a class="source-toggle" href="#"
|
|
225
|
-
onclick="toggleCode('M000285-source');return false;">[Source]</a></p>
|
|
226
|
-
<div class="method-source-code" id="M000285-source">
|
|
227
|
-
<pre>
|
|
228
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 92</span>
|
|
229
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_hosts</span>
|
|
230
|
-
<span class="ruby-identifier">h</span> = <span class="ruby-identifier">get</span>(<span class="ruby-value str">"hosts"</span>)
|
|
231
|
-
<span class="ruby-identifier">h</span>[<span class="ruby-value str">"hosts"</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>
|
|
232
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Clear host: #{h['name']}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
233
|
-
<span class="ruby-identifier">delete</span>(<span class="ruby-node">"hosts/#{h['name']}"</span>)
|
|
234
|
-
<span class="ruby-keyword kw">end</span>
|
|
235
|
-
<span class="ruby-keyword kw">end</span>
|
|
236
|
-
</pre>
|
|
237
|
-
</div>
|
|
238
207
|
</div>
|
|
239
208
|
</div>
|
|
240
209
|
|
|
241
|
-
<div id="method-
|
|
242
|
-
<a name="
|
|
210
|
+
<div id="method-M000226" class="method-detail">
|
|
211
|
+
<a name="M000226"></a>
|
|
243
212
|
|
|
244
213
|
<div class="method-heading">
|
|
245
|
-
<a href="
|
|
214
|
+
<a href="Netconfig.src/M000226.html" target="Code" class="method-signature"
|
|
215
|
+
onclick="popupCode('Netconfig.src/M000226.html');return false;">
|
|
246
216
|
<span class="method-name">clear_interface</span><span class="method-args">(interface)</span>
|
|
247
217
|
</a>
|
|
248
218
|
</div>
|
|
@@ -254,27 +224,15 @@ clears a network interface
|
|
|
254
224
|
<pre>
|
|
255
225
|
* interface = the name of the interface to clear
|
|
256
226
|
</pre>
|
|
257
|
-
<p><a class="source-toggle" href="#"
|
|
258
|
-
onclick="toggleCode('M000288-source');return false;">[Source]</a></p>
|
|
259
|
-
<div class="method-source-code" id="M000288-source">
|
|
260
|
-
<pre>
|
|
261
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 137</span>
|
|
262
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_interface</span>(<span class="ruby-identifier">interface</span>)
|
|
263
|
-
<span class="ruby-identifier">interface</span> = <span class="ruby-identifier">interface</span>
|
|
264
|
-
<span class="ruby-identifier">json</span> = { <span class="ruby-value str">"v4_addrs"</span>=<span class="ruby-operator">></span>[], <span class="ruby-value str">"v4_mask"</span>=<span class="ruby-operator">></span><span class="ruby-value str">""</span>, <span class="ruby-value str">"v4_dhcp"</span>=<span class="ruby-operator">></span><span class="ruby-keyword kw">false</span>,
|
|
265
|
-
<span class="ruby-value str">"v6_global_addrs"</span>=<span class="ruby-operator">></span>[], <span class="ruby-value str">"v6_global_mask"</span>=<span class="ruby-operator">></span><span class="ruby-value str">""</span>}
|
|
266
|
-
<span class="ruby-identifier">modify</span> <span class="ruby-identifier">json</span>,<span class="ruby-node">"interfaces/#{interface}"</span>
|
|
267
|
-
<span class="ruby-keyword kw">end</span>
|
|
268
|
-
</pre>
|
|
269
|
-
</div>
|
|
270
227
|
</div>
|
|
271
228
|
</div>
|
|
272
229
|
|
|
273
|
-
<div id="method-
|
|
274
|
-
<a name="
|
|
230
|
+
<div id="method-M000229" class="method-detail">
|
|
231
|
+
<a name="M000229"></a>
|
|
275
232
|
|
|
276
233
|
<div class="method-heading">
|
|
277
|
-
<a href="
|
|
234
|
+
<a href="Netconfig.src/M000229.html" target="Code" class="method-signature"
|
|
235
|
+
onclick="popupCode('Netconfig.src/M000229.html');return false;">
|
|
278
236
|
<span class="method-name">clear_routes</span><span class="method-args">()</span>
|
|
279
237
|
</a>
|
|
280
238
|
</div>
|
|
@@ -283,29 +241,15 @@ clears a network interface
|
|
|
283
241
|
<p>
|
|
284
242
|
clears network routes
|
|
285
243
|
</p>
|
|
286
|
-
<p><a class="source-toggle" href="#"
|
|
287
|
-
onclick="toggleCode('M000291-source');return false;">[Source]</a></p>
|
|
288
|
-
<div class="method-source-code" id="M000291-source">
|
|
289
|
-
<pre>
|
|
290
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 169</span>
|
|
291
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_routes</span>
|
|
292
|
-
<span class="ruby-identifier">routes</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"routes"</span>
|
|
293
|
-
<span class="ruby-identifier">routes</span>[<span class="ruby-value str">"routes"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
|
|
294
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span>[<span class="ruby-value str">'readonly'</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
|
|
295
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Clear route: #{r['dst']}-#{r['gateway']}-#{r['interface_display_name'].downcase}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
296
|
-
<span class="ruby-identifier">delete</span> <span class="ruby-node">"routes/#{r['dst']}-#{r['gateway']}-#{r['interface_display_name'].downcase}"</span>
|
|
297
|
-
<span class="ruby-keyword kw">end</span>
|
|
298
|
-
<span class="ruby-keyword kw">end</span>
|
|
299
|
-
</pre>
|
|
300
|
-
</div>
|
|
301
244
|
</div>
|
|
302
245
|
</div>
|
|
303
246
|
|
|
304
|
-
<div id="method-
|
|
305
|
-
<a name="
|
|
247
|
+
<div id="method-M000227" class="method-detail">
|
|
248
|
+
<a name="M000227"></a>
|
|
306
249
|
|
|
307
250
|
<div class="method-heading">
|
|
308
|
-
<a href="
|
|
251
|
+
<a href="Netconfig.src/M000227.html" target="Code" class="method-signature"
|
|
252
|
+
onclick="popupCode('Netconfig.src/M000227.html');return false;">
|
|
309
253
|
<span class="method-name">clear_vlans</span><span class="method-args">()</span>
|
|
310
254
|
</a>
|
|
311
255
|
</div>
|
|
@@ -314,29 +258,15 @@ clears network routes
|
|
|
314
258
|
<p>
|
|
315
259
|
clears all network vlans
|
|
316
260
|
</p>
|
|
317
|
-
<p><a class="source-toggle" href="#"
|
|
318
|
-
onclick="toggleCode('M000289-source');return false;">[Source]</a></p>
|
|
319
|
-
<div class="method-source-code" id="M000289-source">
|
|
320
|
-
<pre>
|
|
321
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 145</span>
|
|
322
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_vlans</span>
|
|
323
|
-
<span class="ruby-identifier">i</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"interfaces"</span>
|
|
324
|
-
<span class="ruby-identifier">i</span>[<span class="ruby-value str">"interfaces"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
325
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span>[<span class="ruby-value str">'vlan'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">""</span>
|
|
326
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Clear vlan: #{i['name']}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
327
|
-
<span class="ruby-identifier">delete</span> <span class="ruby-node">"interfaces/#{i['name']}"</span>
|
|
328
|
-
<span class="ruby-keyword kw">end</span>
|
|
329
|
-
<span class="ruby-keyword kw">end</span>
|
|
330
|
-
</pre>
|
|
331
|
-
</div>
|
|
332
261
|
</div>
|
|
333
262
|
</div>
|
|
334
263
|
|
|
335
|
-
<div id="method-
|
|
336
|
-
<a name="
|
|
264
|
+
<div id="method-M000220" class="method-detail">
|
|
265
|
+
<a name="M000220"></a>
|
|
337
266
|
|
|
338
267
|
<div class="method-heading">
|
|
339
|
-
<a href="
|
|
268
|
+
<a href="Netconfig.src/M000220.html" target="Code" class="method-signature"
|
|
269
|
+
onclick="popupCode('Netconfig.src/M000220.html');return false;">
|
|
340
270
|
<span class="method-name">create</span><span class="method-args">(json, e)</span>
|
|
341
271
|
</a>
|
|
342
272
|
</div>
|
|
@@ -349,30 +279,15 @@ POST method to add a network element
|
|
|
349
279
|
* json = the json string containing the element values
|
|
350
280
|
* e = the element to create (interfaces|hosts|routes)
|
|
351
281
|
</pre>
|
|
352
|
-
<p><a class="source-toggle" href="#"
|
|
353
|
-
onclick="toggleCode('M000282-source');return false;">[Source]</a></p>
|
|
354
|
-
<div class="method-source-code" id="M000282-source">
|
|
355
|
-
<pre>
|
|
356
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 48</span>
|
|
357
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">json</span>, <span class="ruby-identifier">e</span>)
|
|
358
|
-
<span class="ruby-identifier">jstring</span> = <span class="ruby-identifier">json</span>
|
|
359
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">json</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
|
360
|
-
<span class="ruby-identifier">jstring</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">generate</span> <span class="ruby-identifier">json</span>
|
|
361
|
-
<span class="ruby-keyword kw">end</span>
|
|
362
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">jstring</span>)
|
|
363
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
364
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
365
|
-
<span class="ruby-keyword kw">end</span>
|
|
366
|
-
</pre>
|
|
367
|
-
</div>
|
|
368
282
|
</div>
|
|
369
283
|
</div>
|
|
370
284
|
|
|
371
|
-
<div id="method-
|
|
372
|
-
<a name="
|
|
285
|
+
<div id="method-M000221" class="method-detail">
|
|
286
|
+
<a name="M000221"></a>
|
|
373
287
|
|
|
374
288
|
<div class="method-heading">
|
|
375
|
-
<a href="
|
|
289
|
+
<a href="Netconfig.src/M000221.html" target="Code" class="method-signature"
|
|
290
|
+
onclick="popupCode('Netconfig.src/M000221.html');return false;">
|
|
376
291
|
<span class="method-name">delete</span><span class="method-args">(e)</span>
|
|
377
292
|
</a>
|
|
378
293
|
</div>
|
|
@@ -384,92 +299,58 @@ deletes the specified element
|
|
|
384
299
|
<pre>
|
|
385
300
|
* e = the element to delete
|
|
386
301
|
</pre>
|
|
387
|
-
<p><a class="source-toggle" href="#"
|
|
388
|
-
onclick="toggleCode('M000283-source');return false;">[Source]</a></p>
|
|
389
|
-
<div class="method-source-code" id="M000283-source">
|
|
390
|
-
<pre>
|
|
391
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 60</span>
|
|
392
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
393
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
394
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
395
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
396
|
-
<span class="ruby-keyword kw">end</span>
|
|
397
|
-
</pre>
|
|
398
|
-
</div>
|
|
399
302
|
</div>
|
|
400
303
|
</div>
|
|
401
304
|
|
|
402
|
-
<div id="method-
|
|
403
|
-
<a name="
|
|
305
|
+
<div id="method-M000218" class="method-detail">
|
|
306
|
+
<a name="M000218"></a>
|
|
404
307
|
|
|
405
308
|
<div class="method-heading">
|
|
406
|
-
<a href="
|
|
309
|
+
<a href="Netconfig.src/M000218.html" target="Code" class="method-signature"
|
|
310
|
+
onclick="popupCode('Netconfig.src/M000218.html');return false;">
|
|
407
311
|
<span class="method-name">get</span><span class="method-args">(e)</span>
|
|
408
312
|
</a>
|
|
409
313
|
</div>
|
|
410
314
|
|
|
411
315
|
<div class="method-description">
|
|
412
316
|
<p>
|
|
413
|
-
<a href="Netconfig.html#
|
|
317
|
+
<a href="Netconfig.html#M000218">get</a> - with no params, returns the
|
|
414
318
|
entire netconfig json object
|
|
415
319
|
</p>
|
|
416
320
|
<pre>
|
|
417
321
|
* e = the element to retrieve (interfaces|hosts|routes, interfaces/a1 ...)
|
|
418
322
|
</pre>
|
|
419
|
-
<p><a class="source-toggle" href="#"
|
|
420
|
-
onclick="toggleCode('M000280-source');return false;">[Source]</a></p>
|
|
421
|
-
<div class="method-source-code" id="M000280-source">
|
|
422
|
-
<pre>
|
|
423
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 20</span>
|
|
424
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">e</span>)
|
|
425
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get_json</span>(<span class="ruby-identifier">e</span>)
|
|
426
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
427
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
428
|
-
<span class="ruby-keyword kw">end</span>
|
|
429
|
-
</pre>
|
|
430
|
-
</div>
|
|
431
323
|
</div>
|
|
432
324
|
</div>
|
|
433
325
|
|
|
434
|
-
<div id="method-
|
|
435
|
-
<a name="
|
|
326
|
+
<div id="method-M000219" class="method-detail">
|
|
327
|
+
<a name="M000219"></a>
|
|
436
328
|
|
|
437
329
|
<div class="method-heading">
|
|
438
|
-
<a href="
|
|
330
|
+
<a href="Netconfig.src/M000219.html" target="Code" class="method-signature"
|
|
331
|
+
onclick="popupCode('Netconfig.src/M000219.html');return false;">
|
|
439
332
|
<span class="method-name">modify</span><span class="method-args">(json, e)</span>
|
|
440
333
|
</a>
|
|
441
334
|
</div>
|
|
442
335
|
|
|
443
336
|
<div class="method-description">
|
|
444
337
|
<p>
|
|
445
|
-
PUT to <a href="Netconfig.html#
|
|
338
|
+
PUT to <a href="Netconfig.html#M000219">modify</a> netconfig element(s) to
|
|
446
339
|
json values
|
|
447
340
|
</p>
|
|
448
341
|
<pre>
|
|
449
342
|
* json = the json string containing the modified values
|
|
450
343
|
* e = the element to modify (interfaces|hosts|routes)
|
|
451
344
|
</pre>
|
|
452
|
-
<p><a class="source-toggle" href="#"
|
|
453
|
-
onclick="toggleCode('M000281-source');return false;">[Source]</a></p>
|
|
454
|
-
<div class="method-source-code" id="M000281-source">
|
|
455
|
-
<pre>
|
|
456
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 29</span>
|
|
457
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">modify</span>(<span class="ruby-identifier">json</span>, <span class="ruby-identifier">e</span>)
|
|
458
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">do_modify</span>(<span class="ruby-identifier">json</span>, <span class="ruby-identifier">e</span>)
|
|
459
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
460
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
461
|
-
??
|
|
462
|
-
<span class="ruby-keyword kw">end</span>
|
|
463
|
-
</pre>
|
|
464
|
-
</div>
|
|
465
345
|
</div>
|
|
466
346
|
</div>
|
|
467
347
|
|
|
468
|
-
<div id="method-
|
|
469
|
-
<a name="
|
|
348
|
+
<div id="method-M000225" class="method-detail">
|
|
349
|
+
<a name="M000225"></a>
|
|
470
350
|
|
|
471
351
|
<div class="method-heading">
|
|
472
|
-
<a href="
|
|
352
|
+
<a href="Netconfig.src/M000225.html" target="Code" class="method-signature"
|
|
353
|
+
onclick="popupCode('Netconfig.src/M000225.html');return false;">
|
|
473
354
|
<span class="method-name">resolve_hosts</span><span class="method-args">(name=nil)</span>
|
|
474
355
|
</a>
|
|
475
356
|
</div>
|
|
@@ -477,49 +358,21 @@ json values
|
|
|
477
358
|
<div class="method-description">
|
|
478
359
|
<p>
|
|
479
360
|
use Dns to update host ip addresses. A <a
|
|
480
|
-
href="Netconfig.html#
|
|
361
|
+
href="Netconfig.html#M000217">new</a> Host is added if not present when the
|
|
481
362
|
name is provided as argument
|
|
482
363
|
</p>
|
|
483
364
|
<pre>
|
|
484
365
|
* name = the name of the host to resolve
|
|
485
366
|
</pre>
|
|
486
|
-
<p><a class="source-toggle" href="#"
|
|
487
|
-
onclick="toggleCode('M000287-source');return false;">[Source]</a></p>
|
|
488
|
-
<div class="method-source-code" id="M000287-source">
|
|
489
|
-
<pre>
|
|
490
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 112</span>
|
|
491
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolve_hosts</span>(<span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>)
|
|
492
|
-
<span class="ruby-identifier">hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
|
493
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span>
|
|
494
|
-
<span class="ruby-identifier">hst</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"hosts"</span>
|
|
495
|
-
<span class="ruby-identifier">hst</span>[<span class="ruby-value str">"hosts"</span>].<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">h</span>[<span class="ruby-value str">"name"</span>]}
|
|
496
|
-
<span class="ruby-keyword kw">else</span>
|
|
497
|
-
<span class="ruby-identifier">hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">name</span>
|
|
498
|
-
<span class="ruby-keyword kw">end</span>
|
|
499
|
-
<span class="ruby-identifier">hosts</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>
|
|
500
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"resolve host: #{h}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
501
|
-
<span class="ruby-identifier">v4_addr</span> = <span class="ruby-constant">Socket</span><span class="ruby-operator">::</span><span class="ruby-identifier">gethostbyname</span>(<span class="ruby-identifier">h</span>)[<span class="ruby-value">3</span>].<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"CCCC"</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">"."</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
|
502
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v4_addr</span>.<span class="ruby-identifier">nil?</span>
|
|
503
|
-
<span class="ruby-identifier">json</span> = <span class="ruby-identifier">get</span> <span class="ruby-node">"hosts/#{h}"</span>
|
|
504
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">json</span>[<span class="ruby-value str">"name"</span>].<span class="ruby-identifier">nil?</span>
|
|
505
|
-
<span class="ruby-identifier">json</span> = {<span class="ruby-value str">"name"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>, <span class="ruby-value str">"v4_addr"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">v4_addr</span>}
|
|
506
|
-
<span class="ruby-identifier">create</span> <span class="ruby-identifier">json</span>, <span class="ruby-value str">"hosts"</span>
|
|
507
|
-
<span class="ruby-keyword kw">else</span>
|
|
508
|
-
<span class="ruby-identifier">json</span>[<span class="ruby-value str">"v4_addr"</span>] = <span class="ruby-identifier">v4_addr</span>
|
|
509
|
-
<span class="ruby-identifier">modify</span> <span class="ruby-identifier">json</span>, <span class="ruby-node">"hosts/#{h}"</span>
|
|
510
|
-
<span class="ruby-keyword kw">end</span>
|
|
511
|
-
<span class="ruby-keyword kw">end</span>
|
|
512
|
-
<span class="ruby-keyword kw">end</span>
|
|
513
|
-
</pre>
|
|
514
|
-
</div>
|
|
515
367
|
</div>
|
|
516
368
|
</div>
|
|
517
369
|
|
|
518
|
-
<div id="method-
|
|
519
|
-
<a name="
|
|
370
|
+
<div id="method-M000222" class="method-detail">
|
|
371
|
+
<a name="M000222"></a>
|
|
520
372
|
|
|
521
373
|
<div class="method-heading">
|
|
522
|
-
<a href="
|
|
374
|
+
<a href="Netconfig.src/M000222.html" target="Code" class="method-signature"
|
|
375
|
+
onclick="popupCode('Netconfig.src/M000222.html');return false;">
|
|
523
376
|
<span class="method-name">restore</span><span class="method-args">(filepath=nil,clear_existing=false)</span>
|
|
524
377
|
</a>
|
|
525
378
|
</div>
|
|
@@ -532,42 +385,15 @@ updates a network configuration from file
|
|
|
532
385
|
* filepath = the path to the json file
|
|
533
386
|
* clear_existing - boolean determining whether or not existing elements should be cleared
|
|
534
387
|
</pre>
|
|
535
|
-
<p><a class="source-toggle" href="#"
|
|
536
|
-
onclick="toggleCode('M000284-source');return false;">[Source]</a></p>
|
|
537
|
-
<div class="method-source-code" id="M000284-source">
|
|
538
|
-
<pre>
|
|
539
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 69</span>
|
|
540
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore</span>(<span class="ruby-identifier">filepath</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">clear_existing</span>=<span class="ruby-keyword kw">false</span>)
|
|
541
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">filepath</span>.<span class="ruby-identifier">nil?</span>
|
|
542
|
-
<span class="ruby-ivar">@config</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filepath</span>))
|
|
543
|
-
<span class="ruby-keyword kw">end</span>
|
|
544
|
-
<span class="ruby-ivar">@config</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>
|
|
545
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">keys</span>[<span class="ruby-value">0</span>]
|
|
546
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"hosts"</span>
|
|
547
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"RESTORE HOSTS"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
548
|
-
<span class="ruby-identifier">clear_existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">clear_hosts</span>
|
|
549
|
-
<span class="ruby-identifier">restore_hosts</span> <span class="ruby-identifier">c</span>[<span class="ruby-value str">"hosts"</span>]
|
|
550
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"routes"</span>
|
|
551
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"RESTORE ROUTES"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
552
|
-
<span class="ruby-identifier">clear_existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">clear_routes</span>
|
|
553
|
-
<span class="ruby-identifier">restore_routes</span> <span class="ruby-identifier">c</span>[<span class="ruby-value str">"routes"</span>]
|
|
554
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"interfaces"</span>
|
|
555
|
-
<span class="ruby-identifier">clear_existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">clear_vlans</span>
|
|
556
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"RESTORE INTERFACES"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
557
|
-
<span class="ruby-identifier">restore_interfaces</span> <span class="ruby-identifier">c</span>[<span class="ruby-value str">"interfaces"</span>]
|
|
558
|
-
<span class="ruby-keyword kw">end</span>
|
|
559
|
-
<span class="ruby-keyword kw">end</span>
|
|
560
|
-
<span class="ruby-keyword kw">end</span>
|
|
561
|
-
</pre>
|
|
562
|
-
</div>
|
|
563
388
|
</div>
|
|
564
389
|
</div>
|
|
565
390
|
|
|
566
|
-
<div id="method-
|
|
567
|
-
<a name="
|
|
391
|
+
<div id="method-M000224" class="method-detail">
|
|
392
|
+
<a name="M000224"></a>
|
|
568
393
|
|
|
569
394
|
<div class="method-heading">
|
|
570
|
-
<a href="
|
|
395
|
+
<a href="Netconfig.src/M000224.html" target="Code" class="method-signature"
|
|
396
|
+
onclick="popupCode('Netconfig.src/M000224.html');return false;">
|
|
571
397
|
<span class="method-name">restore_hosts</span><span class="method-args">(hosts)</span>
|
|
572
398
|
</a>
|
|
573
399
|
</div>
|
|
@@ -576,28 +402,15 @@ updates a network configuration from file
|
|
|
576
402
|
<p>
|
|
577
403
|
restores the network hosts to the initial system states
|
|
578
404
|
</p>
|
|
579
|
-
<p><a class="source-toggle" href="#"
|
|
580
|
-
onclick="toggleCode('M000286-source');return false;">[Source]</a></p>
|
|
581
|
-
<div class="method-source-code" id="M000286-source">
|
|
582
|
-
<pre>
|
|
583
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 101</span>
|
|
584
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_hosts</span>(<span class="ruby-identifier">hosts</span>)
|
|
585
|
-
<span class="ruby-identifier">hosts</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>
|
|
586
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"create host: #{h['name']}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
587
|
-
<span class="ruby-identifier">delete</span> <span class="ruby-node">"hosts/#{h['name']}"</span> <span class="ruby-comment cmt"># harmlessly fails when host does not exist</span>
|
|
588
|
-
<span class="ruby-identifier">create</span>(<span class="ruby-identifier">h</span>,<span class="ruby-value str">"hosts"</span>)
|
|
589
|
-
<span class="ruby-keyword kw">end</span>
|
|
590
|
-
<span class="ruby-keyword kw">end</span>
|
|
591
|
-
</pre>
|
|
592
|
-
</div>
|
|
593
405
|
</div>
|
|
594
406
|
</div>
|
|
595
407
|
|
|
596
|
-
<div id="method-
|
|
597
|
-
<a name="
|
|
408
|
+
<div id="method-M000228" class="method-detail">
|
|
409
|
+
<a name="M000228"></a>
|
|
598
410
|
|
|
599
411
|
<div class="method-heading">
|
|
600
|
-
<a href="
|
|
412
|
+
<a href="Netconfig.src/M000228.html" target="Code" class="method-signature"
|
|
413
|
+
onclick="popupCode('Netconfig.src/M000228.html');return false;">
|
|
601
414
|
<span class="method-name">restore_interfaces</span><span class="method-args">(interfaces)</span>
|
|
602
415
|
</a>
|
|
603
416
|
</div>
|
|
@@ -609,32 +422,15 @@ restores network interfaces to system initial settings
|
|
|
609
422
|
<pre>
|
|
610
423
|
* interfaces - the names of the interfaces to restore
|
|
611
424
|
</pre>
|
|
612
|
-
<p><a class="source-toggle" href="#"
|
|
613
|
-
onclick="toggleCode('M000290-source');return false;">[Source]</a></p>
|
|
614
|
-
<div class="method-source-code" id="M000290-source">
|
|
615
|
-
<pre>
|
|
616
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 156</span>
|
|
617
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_interfaces</span>(<span class="ruby-identifier">interfaces</span>)
|
|
618
|
-
<span class="ruby-identifier">interfaces</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
619
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span>[<span class="ruby-value str">'name'</span>].<span class="ruby-identifier">include?</span> <span class="ruby-value str">"eth"</span> <span class="ruby-comment cmt"># don't do eth0 or eth1</span>
|
|
620
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"configure interface: #{i['name']}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
621
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">i</span>[<span class="ruby-value str">'vlan'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">""</span>
|
|
622
|
-
<span class="ruby-identifier">interface</span>,<span class="ruby-identifier">vlan</span> = <span class="ruby-identifier">i</span>[<span class="ruby-value str">'name'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">"."</span>)
|
|
623
|
-
<span class="ruby-identifier">create</span> [{<span class="ruby-value str">"name"</span>=<span class="ruby-operator">></span><span class="ruby-identifier">interface</span>,<span class="ruby-value str">"vlan"</span>=<span class="ruby-operator">></span><span class="ruby-identifier">vlan</span>},<span class="ruby-value str">"interfaces"</span>]
|
|
624
|
-
<span class="ruby-keyword kw">end</span>
|
|
625
|
-
<span class="ruby-identifier">modify</span> [<span class="ruby-identifier">i</span>,<span class="ruby-node">"interfaces/#{i['name']}"</span>]
|
|
626
|
-
<span class="ruby-keyword kw">end</span>
|
|
627
|
-
<span class="ruby-keyword kw">end</span>
|
|
628
|
-
</pre>
|
|
629
|
-
</div>
|
|
630
425
|
</div>
|
|
631
426
|
</div>
|
|
632
427
|
|
|
633
|
-
<div id="method-
|
|
634
|
-
<a name="
|
|
428
|
+
<div id="method-M000230" class="method-detail">
|
|
429
|
+
<a name="M000230"></a>
|
|
635
430
|
|
|
636
431
|
<div class="method-heading">
|
|
637
|
-
<a href="
|
|
432
|
+
<a href="Netconfig.src/M000230.html" target="Code" class="method-signature"
|
|
433
|
+
onclick="popupCode('Netconfig.src/M000230.html');return false;">
|
|
638
434
|
<span class="method-name">restore_routes</span><span class="method-args">(routes)</span>
|
|
639
435
|
</a>
|
|
640
436
|
</div>
|
|
@@ -643,28 +439,15 @@ restores network interfaces to system initial settings
|
|
|
643
439
|
<p>
|
|
644
440
|
restores network routes to system initial settings
|
|
645
441
|
</p>
|
|
646
|
-
<p><a class="source-toggle" href="#"
|
|
647
|
-
onclick="toggleCode('M000292-source');return false;">[Source]</a></p>
|
|
648
|
-
<div class="method-source-code" id="M000292-source">
|
|
649
|
-
<pre>
|
|
650
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 179</span>
|
|
651
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_routes</span>(<span class="ruby-identifier">routes</span>)
|
|
652
|
-
<span class="ruby-identifier">routes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
|
|
653
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span>[<span class="ruby-value str">'readonly'</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
|
|
654
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"configure route: #{r['dst']}-#{r['gateway']}-#{r['interface_display_name'].downcase}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
655
|
-
<span class="ruby-identifier">create</span> <span class="ruby-identifier">r</span>,<span class="ruby-value str">"routes"</span>
|
|
656
|
-
<span class="ruby-keyword kw">end</span>
|
|
657
|
-
<span class="ruby-keyword kw">end</span>
|
|
658
|
-
</pre>
|
|
659
|
-
</div>
|
|
660
442
|
</div>
|
|
661
443
|
</div>
|
|
662
444
|
|
|
663
|
-
<div id="method-
|
|
664
|
-
<a name="
|
|
445
|
+
<div id="method-M000231" class="method-detail">
|
|
446
|
+
<a name="M000231"></a>
|
|
665
447
|
|
|
666
448
|
<div class="method-heading">
|
|
667
|
-
<a href="
|
|
449
|
+
<a href="Netconfig.src/M000231.html" target="Code" class="method-signature"
|
|
450
|
+
onclick="popupCode('Netconfig.src/M000231.html');return false;">
|
|
668
451
|
<span class="method-name">save</span><span class="method-args">(e="all", filepath="config.json")</span>
|
|
669
452
|
</a>
|
|
670
453
|
</div>
|
|
@@ -677,92 +460,6 @@ writes the json config to filepath
|
|
|
677
460
|
* e = the element to save, or 'all'
|
|
678
461
|
* filepath - the fully qualified name of the file to save to
|
|
679
462
|
</pre>
|
|
680
|
-
<p><a class="source-toggle" href="#"
|
|
681
|
-
onclick="toggleCode('M000293-source');return false;">[Source]</a></p>
|
|
682
|
-
<div class="method-source-code" id="M000293-source">
|
|
683
|
-
<pre>
|
|
684
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 190</span>
|
|
685
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">e</span>=<span class="ruby-value str">"all"</span>, <span class="ruby-identifier">filepath</span>=<span class="ruby-value str">"config.json"</span>)
|
|
686
|
-
<span class="ruby-identifier">json</span> = <span class="ruby-identifier">get</span> <span class="ruby-identifier">e</span>
|
|
687
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filepath</span>,<span class="ruby-value str">'w'</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-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">json</span>))}
|
|
688
|
-
<span class="ruby-keyword kw">end</span>
|
|
689
|
-
</pre>
|
|
690
|
-
</div>
|
|
691
|
-
</div>
|
|
692
|
-
</div>
|
|
693
|
-
|
|
694
|
-
<h3 class="section-bar">Private Instance methods</h3>
|
|
695
|
-
|
|
696
|
-
<div id="method-M000294" class="method-detail">
|
|
697
|
-
<a name="M000294"></a>
|
|
698
|
-
|
|
699
|
-
<div class="method-heading">
|
|
700
|
-
<a href="#M000294" class="method-signature">
|
|
701
|
-
<span class="method-name">do_modify</span><span class="method-args">(json, e)</span>
|
|
702
|
-
</a>
|
|
703
|
-
</div>
|
|
704
|
-
|
|
705
|
-
<div class="method-description">
|
|
706
|
-
<p>
|
|
707
|
-
restclient put was not recgonized as json PUT to <a
|
|
708
|
-
href="Netconfig.html#M000281">modify</a> netconfig element(s) to json
|
|
709
|
-
values
|
|
710
|
-
</p>
|
|
711
|
-
<p><a class="source-toggle" href="#"
|
|
712
|
-
onclick="toggleCode('M000294-source');return false;">[Source]</a></p>
|
|
713
|
-
<div class="method-source-code" id="M000294-source">
|
|
714
|
-
<pre>
|
|
715
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 199</span>
|
|
716
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_modify</span>(<span class="ruby-identifier">json</span>, <span class="ruby-identifier">e</span>)
|
|
717
|
-
<span class="ruby-identifier">jstring</span> = <span class="ruby-identifier">json</span>
|
|
718
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">json</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
|
719
|
-
<span class="ruby-identifier">jstring</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">generate</span> <span class="ruby-identifier">json</span>
|
|
720
|
-
<span class="ruby-keyword kw">end</span>
|
|
721
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">jstring</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
722
|
-
<span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">"https://#{@host}"</span>)
|
|
723
|
-
<span class="ruby-identifier">escaped</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-node">"#{@docroot}#{e}"</span>)
|
|
724
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Put: #{uri}#{escaped}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
725
|
-
<span class="ruby-identifier">http</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>)
|
|
726
|
-
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">use_ssl</span> = <span class="ruby-keyword kw">true</span>
|
|
727
|
-
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">verify_mode</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSL</span><span class="ruby-operator">::</span><span class="ruby-constant">VERIFY_NONE</span>
|
|
728
|
-
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span>
|
|
729
|
-
<span class="ruby-identifier">req</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Put</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{escaped}"</span>,<span class="ruby-identifier">initheader</span> = {<span class="ruby-value str">"User-Agent"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@username</span>, <span class="ruby-value str">'Content-Type'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'application/json; charset=utf-8'</span>})
|
|
730
|
-
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">jstring</span>
|
|
731
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">http_request</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">req</span>)
|
|
732
|
-
<span class="ruby-keyword kw">end</span>
|
|
733
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
734
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
735
|
-
<span class="ruby-keyword kw">end</span>
|
|
736
|
-
</pre>
|
|
737
|
-
</div>
|
|
738
|
-
</div>
|
|
739
|
-
</div>
|
|
740
|
-
|
|
741
|
-
<div id="method-M000295" class="method-detail">
|
|
742
|
-
<a name="M000295"></a>
|
|
743
|
-
|
|
744
|
-
<div class="method-heading">
|
|
745
|
-
<a href="#M000295" class="method-signature">
|
|
746
|
-
<span class="method-name">http_request</span><span class="method-args">(http, req)</span>
|
|
747
|
-
</a>
|
|
748
|
-
</div>
|
|
749
|
-
|
|
750
|
-
<div class="method-description">
|
|
751
|
-
<p><a class="source-toggle" href="#"
|
|
752
|
-
onclick="toggleCode('M000295-source');return false;">[Source]</a></p>
|
|
753
|
-
<div class="method-source-code" id="M000295-source">
|
|
754
|
-
<pre>
|
|
755
|
-
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 220</span>
|
|
756
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">http_request</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">req</span>)
|
|
757
|
-
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">basic_auth</span>(<span class="ruby-ivar">@username</span>, <span class="ruby-ivar">@password</span>)
|
|
758
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">req</span>)
|
|
759
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"200"</span>
|
|
760
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"Error status code #{response.code}\n#{response.body}"</span>
|
|
761
|
-
<span class="ruby-keyword kw">end</span>
|
|
762
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>
|
|
763
|
-
<span class="ruby-keyword kw">end</span>
|
|
764
|
-
</pre>
|
|
765
|
-
</div>
|
|
766
463
|
</div>
|
|
767
464
|
</div>
|
|
768
465
|
|