mu 5.7.2.6 → 5.7.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mu.rb +0 -1
- data/lib/mu/api/scale.rb +1 -1
- data/rdoc/Gemfile.html +194 -0
- data/rdoc/LICENSE_txt.html +201 -0
- data/rdoc/Mu.html +478 -0
- data/rdoc/Mu/Client.html +461 -0
- data/rdoc/Mu/Command.html +338 -0
- data/rdoc/Mu/Command/API.html +844 -0
- data/rdoc/Mu/Command/Cmd_appid.html +1342 -0
- data/rdoc/Mu/Command/Cmd_cli.html +800 -0
- data/rdoc/Mu/Command/Cmd_ddt.html +1612 -0
- data/rdoc/Mu/Command/Cmd_homepage.html +762 -0
- data/rdoc/Mu/Command/Cmd_muapi.html +1363 -0
- data/rdoc/Mu/Command/Cmd_netconfig.html +1077 -0
- data/rdoc/Mu/Command/Cmd_runscale.html +1441 -0
- data/rdoc/Mu/Command/Cmd_runscenario.html +787 -0
- data/rdoc/Mu/Command/Cmd_runverify.html +893 -0
- data/rdoc/Mu/Command/Cmd_scale.html +1323 -0
- data/rdoc/Mu/Command/Cmd_system.html +677 -0
- data/rdoc/Mu/Command/Curl.html +751 -0
- data/rdoc/Mu/Command/Help.html +305 -0
- data/rdoc/Mu/Curl.html +243 -0
- data/rdoc/Mu/Curl/Error.html +304 -0
- data/rdoc/Mu/Curl/Error/Authorize.html +355 -0
- data/rdoc/Mu/Curl/Error/Connect.html +286 -0
- data/rdoc/Mu/Curl/Error/DNS.html +236 -0
- data/rdoc/Mu/Curl/Error/Region.html +307 -0
- data/rdoc/Mu/Curl/Error/Status.html +286 -0
- data/rdoc/Mu/Curl/Error/Timeout.html +286 -0
- data/rdoc/Mu/Curl/Verify.html +472 -0
- data/rdoc/Mu/Curl/Verify/Request.html +424 -0
- data/rdoc/Mu/Curl/Verify/Response.html +372 -0
- data/rdoc/Mu/Curl/Verify/Result.html +373 -0
- data/rdoc/Mu/Ddt.html +1347 -0
- data/rdoc/Mu/Helper.html +517 -0
- data/rdoc/Mu/Homepage.html +719 -0
- data/rdoc/Mu/HttpHelper.html +890 -0
- data/rdoc/Mu/Muapi.html +1226 -0
- data/rdoc/Mu/Netconfig.html +1178 -0
- data/rdoc/Mu/Scale.html +1359 -0
- data/rdoc/Mu/System.html +504 -0
- data/rdoc/Object.html +285 -0
- data/rdoc/README_rdoc.html +892 -0
- data/rdoc/Rakefile.html +257 -0
- data/rdoc/TCTestMu.html +2583 -0
- data/rdoc/Test.html +235 -0
- data/rdoc/Test/Unit.html +235 -0
- data/rdoc/Test/Unit/TestCase.html +236 -0
- data/rdoc/Test/helper_rb.html +62 -0
- data/rdoc/Test/tc_test_mu_rb.html +60 -0
- data/rdoc/VERSION.html +179 -0
- data/rdoc/bin/mu.html +54 -0
- data/rdoc/created.rid +36 -1
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +880 -20
- data/rdoc/js/darkfish.js +116 -0
- data/rdoc/js/jquery.js +32 -0
- data/rdoc/js/quicksearch.js +114 -0
- data/rdoc/js/thickbox-compressed.js +10 -0
- data/rdoc/lib/mu/api/ddt_rb.html +52 -0
- data/rdoc/lib/mu/api/homepage_rb.html +52 -0
- data/rdoc/lib/mu/api/muapi_rb.html +52 -0
- data/rdoc/lib/mu/api/netconfig_rb.html +52 -0
- data/rdoc/lib/mu/api/scale_rb.html +52 -0
- data/rdoc/lib/mu/api/system_rb.html +52 -0
- data/rdoc/lib/mu/client_rb.html +52 -0
- data/rdoc/lib/mu/command/api_rb.html +52 -0
- data/rdoc/lib/mu/command/cmd_appid_rb.html +62 -0
- data/rdoc/lib/mu/command/cmd_cli_rb.html +55 -0
- data/rdoc/lib/mu/command/cmd_ddt_rb.html +60 -0
- data/rdoc/lib/mu/command/cmd_homepage_rb.html +57 -0
- data/rdoc/lib/mu/command/cmd_muapi_rb.html +59 -0
- data/rdoc/lib/mu/command/cmd_netconfig_rb.html +58 -0
- data/rdoc/lib/mu/command/cmd_runscale_rb.html +62 -0
- data/rdoc/lib/mu/command/cmd_runscenario_rb.html +57 -0
- data/rdoc/lib/mu/command/cmd_runverify_rb.html +61 -0
- data/rdoc/lib/mu/command/cmd_scale_rb.html +58 -0
- data/rdoc/lib/mu/command/cmd_system_rb.html +59 -0
- data/rdoc/lib/mu/command/curl_rb.html +52 -0
- data/rdoc/lib/mu/command/help_rb.html +52 -0
- data/rdoc/lib/mu/command_rb.html +55 -0
- data/rdoc/lib/mu/curl/error_rb.html +52 -0
- data/rdoc/lib/mu/curl/verify_rb.html +52 -0
- data/rdoc/lib/mu/helper_rb.html +52 -0
- data/rdoc/lib/mu/http_helper_rb.html +52 -0
- data/rdoc/lib/mu_rb.html +80 -0
- data/rdoc/rdoc.css +706 -0
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +117 -117
- data/test/data/{scale_configuration.json → scale.json} +11 -11
- metadata +142 -407
- data/rdoc/classes/Mu.src/M000001.html +0 -39
- data/rdoc/classes/Mu.src/M000002.html +0 -29
- data/rdoc/classes/Mu.src/M000053.html +0 -39
- data/rdoc/classes/Mu.src/M000054.html +0 -29
- data/rdoc/classes/Mu/Client.src/M000212.html +0 -24
- data/rdoc/classes/Mu/Client.src/M000213.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000214.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000215.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000216.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000130.html +0 -22
- data/rdoc/classes/Mu/Command/API.src/M000131.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000132.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000133.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000134.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000135.html +0 -17
- data/rdoc/classes/Mu/Command/API.src/M000136.html +0 -23
- data/rdoc/classes/Mu/Command/API.src/M000137.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000138.html +0 -29
- data/rdoc/classes/Mu/Command/API.src/M000139.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000140.html +0 -22
- data/rdoc/classes/Mu/Command/API.src/M000141.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000142.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000143.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000144.html +0 -17
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000053.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000054.html +0 -30
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000055.html +0 -39
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000056.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000145.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000146.html +0 -30
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000147.html +0 -39
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000148.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000200.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000201.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000202.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000203.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000204.html +0 -20
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000205.html +0 -20
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000101.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000102.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000103.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000104.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000105.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000106.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000107.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000108.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000109.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000110.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000111.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000112.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000113.html +0 -43
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000114.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000115.html +0 -38
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000116.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000117.html +0 -38
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000118.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000119.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000120.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000121.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000122.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000206.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000207.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000208.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000209.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000210.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000211.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000164.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000165.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000166.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000167.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000168.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000169.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000170.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000171.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000172.html +0 -28
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000173.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000174.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000175.html +0 -28
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000176.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000177.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000178.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000179.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000180.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000060.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000061.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000062.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000063.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000064.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000065.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000066.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000067.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000068.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000069.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000070.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000071.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000152.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000153.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000154.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000155.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000156.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000157.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000158.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000159.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000160.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000161.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000162.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000163.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000003.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000004.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000005.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000057.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000058.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000059.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000149.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000150.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000151.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000128.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000129.html +0 -144
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000198.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000199.html +0 -200
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000181.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000182.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000183.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000184.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000185.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000186.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000187.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000188.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000189.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000190.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000191.html +0 -29
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000192.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000193.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000194.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000195.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000196.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000197.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000097.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000098.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000099.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000100.html +0 -21
- data/rdoc/classes/Mu/Command/Curl.src/M000124.html +0 -18
- data/rdoc/classes/Mu/Command/Curl.src/M000125.html +0 -21
- data/rdoc/classes/Mu/Command/Curl.src/M000126.html +0 -26
- data/rdoc/classes/Mu/Command/Help.src/M000123.html +0 -38
- data/rdoc/classes/Mu/Curl/Error.src/M000063.html +0 -18
- data/rdoc/classes/Mu/Curl/Error/Authorize.src/M000065.html +0 -22
- data/rdoc/classes/Mu/Curl/Error/Connect.src/M000068.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Region.src/M000066.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Status.src/M000064.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Timeout.src/M000067.html +0 -19
- data/rdoc/classes/Mu/Curl/Verify.src/M000055.html +0 -29
- data/rdoc/classes/Mu/Curl/Verify.src/M000056.html +0 -18
- data/rdoc/classes/Mu/Curl/Verify.src/M000057.html +0 -46
- data/rdoc/classes/Mu/Curl/Verify.src/M000058.html +0 -18
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000061.html +0 -35
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000062.html +0 -23
- data/rdoc/classes/Mu/Curl/Verify/Response.src/M000059.html +0 -24
- data/rdoc/classes/Mu/Curl/Verify/Result.src/M000060.html +0 -25
- data/rdoc/classes/Mu/Ddt.src/M000242.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000243.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000244.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000245.html +0 -23
- data/rdoc/classes/Mu/Ddt.src/M000246.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000247.html +0 -32
- data/rdoc/classes/Mu/Ddt.src/M000248.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000249.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000250.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000251.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000252.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000253.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000254.html +0 -25
- data/rdoc/classes/Mu/Ddt.src/M000255.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000256.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000257.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000258.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000259.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000260.html +0 -35
- data/rdoc/classes/Mu/Ddt.src/M000261.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000262.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000263.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000264.html +0 -22
- data/rdoc/classes/Mu/Homepage.src/M000236.html +0 -25
- data/rdoc/classes/Mu/Homepage.src/M000237.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000238.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000239.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000240.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000241.html +0 -20
- data/rdoc/classes/Mu/HttpHelper.src/M000069.html +0 -22
- data/rdoc/classes/Mu/HttpHelper.src/M000070.html +0 -25
- data/rdoc/classes/Mu/HttpHelper.src/M000071.html +0 -34
- data/rdoc/classes/Mu/HttpHelper.src/M000072.html +0 -39
- data/rdoc/classes/Mu/HttpHelper.src/M000073.html +0 -36
- data/rdoc/classes/Mu/HttpHelper.src/M000074.html +0 -34
- data/rdoc/classes/Mu/HttpHelper.src/M000075.html +0 -46
- data/rdoc/classes/Mu/HttpHelper.src/M000076.html +0 -24
- data/rdoc/classes/Mu/HttpHelper.src/M000077.html +0 -19
- data/rdoc/classes/Mu/HttpHelper.src/M000078.html +0 -33
- data/rdoc/classes/Mu/HttpHelper.src/M000079.html +0 -29
- data/rdoc/classes/Mu/Muapi.src/M000080.html +0 -25
- data/rdoc/classes/Mu/Muapi.src/M000081.html +0 -27
- data/rdoc/classes/Mu/Muapi.src/M000082.html +0 -24
- data/rdoc/classes/Mu/Muapi.src/M000083.html +0 -27
- data/rdoc/classes/Mu/Muapi.src/M000084.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000085.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000086.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000087.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000088.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000089.html +0 -22
- data/rdoc/classes/Mu/Muapi.src/M000090.html +0 -21
- data/rdoc/classes/Mu/Muapi.src/M000091.html +0 -19
- data/rdoc/classes/Mu/Muapi.src/M000092.html +0 -18
- data/rdoc/classes/Mu/Muapi.src/M000093.html +0 -18
- data/rdoc/classes/Mu/Muapi.src/M000094.html +0 -36
- data/rdoc/classes/Mu/Muapi.src/M000095.html +0 -34
- data/rdoc/classes/Mu/Muapi.src/M000096.html +0 -34
- data/rdoc/classes/Mu/Netconfig.src/M000072.html +0 -25
- data/rdoc/classes/Mu/Netconfig.src/M000073.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000074.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000075.html +0 -24
- data/rdoc/classes/Mu/Netconfig.src/M000076.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000077.html +0 -36
- data/rdoc/classes/Mu/Netconfig.src/M000078.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000079.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000080.html +0 -39
- data/rdoc/classes/Mu/Netconfig.src/M000081.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000082.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000083.html +0 -26
- data/rdoc/classes/Mu/Netconfig.src/M000084.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000085.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000086.html +0 -19
- data/rdoc/classes/Mu/Netconfig.src/M000217.html +0 -25
- data/rdoc/classes/Mu/Netconfig.src/M000218.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000219.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000220.html +0 -24
- data/rdoc/classes/Mu/Netconfig.src/M000221.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000222.html +0 -36
- data/rdoc/classes/Mu/Netconfig.src/M000223.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000224.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000225.html +0 -37
- data/rdoc/classes/Mu/Netconfig.src/M000226.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000227.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000228.html +0 -26
- data/rdoc/classes/Mu/Netconfig.src/M000229.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000230.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000231.html +0 -19
- data/rdoc/classes/Mu/Scale.src/M000006.html +0 -47
- data/rdoc/classes/Mu/Scale.src/M000007.html +0 -27
- data/rdoc/classes/Mu/Scale.src/M000008.html +0 -22
- data/rdoc/classes/Mu/Scale.src/M000009.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000010.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000011.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000012.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000013.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000014.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000015.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000016.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000017.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000018.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000019.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000020.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000021.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000022.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000023.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000024.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000025.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000265.html +0 -46
- data/rdoc/classes/Mu/Scale.src/M000266.html +0 -27
- data/rdoc/classes/Mu/Scale.src/M000267.html +0 -22
- data/rdoc/classes/Mu/Scale.src/M000268.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000269.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000270.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000271.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000272.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000273.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000274.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000275.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000276.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000277.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000278.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000279.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000280.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000281.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000282.html +0 -20
- data/rdoc/classes/Mu/System.src/M000232.html +0 -25
- data/rdoc/classes/Mu/System.src/M000233.html +0 -20
- data/rdoc/classes/Mu/System.src/M000234.html +0 -20
- data/rdoc/classes/Mu/System.src/M000235.html +0 -20
- data/rdoc/classes/Object.src/M000052.html +0 -18
- data/rdoc/classes/TCTestMu.src/M000001.html +0 -24
- data/rdoc/classes/TCTestMu.src/M000002.html +0 -18
- data/rdoc/classes/TCTestMu.src/M000003.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000004.html +0 -33
- data/rdoc/classes/TCTestMu.src/M000005.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000006.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000007.html +0 -26
- data/rdoc/classes/TCTestMu.src/M000008.html +0 -29
- data/rdoc/classes/TCTestMu.src/M000009.html +0 -39
- data/rdoc/classes/TCTestMu.src/M000010.html +0 -38
- data/rdoc/classes/TCTestMu.src/M000011.html +0 -38
- data/rdoc/classes/TCTestMu.src/M000012.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000013.html +0 -25
- data/rdoc/classes/TCTestMu.src/M000014.html +0 -25
- data/rdoc/classes/TCTestMu.src/M000015.html +0 -33
- data/rdoc/classes/TCTestMu.src/M000016.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000017.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000018.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000019.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000020.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000021.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000022.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000023.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000024.html +0 -44
- data/rdoc/classes/TCTestMu.src/M000025.html +0 -53
- data/rdoc/classes/TCTestMu.src/M000026.html +0 -22
- data/rdoc/classes/TCTestMu.src/M000027.html +0 -49
- data/rdoc/classes/TCTestMu.src/M000028.html +0 -40
- data/rdoc/classes/TCTestMu.src/M000029.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000030.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000031.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000032.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000033.html +0 -27
- data/rdoc/classes/TCTestMu.src/M000034.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000035.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000036.html +0 -41
- data/rdoc/classes/TCTestMu.src/M000037.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000038.html +0 -24
- data/rdoc/classes/TCTestMu.src/M000039.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000040.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000041.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000042.html +0 -26
- data/rdoc/classes/TCTestMu.src/M000043.html +0 -28
- data/rdoc/classes/TCTestMu.src/M000044.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000045.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000046.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000047.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000048.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000049.html +0 -22
- data/rdoc/classes/TCTestMu.src/M000050.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000051.html +0 -35
- data/test/helper.rb +0 -18
- data/test/tc_test_mu.rb +0 -720
|
@@ -0,0 +1,1178 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Class: Mu::Netconfig</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="class">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="home-metadata">
|
|
26
|
+
<div id="home-section" class="section">
|
|
27
|
+
<h3 class="section-header">
|
|
28
|
+
<a href="../index.html">Home</a>
|
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
|
31
|
+
</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="file-metadata">
|
|
36
|
+
<div id="file-list-section" class="section">
|
|
37
|
+
<h3 class="section-header">In Files</h3>
|
|
38
|
+
<div class="section-body">
|
|
39
|
+
<ul>
|
|
40
|
+
|
|
41
|
+
<li><a href="../lib/mu/api/netconfig_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/mu/api/netconfig.rb">lib/mu/api/netconfig.rb</a></li>
|
|
43
|
+
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="class-metadata">
|
|
52
|
+
|
|
53
|
+
<!-- Parent Class -->
|
|
54
|
+
|
|
55
|
+
<div id="parent-class-section" class="section">
|
|
56
|
+
<h3 class="section-header">Parent</h3>
|
|
57
|
+
|
|
58
|
+
<p class="link"><a href="../Object.html">Object</a></p>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!-- Namespace Contents -->
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<!-- Method Quickref -->
|
|
67
|
+
|
|
68
|
+
<div id="method-list-section" class="section">
|
|
69
|
+
<h3 class="section-header">Methods</h3>
|
|
70
|
+
<ul class="link-list">
|
|
71
|
+
|
|
72
|
+
<li><a href="#method-c-new">::new</a></li>
|
|
73
|
+
|
|
74
|
+
<li><a href="#method-i-clear_hosts">#clear_hosts</a></li>
|
|
75
|
+
|
|
76
|
+
<li><a href="#method-i-clear_interface">#clear_interface</a></li>
|
|
77
|
+
|
|
78
|
+
<li><a href="#method-i-clear_routes">#clear_routes</a></li>
|
|
79
|
+
|
|
80
|
+
<li><a href="#method-i-clear_vlans">#clear_vlans</a></li>
|
|
81
|
+
|
|
82
|
+
<li><a href="#method-i-create">#create</a></li>
|
|
83
|
+
|
|
84
|
+
<li><a href="#method-i-delete">#delete</a></li>
|
|
85
|
+
|
|
86
|
+
<li><a href="#method-i-do_modify">#do_modify</a></li>
|
|
87
|
+
|
|
88
|
+
<li><a href="#method-i-get">#get</a></li>
|
|
89
|
+
|
|
90
|
+
<li><a href="#method-i-http_request">#http_request</a></li>
|
|
91
|
+
|
|
92
|
+
<li><a href="#method-i-modify">#modify</a></li>
|
|
93
|
+
|
|
94
|
+
<li><a href="#method-i-resolve_hosts">#resolve_hosts</a></li>
|
|
95
|
+
|
|
96
|
+
<li><a href="#method-i-restore">#restore</a></li>
|
|
97
|
+
|
|
98
|
+
<li><a href="#method-i-restore_hosts">#restore_hosts</a></li>
|
|
99
|
+
|
|
100
|
+
<li><a href="#method-i-restore_interfaces">#restore_interfaces</a></li>
|
|
101
|
+
|
|
102
|
+
<li><a href="#method-i-restore_routes">#restore_routes</a></li>
|
|
103
|
+
|
|
104
|
+
<li><a href="#method-i-save">#save</a></li>
|
|
105
|
+
|
|
106
|
+
</ul>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<!-- Included Modules -->
|
|
111
|
+
|
|
112
|
+
<div id="includes-section" class="section">
|
|
113
|
+
<h3 class="section-header">Included Modules</h3>
|
|
114
|
+
<ul class="link-list">
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<li><span class="include">Helper</span></li>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</ul>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div id="project-metadata">
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<div id="fileindex-section" class="section project-section">
|
|
129
|
+
<h3 class="section-header">Files</h3>
|
|
130
|
+
<ul>
|
|
131
|
+
|
|
132
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a></li>
|
|
133
|
+
|
|
134
|
+
<li class="file"><a href="../LICENSE_txt.html">LICENSE.txt</a></li>
|
|
135
|
+
|
|
136
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
137
|
+
|
|
138
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a></li>
|
|
139
|
+
|
|
140
|
+
<li class="file"><a href="../VERSION.html">VERSION</a></li>
|
|
141
|
+
|
|
142
|
+
</ul>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
<div id="classindex-section" class="section project-section">
|
|
147
|
+
<h3 class="section-header">Class Index
|
|
148
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
149
|
+
height="16" width="16" alt="[+]"
|
|
150
|
+
title="show/hide quicksearch" /></span></h3>
|
|
151
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
152
|
+
<fieldset>
|
|
153
|
+
<legend>Quicksearch</legend>
|
|
154
|
+
<input type="text" name="quicksearch" value=""
|
|
155
|
+
class="quicksearch-field" />
|
|
156
|
+
</fieldset>
|
|
157
|
+
</form>
|
|
158
|
+
|
|
159
|
+
<ul class="link-list">
|
|
160
|
+
|
|
161
|
+
<li><a href="../Mu.html">Mu</a></li>
|
|
162
|
+
|
|
163
|
+
<li><a href="../Mu/Client.html">Mu::Client</a></li>
|
|
164
|
+
|
|
165
|
+
<li><a href="../Mu/Command.html">Mu::Command</a></li>
|
|
166
|
+
|
|
167
|
+
<li><a href="../Mu/Command/API.html">Mu::Command::API</a></li>
|
|
168
|
+
|
|
169
|
+
<li><a href="../Mu/Command/API.html">Mu::Command::API</a></li>
|
|
170
|
+
|
|
171
|
+
<li><a href="../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
|
|
172
|
+
|
|
173
|
+
<li><a href="../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
|
|
174
|
+
|
|
175
|
+
<li><a href="../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
|
|
176
|
+
|
|
177
|
+
<li><a href="../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
|
|
178
|
+
|
|
179
|
+
<li><a href="../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
|
|
180
|
+
|
|
181
|
+
<li><a href="../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
|
|
182
|
+
|
|
183
|
+
<li><a href="../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
|
|
184
|
+
|
|
185
|
+
<li><a href="../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
|
|
186
|
+
|
|
187
|
+
<li><a href="../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
|
|
188
|
+
|
|
189
|
+
<li><a href="../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
|
|
190
|
+
|
|
191
|
+
<li><a href="../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
|
|
192
|
+
|
|
193
|
+
<li><a href="../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
|
|
194
|
+
|
|
195
|
+
<li><a href="../Mu/Command/Help.html">Mu::Command::Help</a></li>
|
|
196
|
+
|
|
197
|
+
<li><a href="../Mu/Curl.html">Mu::Curl</a></li>
|
|
198
|
+
|
|
199
|
+
<li><a href="../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
|
|
200
|
+
|
|
201
|
+
<li><a href="../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
|
|
202
|
+
|
|
203
|
+
<li><a href="../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
|
|
204
|
+
|
|
205
|
+
<li><a href="../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
|
|
206
|
+
|
|
207
|
+
<li><a href="../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
|
|
208
|
+
|
|
209
|
+
<li><a href="../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
|
|
210
|
+
|
|
211
|
+
<li><a href="../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
|
|
212
|
+
|
|
213
|
+
<li><a href="../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
|
|
214
|
+
|
|
215
|
+
<li><a href="../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
|
|
216
|
+
|
|
217
|
+
<li><a href="../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
|
|
218
|
+
|
|
219
|
+
<li><a href="../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
|
|
220
|
+
|
|
221
|
+
<li><a href="../Mu/Ddt.html">Mu::Ddt</a></li>
|
|
222
|
+
|
|
223
|
+
<li><a href="../Mu/Helper.html">Mu::Helper</a></li>
|
|
224
|
+
|
|
225
|
+
<li><a href="../Mu/Homepage.html">Mu::Homepage</a></li>
|
|
226
|
+
|
|
227
|
+
<li><a href="../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
|
|
228
|
+
|
|
229
|
+
<li><a href="../Mu/Muapi.html">Mu::Muapi</a></li>
|
|
230
|
+
|
|
231
|
+
<li><a href="../Mu/Netconfig.html">Mu::Netconfig</a></li>
|
|
232
|
+
|
|
233
|
+
<li><a href="../Mu/Scale.html">Mu::Scale</a></li>
|
|
234
|
+
|
|
235
|
+
<li><a href="../Mu/System.html">Mu::System</a></li>
|
|
236
|
+
|
|
237
|
+
<li><a href="../Test.html">Test</a></li>
|
|
238
|
+
|
|
239
|
+
<li><a href="../Test/Unit.html">Test::Unit</a></li>
|
|
240
|
+
|
|
241
|
+
<li><a href="../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
|
|
242
|
+
|
|
243
|
+
<li><a href="../Object.html">Object</a></li>
|
|
244
|
+
|
|
245
|
+
<li><a href="../TCTestMu.html">TCTestMu</a></li>
|
|
246
|
+
|
|
247
|
+
</ul>
|
|
248
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<div id="documentation">
|
|
256
|
+
<h1 class="class">Mu::Netconfig</h1>
|
|
257
|
+
|
|
258
|
+
<div id="description">
|
|
259
|
+
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<!-- Constants -->
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<!-- Attributes -->
|
|
266
|
+
|
|
267
|
+
<div id="attribute-method-details" class="method-section section">
|
|
268
|
+
<h3 class="section-header">Attributes</h3>
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
<div id="host-attribute-method" class="method-detail">
|
|
272
|
+
<a name="host"></a>
|
|
273
|
+
|
|
274
|
+
<a name="host="></a>
|
|
275
|
+
|
|
276
|
+
<div class="method-heading attribute-method-heading">
|
|
277
|
+
<span class="method-name">host</span><span
|
|
278
|
+
class="attribute-access-type">[RW]</span>
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
<div class="method-description">
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div id="username-attribute-method" class="method-detail">
|
|
289
|
+
<a name="username"></a>
|
|
290
|
+
|
|
291
|
+
<a name="username="></a>
|
|
292
|
+
|
|
293
|
+
<div class="method-heading attribute-method-heading">
|
|
294
|
+
<span class="method-name">username</span><span
|
|
295
|
+
class="attribute-access-type">[RW]</span>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<div class="method-description">
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
<div id="password-attribute-method" class="method-detail">
|
|
306
|
+
<a name="password"></a>
|
|
307
|
+
|
|
308
|
+
<a name="password="></a>
|
|
309
|
+
|
|
310
|
+
<div class="method-heading attribute-method-heading">
|
|
311
|
+
<span class="method-name">password</span><span
|
|
312
|
+
class="attribute-access-type">[RW]</span>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="method-description">
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<div id="docroot-attribute-method" class="method-detail">
|
|
323
|
+
<a name="docroot"></a>
|
|
324
|
+
|
|
325
|
+
<a name="docroot="></a>
|
|
326
|
+
|
|
327
|
+
<div class="method-heading attribute-method-heading">
|
|
328
|
+
<span class="method-name">docroot</span><span
|
|
329
|
+
class="attribute-access-type">[RW]</span>
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
<div class="method-description">
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<div id="element-attribute-method" class="method-detail">
|
|
340
|
+
<a name="element"></a>
|
|
341
|
+
|
|
342
|
+
<a name="element="></a>
|
|
343
|
+
|
|
344
|
+
<div class="method-heading attribute-method-heading">
|
|
345
|
+
<span class="method-name">element</span><span
|
|
346
|
+
class="attribute-access-type">[RW]</span>
|
|
347
|
+
</div>
|
|
348
|
+
|
|
349
|
+
<div class="method-description">
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
<div id="response-attribute-method" class="method-detail">
|
|
357
|
+
<a name="response"></a>
|
|
358
|
+
|
|
359
|
+
<a name="response="></a>
|
|
360
|
+
|
|
361
|
+
<div class="method-heading attribute-method-heading">
|
|
362
|
+
<span class="method-name">response</span><span
|
|
363
|
+
class="attribute-access-type">[RW]</span>
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
<div class="method-description">
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
|
|
373
|
+
<div id="config-attribute-method" class="method-detail">
|
|
374
|
+
<a name="config"></a>
|
|
375
|
+
|
|
376
|
+
<a name="config="></a>
|
|
377
|
+
|
|
378
|
+
<div class="method-heading attribute-method-heading">
|
|
379
|
+
<span class="method-name">config</span><span
|
|
380
|
+
class="attribute-access-type">[RW]</span>
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
<div class="method-description">
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
<!-- Methods -->
|
|
394
|
+
|
|
395
|
+
<div id="public-class-method-details" class="method-section section">
|
|
396
|
+
<h3 class="section-header">Public Class Methods</h3>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
<div id="new-method" class="method-detail ">
|
|
400
|
+
<a name="method-c-new"></a>
|
|
401
|
+
|
|
402
|
+
<div class="method-heading">
|
|
403
|
+
|
|
404
|
+
<span class="method-name">new</span><span
|
|
405
|
+
class="method-args">(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])</span>
|
|
406
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
407
|
+
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
<div class="method-description">
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
<div class="method-source-code"
|
|
417
|
+
id="new-source">
|
|
418
|
+
<pre>
|
|
419
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 7</span>
|
|
420
|
+
7: <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>])
|
|
421
|
+
8: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
422
|
+
9: <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
423
|
+
10: <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
424
|
+
11: <span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">"/restlet/netconfig/"</span>
|
|
425
|
+
12: <span class="ruby-ivar">@response</span> = <span class="ruby-keyword kw">nil</span>
|
|
426
|
+
13: <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>)
|
|
427
|
+
14: <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>
|
|
428
|
+
15: <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>
|
|
429
|
+
16: <span class="ruby-keyword kw">end</span></pre>
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
</div>
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
</div>
|
|
441
|
+
|
|
442
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
443
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
<div id="clear-hosts-method" class="method-detail ">
|
|
447
|
+
<a name="method-i-clear_hosts"></a>
|
|
448
|
+
|
|
449
|
+
<div class="method-heading">
|
|
450
|
+
|
|
451
|
+
<span class="method-name">clear_hosts</span><span
|
|
452
|
+
class="method-args">()</span>
|
|
453
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
454
|
+
|
|
455
|
+
</div>
|
|
456
|
+
|
|
457
|
+
<div class="method-description">
|
|
458
|
+
|
|
459
|
+
<p>
|
|
460
|
+
clears the network hosts
|
|
461
|
+
</p>
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
<div class="method-source-code"
|
|
466
|
+
id="clear-hosts-source">
|
|
467
|
+
<pre>
|
|
468
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 92</span>
|
|
469
|
+
92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_hosts</span>
|
|
470
|
+
93: <span class="ruby-identifier">h</span> = <span class="ruby-identifier">get</span>(<span class="ruby-value str">"hosts"</span>)
|
|
471
|
+
94: <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>
|
|
472
|
+
95: <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>
|
|
473
|
+
96: <span class="ruby-identifier">delete</span>(<span class="ruby-node">"hosts/#{h['name']}"</span>)
|
|
474
|
+
97: <span class="ruby-keyword kw">end</span>
|
|
475
|
+
98: <span class="ruby-keyword kw">end</span></pre>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
</div>
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
<div id="clear-interface-method" class="method-detail ">
|
|
487
|
+
<a name="method-i-clear_interface"></a>
|
|
488
|
+
|
|
489
|
+
<div class="method-heading">
|
|
490
|
+
|
|
491
|
+
<span class="method-name">clear_interface</span><span
|
|
492
|
+
class="method-args">(interface)</span>
|
|
493
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
494
|
+
|
|
495
|
+
</div>
|
|
496
|
+
|
|
497
|
+
<div class="method-description">
|
|
498
|
+
|
|
499
|
+
<p>
|
|
500
|
+
clears a network interface
|
|
501
|
+
</p>
|
|
502
|
+
<pre>
|
|
503
|
+
* interface = the name of the interface to clear</pre>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
<div class="method-source-code"
|
|
508
|
+
id="clear-interface-source">
|
|
509
|
+
<pre>
|
|
510
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 139</span>
|
|
511
|
+
139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_interface</span>(<span class="ruby-identifier">interface</span>)
|
|
512
|
+
140: <span class="ruby-identifier">interface</span> = <span class="ruby-identifier">interface</span>
|
|
513
|
+
141: <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>,
|
|
514
|
+
142: <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>}
|
|
515
|
+
143: <span class="ruby-identifier">modify</span> <span class="ruby-identifier">json</span>,<span class="ruby-node">"interfaces/#{interface}"</span>
|
|
516
|
+
144: <span class="ruby-keyword kw">end</span></pre>
|
|
517
|
+
</div>
|
|
518
|
+
|
|
519
|
+
</div>
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
</div>
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
<div id="clear-routes-method" class="method-detail ">
|
|
528
|
+
<a name="method-i-clear_routes"></a>
|
|
529
|
+
|
|
530
|
+
<div class="method-heading">
|
|
531
|
+
|
|
532
|
+
<span class="method-name">clear_routes</span><span
|
|
533
|
+
class="method-args">()</span>
|
|
534
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
535
|
+
|
|
536
|
+
</div>
|
|
537
|
+
|
|
538
|
+
<div class="method-description">
|
|
539
|
+
|
|
540
|
+
<p>
|
|
541
|
+
clears network routes
|
|
542
|
+
</p>
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
<div class="method-source-code"
|
|
547
|
+
id="clear-routes-source">
|
|
548
|
+
<pre>
|
|
549
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 171</span>
|
|
550
|
+
171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_routes</span>
|
|
551
|
+
172: <span class="ruby-identifier">routes</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"routes"</span>
|
|
552
|
+
173: <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>
|
|
553
|
+
174: <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>
|
|
554
|
+
175: <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>
|
|
555
|
+
176: <span class="ruby-identifier">delete</span> <span class="ruby-node">"routes/#{r['dst']}-#{r['gateway']}-#{r['interface_display_name'].downcase}"</span>
|
|
556
|
+
177: <span class="ruby-keyword kw">end</span>
|
|
557
|
+
178: <span class="ruby-keyword kw">end</span></pre>
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
</div>
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
<div id="clear-vlans-method" class="method-detail ">
|
|
569
|
+
<a name="method-i-clear_vlans"></a>
|
|
570
|
+
|
|
571
|
+
<div class="method-heading">
|
|
572
|
+
|
|
573
|
+
<span class="method-name">clear_vlans</span><span
|
|
574
|
+
class="method-args">()</span>
|
|
575
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
576
|
+
|
|
577
|
+
</div>
|
|
578
|
+
|
|
579
|
+
<div class="method-description">
|
|
580
|
+
|
|
581
|
+
<p>
|
|
582
|
+
clears all network vlans
|
|
583
|
+
</p>
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
<div class="method-source-code"
|
|
588
|
+
id="clear-vlans-source">
|
|
589
|
+
<pre>
|
|
590
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 147</span>
|
|
591
|
+
147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_vlans</span>
|
|
592
|
+
148: <span class="ruby-identifier">i</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"interfaces"</span>
|
|
593
|
+
149: <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>
|
|
594
|
+
150: <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>
|
|
595
|
+
151: <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>
|
|
596
|
+
152: <span class="ruby-identifier">delete</span> <span class="ruby-node">"interfaces/#{i['name']}"</span>
|
|
597
|
+
153: <span class="ruby-keyword kw">end</span>
|
|
598
|
+
154: <span class="ruby-keyword kw">end</span></pre>
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
</div>
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
</div>
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
<div id="create-method" class="method-detail ">
|
|
610
|
+
<a name="method-i-create"></a>
|
|
611
|
+
|
|
612
|
+
<div class="method-heading">
|
|
613
|
+
|
|
614
|
+
<span class="method-name">create</span><span
|
|
615
|
+
class="method-args">(json, e)</span>
|
|
616
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
617
|
+
|
|
618
|
+
</div>
|
|
619
|
+
|
|
620
|
+
<div class="method-description">
|
|
621
|
+
|
|
622
|
+
<p>
|
|
623
|
+
POST method to add a network element
|
|
624
|
+
</p>
|
|
625
|
+
<pre>
|
|
626
|
+
* json = the json string containing the element values
|
|
627
|
+
* e = the element to create (interfaces|hosts|routes)</pre>
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
<div class="method-source-code"
|
|
632
|
+
id="create-source">
|
|
633
|
+
<pre>
|
|
634
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 48</span>
|
|
635
|
+
48: <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>)
|
|
636
|
+
49: <span class="ruby-identifier">jstring</span> = <span class="ruby-identifier">json</span>
|
|
637
|
+
50: <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>
|
|
638
|
+
51: <span class="ruby-identifier">jstring</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">generate</span> <span class="ruby-identifier">json</span>
|
|
639
|
+
52: <span class="ruby-keyword kw">end</span>
|
|
640
|
+
53: <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>)
|
|
641
|
+
54: <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>
|
|
642
|
+
55: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
643
|
+
56: <span class="ruby-keyword kw">end</span></pre>
|
|
644
|
+
</div>
|
|
645
|
+
|
|
646
|
+
</div>
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
<div id="delete-method" class="method-detail ">
|
|
655
|
+
<a name="method-i-delete"></a>
|
|
656
|
+
|
|
657
|
+
<div class="method-heading">
|
|
658
|
+
|
|
659
|
+
<span class="method-name">delete</span><span
|
|
660
|
+
class="method-args">(e)</span>
|
|
661
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
662
|
+
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
<div class="method-description">
|
|
666
|
+
|
|
667
|
+
<p>
|
|
668
|
+
deletes the specified element
|
|
669
|
+
</p>
|
|
670
|
+
<pre>
|
|
671
|
+
* e = the element to delete</pre>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
<div class="method-source-code"
|
|
676
|
+
id="delete-source">
|
|
677
|
+
<pre>
|
|
678
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 60</span>
|
|
679
|
+
60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
680
|
+
61: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
681
|
+
62: <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>
|
|
682
|
+
63: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
683
|
+
64: <span class="ruby-keyword kw">end</span></pre>
|
|
684
|
+
</div>
|
|
685
|
+
|
|
686
|
+
</div>
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
</div>
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
<div id="get-method" class="method-detail ">
|
|
695
|
+
<a name="method-i-get"></a>
|
|
696
|
+
|
|
697
|
+
<div class="method-heading">
|
|
698
|
+
|
|
699
|
+
<span class="method-name">get</span><span
|
|
700
|
+
class="method-args">(e)</span>
|
|
701
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
702
|
+
|
|
703
|
+
</div>
|
|
704
|
+
|
|
705
|
+
<div class="method-description">
|
|
706
|
+
|
|
707
|
+
<p>
|
|
708
|
+
get - with no params, returns the entire netconfig json object
|
|
709
|
+
</p>
|
|
710
|
+
<pre>
|
|
711
|
+
* e = the element to retrieve (interfaces|hosts|routes, interfaces/a1 ...)</pre>
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
<div class="method-source-code"
|
|
716
|
+
id="get-source">
|
|
717
|
+
<pre>
|
|
718
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 20</span>
|
|
719
|
+
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">e</span>)
|
|
720
|
+
21: <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>)
|
|
721
|
+
22: <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>
|
|
722
|
+
23: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
723
|
+
24: <span class="ruby-keyword kw">end</span></pre>
|
|
724
|
+
</div>
|
|
725
|
+
|
|
726
|
+
</div>
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
</div>
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
<div id="modify-method" class="method-detail ">
|
|
735
|
+
<a name="method-i-modify"></a>
|
|
736
|
+
|
|
737
|
+
<div class="method-heading">
|
|
738
|
+
|
|
739
|
+
<span class="method-name">modify</span><span
|
|
740
|
+
class="method-args">(json, e)</span>
|
|
741
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
742
|
+
|
|
743
|
+
</div>
|
|
744
|
+
|
|
745
|
+
<div class="method-description">
|
|
746
|
+
|
|
747
|
+
<p>
|
|
748
|
+
PUT to modify netconfig element(s) to json values
|
|
749
|
+
</p>
|
|
750
|
+
<pre>
|
|
751
|
+
* json = the json string containing the modified values
|
|
752
|
+
* e = the element to modify (interfaces|hosts|routes)</pre>
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
<div class="method-source-code"
|
|
757
|
+
id="modify-source">
|
|
758
|
+
<pre>
|
|
759
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 29</span>
|
|
760
|
+
29: <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>)
|
|
761
|
+
30: <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>)
|
|
762
|
+
31: <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>
|
|
763
|
+
32: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
764
|
+
33: jstring = json @element = e unless json.is_a? String jstring = JSON.generate json end response = @http.put_json(e, jstring) msg response, Logger::DEBUG return response=end
|
|
765
|
+
34: <span class="ruby-keyword kw">end</span></pre>
|
|
766
|
+
</div>
|
|
767
|
+
|
|
768
|
+
</div>
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
<div id="resolve-hosts-method" class="method-detail ">
|
|
777
|
+
<a name="method-i-resolve_hosts"></a>
|
|
778
|
+
|
|
779
|
+
<div class="method-heading">
|
|
780
|
+
|
|
781
|
+
<span class="method-name">resolve_hosts</span><span
|
|
782
|
+
class="method-args">(name=nil)</span>
|
|
783
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
784
|
+
|
|
785
|
+
</div>
|
|
786
|
+
|
|
787
|
+
<div class="method-description">
|
|
788
|
+
|
|
789
|
+
<p>
|
|
790
|
+
use Dns to update host ip addresses. A new Host is added if not present
|
|
791
|
+
when the name is provided as argument
|
|
792
|
+
</p>
|
|
793
|
+
<pre>
|
|
794
|
+
* name = the name of the host to resolve</pre>
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
<div class="method-source-code"
|
|
799
|
+
id="resolve-hosts-source">
|
|
800
|
+
<pre>
|
|
801
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 112</span>
|
|
802
|
+
112: <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>)
|
|
803
|
+
113: <span class="ruby-identifier">response</span> = <span class="ruby-value str">""</span>
|
|
804
|
+
114: <span class="ruby-identifier">hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
|
805
|
+
115: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span>
|
|
806
|
+
116: <span class="ruby-identifier">hst</span> = <span class="ruby-identifier">get</span> <span class="ruby-value str">"hosts"</span>
|
|
807
|
+
117: <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>]}
|
|
808
|
+
118: <span class="ruby-keyword kw">else</span>
|
|
809
|
+
119: <span class="ruby-identifier">hosts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">name</span>
|
|
810
|
+
120: <span class="ruby-keyword kw">end</span>
|
|
811
|
+
121: <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>
|
|
812
|
+
122: <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>
|
|
813
|
+
123: <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>
|
|
814
|
+
124: <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>
|
|
815
|
+
125: <span class="ruby-identifier">json</span> = <span class="ruby-identifier">get</span> <span class="ruby-node">"hosts/#{h}"</span>
|
|
816
|
+
126: <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>
|
|
817
|
+
127: <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>}
|
|
818
|
+
128: <span class="ruby-identifier">response</span> = <span class="ruby-identifier">create</span> <span class="ruby-identifier">json</span>, <span class="ruby-value str">"hosts"</span>
|
|
819
|
+
129: <span class="ruby-keyword kw">else</span>
|
|
820
|
+
130: <span class="ruby-identifier">json</span>[<span class="ruby-value str">"v4_addr"</span>] = <span class="ruby-identifier">v4_addr</span>
|
|
821
|
+
131: <span class="ruby-identifier">response</span> = <span class="ruby-identifier">modify</span> <span class="ruby-identifier">json</span>, <span class="ruby-node">"hosts/#{h}"</span>
|
|
822
|
+
132: <span class="ruby-keyword kw">end</span>
|
|
823
|
+
133: <span class="ruby-keyword kw">end</span>
|
|
824
|
+
134: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
825
|
+
135: <span class="ruby-keyword kw">end</span></pre>
|
|
826
|
+
</div>
|
|
827
|
+
|
|
828
|
+
</div>
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
</div>
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
<div id="restore-method" class="method-detail ">
|
|
837
|
+
<a name="method-i-restore"></a>
|
|
838
|
+
|
|
839
|
+
<div class="method-heading">
|
|
840
|
+
|
|
841
|
+
<span class="method-name">restore</span><span
|
|
842
|
+
class="method-args">(filepath=nil,clear_existing=false)</span>
|
|
843
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
844
|
+
|
|
845
|
+
</div>
|
|
846
|
+
|
|
847
|
+
<div class="method-description">
|
|
848
|
+
|
|
849
|
+
<p>
|
|
850
|
+
updates a network configuration from file
|
|
851
|
+
</p>
|
|
852
|
+
<pre>
|
|
853
|
+
* filepath = the path to the json file
|
|
854
|
+
* clear_existing - boolean determining whether or not existing elements should be cleared</pre>
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
<div class="method-source-code"
|
|
859
|
+
id="restore-source">
|
|
860
|
+
<pre>
|
|
861
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 69</span>
|
|
862
|
+
69: <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>)
|
|
863
|
+
70: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">filepath</span>.<span class="ruby-identifier">nil?</span>
|
|
864
|
+
71: <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>))
|
|
865
|
+
72: <span class="ruby-keyword kw">end</span>
|
|
866
|
+
73: <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>
|
|
867
|
+
74: <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>]
|
|
868
|
+
75: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"hosts"</span>
|
|
869
|
+
76: <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>
|
|
870
|
+
77: <span class="ruby-identifier">clear_existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">clear_hosts</span>
|
|
871
|
+
78: <span class="ruby-identifier">restore_hosts</span> <span class="ruby-identifier">c</span>[<span class="ruby-value str">"hosts"</span>]
|
|
872
|
+
79: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"routes"</span>
|
|
873
|
+
80: <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>
|
|
874
|
+
81: <span class="ruby-identifier">clear_existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">clear_routes</span>
|
|
875
|
+
82: <span class="ruby-identifier">restore_routes</span> <span class="ruby-identifier">c</span>[<span class="ruby-value str">"routes"</span>]
|
|
876
|
+
83: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"interfaces"</span>
|
|
877
|
+
84: <span class="ruby-identifier">clear_existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">clear_vlans</span>
|
|
878
|
+
85: <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>
|
|
879
|
+
86: <span class="ruby-identifier">restore_interfaces</span> <span class="ruby-identifier">c</span>[<span class="ruby-value str">"interfaces"</span>]
|
|
880
|
+
87: <span class="ruby-keyword kw">end</span>
|
|
881
|
+
88: <span class="ruby-keyword kw">end</span>
|
|
882
|
+
89: <span class="ruby-keyword kw">end</span></pre>
|
|
883
|
+
</div>
|
|
884
|
+
|
|
885
|
+
</div>
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
</div>
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
<div id="restore-hosts-method" class="method-detail ">
|
|
894
|
+
<a name="method-i-restore_hosts"></a>
|
|
895
|
+
|
|
896
|
+
<div class="method-heading">
|
|
897
|
+
|
|
898
|
+
<span class="method-name">restore_hosts</span><span
|
|
899
|
+
class="method-args">(hosts)</span>
|
|
900
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
901
|
+
|
|
902
|
+
</div>
|
|
903
|
+
|
|
904
|
+
<div class="method-description">
|
|
905
|
+
|
|
906
|
+
<p>
|
|
907
|
+
restores the network hosts to the initial system states
|
|
908
|
+
</p>
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
<div class="method-source-code"
|
|
913
|
+
id="restore-hosts-source">
|
|
914
|
+
<pre>
|
|
915
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 101</span>
|
|
916
|
+
101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_hosts</span>(<span class="ruby-identifier">hosts</span>)
|
|
917
|
+
102: <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>
|
|
918
|
+
103: <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>
|
|
919
|
+
104: <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>
|
|
920
|
+
105: <span class="ruby-identifier">create</span>(<span class="ruby-identifier">h</span>,<span class="ruby-value str">"hosts"</span>)
|
|
921
|
+
106: <span class="ruby-keyword kw">end</span>
|
|
922
|
+
107: <span class="ruby-keyword kw">end</span></pre>
|
|
923
|
+
</div>
|
|
924
|
+
|
|
925
|
+
</div>
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
</div>
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
<div id="restore-interfaces-method" class="method-detail ">
|
|
934
|
+
<a name="method-i-restore_interfaces"></a>
|
|
935
|
+
|
|
936
|
+
<div class="method-heading">
|
|
937
|
+
|
|
938
|
+
<span class="method-name">restore_interfaces</span><span
|
|
939
|
+
class="method-args">(interfaces)</span>
|
|
940
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
941
|
+
|
|
942
|
+
</div>
|
|
943
|
+
|
|
944
|
+
<div class="method-description">
|
|
945
|
+
|
|
946
|
+
<p>
|
|
947
|
+
restores network interfaces to system initial settings
|
|
948
|
+
</p>
|
|
949
|
+
<pre>
|
|
950
|
+
* interfaces - the names of the interfaces to restore</pre>
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
<div class="method-source-code"
|
|
955
|
+
id="restore-interfaces-source">
|
|
956
|
+
<pre>
|
|
957
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 158</span>
|
|
958
|
+
158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_interfaces</span>(<span class="ruby-identifier">interfaces</span>)
|
|
959
|
+
159: <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>
|
|
960
|
+
160: <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>
|
|
961
|
+
161: <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>
|
|
962
|
+
162: <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>
|
|
963
|
+
163: <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>)
|
|
964
|
+
164: <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>]
|
|
965
|
+
165: <span class="ruby-keyword kw">end</span>
|
|
966
|
+
166: <span class="ruby-identifier">modify</span> [<span class="ruby-identifier">i</span>,<span class="ruby-node">"interfaces/#{i['name']}"</span>]
|
|
967
|
+
167: <span class="ruby-keyword kw">end</span>
|
|
968
|
+
168: <span class="ruby-keyword kw">end</span></pre>
|
|
969
|
+
</div>
|
|
970
|
+
|
|
971
|
+
</div>
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
</div>
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
<div id="restore-routes-method" class="method-detail ">
|
|
980
|
+
<a name="method-i-restore_routes"></a>
|
|
981
|
+
|
|
982
|
+
<div class="method-heading">
|
|
983
|
+
|
|
984
|
+
<span class="method-name">restore_routes</span><span
|
|
985
|
+
class="method-args">(routes)</span>
|
|
986
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
987
|
+
|
|
988
|
+
</div>
|
|
989
|
+
|
|
990
|
+
<div class="method-description">
|
|
991
|
+
|
|
992
|
+
<p>
|
|
993
|
+
restores network routes to system initial settings
|
|
994
|
+
</p>
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
<div class="method-source-code"
|
|
999
|
+
id="restore-routes-source">
|
|
1000
|
+
<pre>
|
|
1001
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 181</span>
|
|
1002
|
+
181: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_routes</span>(<span class="ruby-identifier">routes</span>)
|
|
1003
|
+
182: <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>
|
|
1004
|
+
183: <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>
|
|
1005
|
+
184: <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>
|
|
1006
|
+
185: <span class="ruby-identifier">create</span> <span class="ruby-identifier">r</span>,<span class="ruby-value str">"routes"</span>
|
|
1007
|
+
186: <span class="ruby-keyword kw">end</span>
|
|
1008
|
+
187: <span class="ruby-keyword kw">end</span></pre>
|
|
1009
|
+
</div>
|
|
1010
|
+
|
|
1011
|
+
</div>
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
</div>
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
<div id="save-method" class="method-detail ">
|
|
1020
|
+
<a name="method-i-save"></a>
|
|
1021
|
+
|
|
1022
|
+
<div class="method-heading">
|
|
1023
|
+
|
|
1024
|
+
<span class="method-name">save</span><span
|
|
1025
|
+
class="method-args">(e="all", filepath="config.json")</span>
|
|
1026
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1027
|
+
|
|
1028
|
+
</div>
|
|
1029
|
+
|
|
1030
|
+
<div class="method-description">
|
|
1031
|
+
|
|
1032
|
+
<p>
|
|
1033
|
+
writes the json config to filepath
|
|
1034
|
+
</p>
|
|
1035
|
+
<pre>
|
|
1036
|
+
* e = the element to save, or 'all'
|
|
1037
|
+
* filepath - the fully qualified name of the file to save to</pre>
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
<div class="method-source-code"
|
|
1042
|
+
id="save-source">
|
|
1043
|
+
<pre>
|
|
1044
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 192</span>
|
|
1045
|
+
192: <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>)
|
|
1046
|
+
193: <span class="ruby-identifier">json</span> = <span class="ruby-identifier">get</span> <span class="ruby-identifier">e</span>
|
|
1047
|
+
194: <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>))}
|
|
1048
|
+
195: <span class="ruby-keyword kw">end</span></pre>
|
|
1049
|
+
</div>
|
|
1050
|
+
|
|
1051
|
+
</div>
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
</div>
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
</div>
|
|
1060
|
+
|
|
1061
|
+
<div id="private-instance-method-details" class="method-section section">
|
|
1062
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
<div id="do-modify-method" class="method-detail ">
|
|
1066
|
+
<a name="method-i-do_modify"></a>
|
|
1067
|
+
|
|
1068
|
+
<div class="method-heading">
|
|
1069
|
+
|
|
1070
|
+
<span class="method-name">do_modify</span><span
|
|
1071
|
+
class="method-args">(json, e)</span>
|
|
1072
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1073
|
+
|
|
1074
|
+
</div>
|
|
1075
|
+
|
|
1076
|
+
<div class="method-description">
|
|
1077
|
+
|
|
1078
|
+
<p>
|
|
1079
|
+
restclient put was not recgonized as json PUT to modify netconfig
|
|
1080
|
+
element(s) to json values
|
|
1081
|
+
</p>
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
<div class="method-source-code"
|
|
1086
|
+
id="do-modify-source">
|
|
1087
|
+
<pre>
|
|
1088
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 201</span>
|
|
1089
|
+
201: <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>)
|
|
1090
|
+
202: <span class="ruby-identifier">jstring</span> = <span class="ruby-identifier">json</span>
|
|
1091
|
+
203: <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>
|
|
1092
|
+
204: <span class="ruby-identifier">jstring</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">generate</span> <span class="ruby-identifier">json</span>
|
|
1093
|
+
205: <span class="ruby-keyword kw">end</span>
|
|
1094
|
+
206: <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>
|
|
1095
|
+
207: <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>)
|
|
1096
|
+
208: <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>)
|
|
1097
|
+
209: <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>
|
|
1098
|
+
210: <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>)
|
|
1099
|
+
211: <span class="ruby-identifier">http</span>.<span class="ruby-identifier">use_ssl</span> = <span class="ruby-keyword kw">true</span>
|
|
1100
|
+
212: <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>
|
|
1101
|
+
213: <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>
|
|
1102
|
+
214: <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>})
|
|
1103
|
+
215: <span class="ruby-identifier">req</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">jstring</span>
|
|
1104
|
+
216: <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>)
|
|
1105
|
+
217: <span class="ruby-keyword kw">end</span>
|
|
1106
|
+
218: <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>
|
|
1107
|
+
219: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
|
1108
|
+
220: <span class="ruby-keyword kw">end</span></pre>
|
|
1109
|
+
</div>
|
|
1110
|
+
|
|
1111
|
+
</div>
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
</div>
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
<div id="http-request-method" class="method-detail ">
|
|
1120
|
+
<a name="method-i-http_request"></a>
|
|
1121
|
+
|
|
1122
|
+
<div class="method-heading">
|
|
1123
|
+
|
|
1124
|
+
<span class="method-name">http_request</span><span
|
|
1125
|
+
class="method-args">(http, req)</span>
|
|
1126
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1127
|
+
|
|
1128
|
+
</div>
|
|
1129
|
+
|
|
1130
|
+
<div class="method-description">
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
<div class="method-source-code"
|
|
1137
|
+
id="http-request-source">
|
|
1138
|
+
<pre>
|
|
1139
|
+
<span class="ruby-comment cmt"># File lib/mu/api/netconfig.rb, line 222</span>
|
|
1140
|
+
222: <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>)
|
|
1141
|
+
223: <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>)
|
|
1142
|
+
224: <span class="ruby-identifier">response</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">req</span>)
|
|
1143
|
+
225: <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>
|
|
1144
|
+
226: <span class="ruby-keyword kw">return</span> <span class="ruby-node">"Error status code #{response.code}\n#{response.body}"</span>
|
|
1145
|
+
227: <span class="ruby-keyword kw">end</span>
|
|
1146
|
+
228: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>
|
|
1147
|
+
229: <span class="ruby-keyword kw">end</span></pre>
|
|
1148
|
+
</div>
|
|
1149
|
+
|
|
1150
|
+
</div>
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
</div>
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
</div>
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
</div>
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
1165
|
+
|
|
1166
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
1167
|
+
|
|
1168
|
+
</div>
|
|
1169
|
+
|
|
1170
|
+
<div id="validator-badges">
|
|
1171
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
1172
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
1173
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
1174
|
+
</div>
|
|
1175
|
+
|
|
1176
|
+
</body>
|
|
1177
|
+
</html>
|
|
1178
|
+
|