ohai 14.2.0 → 14.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Rakefile +1 -1
  4. data/lib/ohai/application.rb +29 -29
  5. data/lib/ohai/common/dmi.rb +5 -5
  6. data/lib/ohai/dsl/plugin.rb +3 -3
  7. data/lib/ohai/dsl/plugin/versionvii.rb +3 -3
  8. data/lib/ohai/mixin/azure_metadata.rb +2 -2
  9. data/lib/ohai/mixin/do_metadata.rb +3 -3
  10. data/lib/ohai/mixin/ec2_metadata.rb +8 -8
  11. data/lib/ohai/mixin/gce_metadata.rb +2 -2
  12. data/lib/ohai/mixin/network_constants.rb +1 -1
  13. data/lib/ohai/mixin/scaleway_metadata.rb +3 -3
  14. data/lib/ohai/mixin/softlayer_metadata.rb +1 -1
  15. data/lib/ohai/mixin/string.rb +2 -2
  16. data/lib/ohai/plugins/aix/cpu.rb +3 -3
  17. data/lib/ohai/plugins/aix/filesystem.rb +1 -1
  18. data/lib/ohai/plugins/aix/kernel.rb +1 -1
  19. data/lib/ohai/plugins/aix/memory.rb +1 -1
  20. data/lib/ohai/plugins/aix/network.rb +3 -3
  21. data/lib/ohai/plugins/bsd/virtualization.rb +1 -1
  22. data/lib/ohai/plugins/cloud.rb +1 -1
  23. data/lib/ohai/plugins/darwin/hardware.rb +1 -1
  24. data/lib/ohai/plugins/darwin/network.rb +5 -5
  25. data/lib/ohai/plugins/darwin/platform.rb +1 -1
  26. data/lib/ohai/plugins/dmi.rb +6 -6
  27. data/lib/ohai/plugins/filesystem.rb +5 -5
  28. data/lib/ohai/plugins/hostname.rb +5 -5
  29. data/lib/ohai/plugins/kernel.rb +8 -8
  30. data/lib/ohai/plugins/linux/lspci.rb +4 -4
  31. data/lib/ohai/plugins/linux/memory.rb +4 -4
  32. data/lib/ohai/plugins/linux/network.rb +16 -16
  33. data/lib/ohai/plugins/linux/platform.rb +7 -1
  34. data/lib/ohai/plugins/netbsd/network.rb +1 -1
  35. data/lib/ohai/plugins/network.rb +5 -5
  36. data/lib/ohai/plugins/openbsd/network.rb +1 -1
  37. data/lib/ohai/plugins/packages.rb +1 -1
  38. data/lib/ohai/plugins/passwd.rb +4 -4
  39. data/lib/ohai/plugins/ruby.rb +13 -13
  40. data/lib/ohai/plugins/solaris2/dmi.rb +3 -3
  41. data/lib/ohai/plugins/solaris2/filesystem.rb +6 -6
  42. data/lib/ohai/plugins/solaris2/memory.rb +2 -2
  43. data/lib/ohai/plugins/solaris2/network.rb +36 -36
  44. data/lib/ohai/plugins/windows/network.rb +2 -2
  45. data/lib/ohai/util/win32/group_helper.rb +1 -1
  46. data/lib/ohai/version.rb +1 -1
  47. data/spec/functional/application_spec.rb +6 -6
  48. data/spec/functional/loader_spec.rb +4 -4
  49. data/spec/functional/plugins/windows/uptime_spec.rb +1 -2
  50. data/spec/spec_helper.rb +5 -5
  51. data/spec/unit/application_spec.rb +11 -11
  52. data/spec/unit/config_spec.rb +5 -5
  53. data/spec/unit/dsl/plugin_spec.rb +5 -5
  54. data/spec/unit/hints_spec.rb +2 -2
  55. data/spec/unit/loader_spec.rb +41 -41
  56. data/spec/unit/mixin/azure_metadata_spec.rb +3 -3
  57. data/spec/unit/mixin/command_spec.rb +64 -64
  58. data/spec/unit/mixin/ec2_metadata_spec.rb +6 -6
  59. data/spec/unit/mixin/softlayer_metadata_spec.rb +1 -1
  60. data/spec/unit/plugin_config_spec.rb +9 -9
  61. data/spec/unit/plugins/abort_spec.rb +6 -6
  62. data/spec/unit/plugins/aix/cpu_spec.rb +16 -16
  63. data/spec/unit/plugins/aix/filesystem_spec.rb +57 -57
  64. data/spec/unit/plugins/aix/network_spec.rb +35 -35
  65. data/spec/unit/plugins/aix/virtualization_spec.rb +210 -210
  66. data/spec/unit/plugins/azure_spec.rb +49 -49
  67. data/spec/unit/plugins/bsd/filesystem_spec.rb +13 -13
  68. data/spec/unit/plugins/bsd/virtualization_spec.rb +10 -10
  69. data/spec/unit/plugins/c_spec.rb +54 -54
  70. data/spec/unit/plugins/chef_spec.rb +3 -3
  71. data/spec/unit/plugins/darwin/cpu_spec.rb +54 -54
  72. data/spec/unit/plugins/darwin/filesystem_spec.rb +34 -34
  73. data/spec/unit/plugins/darwin/hardware_system_profiler_output.rb +1070 -1070
  74. data/spec/unit/plugins/darwin/memory_spec.rb +16 -16
  75. data/spec/unit/plugins/darwin/network_spec.rb +382 -382
  76. data/spec/unit/plugins/digital_ocean_spec.rb +7 -7
  77. data/spec/unit/plugins/dmi_spec.rb +83 -83
  78. data/spec/unit/plugins/docker_spec.rb +2 -2
  79. data/spec/unit/plugins/ec2_spec.rb +156 -156
  80. data/spec/unit/plugins/eucalyptus_spec.rb +19 -19
  81. data/spec/unit/plugins/fail_spec.rb +14 -14
  82. data/spec/unit/plugins/freebsd/cpu_spec.rb +18 -18
  83. data/spec/unit/plugins/freebsd/kernel_spec.rb +1 -1
  84. data/spec/unit/plugins/gce_spec.rb +1 -1
  85. data/spec/unit/plugins/init_package_spec.rb +1 -1
  86. data/spec/unit/plugins/java_spec.rb +4 -4
  87. data/spec/unit/plugins/joyent_spec.rb +9 -9
  88. data/spec/unit/plugins/linux/block_device_spec.rb +1 -1
  89. data/spec/unit/plugins/linux/cpu_spec.rb +155 -155
  90. data/spec/unit/plugins/linux/filesystem_spec.rb +229 -229
  91. data/spec/unit/plugins/linux/kernel_spec.rb +9 -9
  92. data/spec/unit/plugins/linux/lsb_spec.rb +18 -18
  93. data/spec/unit/plugins/linux/lspci_spec.rb +58 -58
  94. data/spec/unit/plugins/linux/mdadm_spec.rb +54 -54
  95. data/spec/unit/plugins/linux/memory_spec.rb +35 -35
  96. data/spec/unit/plugins/linux/network_spec.rb +464 -464
  97. data/spec/unit/plugins/linux/platform_spec.rb +84 -68
  98. data/spec/unit/plugins/linux/systemd_paths_spec.rb +40 -40
  99. data/spec/unit/plugins/linux/uptime_spec.rb +1 -1
  100. data/spec/unit/plugins/linux/virtualization_spec.rb +197 -197
  101. data/spec/unit/plugins/mono_spec.rb +11 -11
  102. data/spec/unit/plugins/netbsd/kernel_spec.rb +1 -1
  103. data/spec/unit/plugins/network_spec.rb +2 -2
  104. data/spec/unit/plugins/openstack_spec.rb +43 -43
  105. data/spec/unit/plugins/os_spec.rb +1 -1
  106. data/spec/unit/plugins/passwd_spec.rb +9 -9
  107. data/spec/unit/plugins/php_spec.rb +22 -22
  108. data/spec/unit/plugins/powershell_spec.rb +13 -13
  109. data/spec/unit/plugins/rackspace_spec.rb +38 -38
  110. data/spec/unit/plugins/ruby_spec.rb +14 -14
  111. data/spec/unit/plugins/scaleway_spec.rb +6 -6
  112. data/spec/unit/plugins/scsi_spec.rb +7 -7
  113. data/spec/unit/plugins/solaris2/cpu_spec.rb +2594 -2594
  114. data/spec/unit/plugins/solaris2/dmi_spec.rb +91 -91
  115. data/spec/unit/plugins/solaris2/filesystem.rb +8 -8
  116. data/spec/unit/plugins/solaris2/kernel_spec.rb +1 -1
  117. data/spec/unit/plugins/solaris2/network_spec.rb +92 -93
  118. data/spec/unit/plugins/solaris2/platform_spec.rb +24 -24
  119. data/spec/unit/plugins/solaris2/virtualization_spec.rb +22 -22
  120. data/spec/unit/plugins/ssh_host_keys_spec.rb +12 -12
  121. data/spec/unit/plugins/sysconf_spec.rb +321 -321
  122. data/spec/unit/plugins/virtualbox_spec.rb +27 -27
  123. data/spec/unit/plugins/windows/cpu_spec.rb +9 -9
  124. data/spec/unit/plugins/windows/kernel_spec.rb +12 -12
  125. data/spec/unit/plugins/windows/uptime_spec.rb +1 -1
  126. data/spec/unit/plugins/zpools_spec.rb +41 -41
  127. data/spec/unit/runner_spec.rb +2 -2
  128. data/spec/unit/system_spec.rb +55 -55
  129. metadata +3 -4
  130. data/docs/man/man1/ohai.1 +0 -97
@@ -24,349 +24,349 @@ describe Ohai::System, "Linux Network Plugin" do
24
24
  let(:plugin) { get_plugin("linux/network") }
25
25
 
26
26
  let(:linux_ifconfig) do
27
- <<-EOM
28
- eth0 Link encap:Ethernet HWaddr 12:31:3D:02:BE:A2
29
- inet addr:10.116.201.76 Bcast:10.116.201.255 Mask:255.255.255.0
30
- inet6 addr: fe80::1031:3dff:fe02:bea2/64 Scope:Link
31
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
32
- RX packets:2659966 errors:0 dropped:0 overruns:0 frame:0
33
- TX packets:1919690 errors:0 dropped:0 overruns:0 carrier:0
34
- collisions:0 txqueuelen:1000
35
- RX bytes:1392844460 (1.2 GiB) TX bytes:691785313 (659.7 MiB)
36
- Interrupt:16
37
-
38
- eth0:5 Link encap:Ethernet HWaddr 00:0c:29:41:71:45
39
- inet addr:192.168.5.1 Bcast:192.168.5.255 Mask:255.255.255.0
40
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
41
-
42
- eth0.11 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
43
- inet addr:192.168.0.16 Bcast:192.168.0.255 Mask:255.255.255.0
44
- inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
45
- inet6 addr: 1111:2222:3333:4444::2/64 Scope:Global
46
- inet6 addr: 1111:2222:3333:4444::3/64 Scope:Global
47
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
48
- RX packets:1208795008 errors:0 dropped:0 overruns:0 frame:0
49
- TX packets:3269635153 errors:0 dropped:0 overruns:0 carrier:0
50
- collisions:0 txqueuelen:0
51
- RX bytes:1751940374 (1.6 GiB) TX bytes:2195567597 (2.0 GiB)
52
-
53
- eth0.151 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
54
- inet addr:10.151.0.16 Bcast:10.151.0.255 Mask:255.255.255.0
55
- inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
56
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
57
- RX packets:206553677 errors:0 dropped:0 overruns:0 frame:0
58
- TX packets:163901336 errors:0 dropped:0 overruns:0 carrier:0
59
- collisions:0 txqueuelen:0
60
- RX bytes:3190792261 (2.9 GiB) TX bytes:755086548 (720.1 MiB)
61
-
62
- eth0.152 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
63
- inet addr:10.152.1.16 Bcast:10.152.3.255 Mask:255.255.252.0
64
- inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
65
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
66
- RX packets:14016741 errors:0 dropped:0 overruns:0 frame:0
67
- TX packets:55232 errors:0 dropped:0 overruns:0 carrier:0
68
- collisions:0 txqueuelen:0
69
- RX bytes:664957462 (634.1 MiB) TX bytes:4876434 (4.6 MiB)
70
-
71
- eth0.153 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
72
- inet addr:10.153.1.16 Bcast:10.153.3.255 Mask:255.255.252.0
73
- inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
74
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
75
- RX packets:2022667595 errors:0 dropped:0 overruns:0 frame:0
76
- TX packets:1798627472 errors:0 dropped:0 overruns:0 carrier:0
77
- collisions:0 txqueuelen:0
78
- RX bytes:4047036732 (3.7 GiB) TX bytes:3451231474 (3.2 GiB)
79
-
80
- foo:veth0@eth0 Link encap:Ethernet HWaddr ca:b3:73:8b:0c:e4
81
- BROADCAST MULTICAST MTU:1500 Metric:1
82
-
83
- tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
84
- inet addr:172.16.19.39 P-t-P:172.16.19.1 Mask:255.255.255.255
85
- UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1418 Metric:1
86
- RX packets:57200 errors:0 dropped:0 overruns:0 frame:0
87
- TX packets:13782 errors:0 dropped:0 overruns:0 carrier:0
88
- collisions:0 txqueuelen:100
89
- RX bytes:7377600 (7.0 MiB) TX bytes:1175481 (1.1 MiB)
90
-
91
- venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
92
- UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1418 Metric:1
93
- RX packets:57200 errors:0 dropped:0 overruns:0 frame:0
94
- TX packets:13782 errors:0 dropped:0 overruns:0 carrier:0
95
- collisions:0 txqueuelen:100
96
- RX bytes:7377600 (7.0 MiB) TX bytes:1175481 (1.1 MiB)
97
-
98
- venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
99
- UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1418 Metric:1
100
- RX packets:57200 errors:0 dropped:0 overruns:0 frame:0
101
- TX packets:13782 errors:0 dropped:0 overruns:0 carrier:0
102
- collisions:0 txqueuelen:100
103
- RX bytes:7377600 (7.0 MiB) TX bytes:1175481 (1.1 MiB)
104
-
105
- lo Link encap:Local Loopback
106
- inet addr:127.0.0.1 Mask:255.0.0.0
107
- inet6 addr: ::1/128 Scope:Host
108
- UP LOOPBACK RUNNING MTU:16436 Metric:1
109
- RX packets:524 errors:0 dropped:0 overruns:0 frame:0
110
- TX packets:524 errors:0 dropped:0 overruns:0 carrier:0
111
- collisions:0 txqueuelen:0
112
- RX bytes:35224 (34.3 KiB) TX bytes:35224 (34.3 KiB)
113
-
114
- eth3 Link encap:Ethernet HWaddr E8:39:35:C5:C8:54
115
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
116
- RX packets:13395101 errors:0 dropped:0 overruns:0 frame:0
117
- TX packets:9492909 errors:0 dropped:0 overruns:0 carrier:0
118
- collisions:0 txqueuelen:1000
119
- RX bytes:1325650573 (1.2 GiB) TX bytes:1666310189 (1.5 GiB)
120
- Interrupt:36 Memory:f4800000-f4ffffff
121
-
122
- ovs-system Link encap:Ethernet HWaddr 7A:7A:80:80:6C:24
123
- BROADCAST MULTICAST MTU:1500 Metric:1
124
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
125
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
126
- collisions:0 txqueuelen:0
127
- RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
128
-
129
- xapi1 Link encap:Ethernet HWaddr E8:39:35:C5:C8:50
130
- inet addr:192.168.13.34 Bcast:192.168.13.255 Mask:255.255.255.0
131
- UP BROADCAST RUNNING MTU:1500 Metric:1
132
- RX packets:160275 errors:0 dropped:0 overruns:0 frame:0
133
- TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
134
- collisions:0 txqueuelen:0
135
- RX bytes:21515031 (20.5 MiB) TX bytes:2052 (2.0 KiB)
136
-
137
- fwdintf Link encap:Ethernet HWaddr 00:00:00:00:00:0a
138
- inet6 addr: fe80::200:ff:fe00:a/64 Scope:Link
139
- UP RUNNING NOARP MULTICAST MTU:1496 Metric:1
140
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
141
- TX packets:2 errors:0 dropped:1 overruns:0 carrier:0
142
- collisions:0 txqueuelen:1000
143
- RX bytes:0 (0.0 B) TX bytes:140 (140.0 B)
27
+ <<~EOM
28
+ eth0 Link encap:Ethernet HWaddr 12:31:3D:02:BE:A2
29
+ inet addr:10.116.201.76 Bcast:10.116.201.255 Mask:255.255.255.0
30
+ inet6 addr: fe80::1031:3dff:fe02:bea2/64 Scope:Link
31
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
32
+ RX packets:2659966 errors:0 dropped:0 overruns:0 frame:0
33
+ TX packets:1919690 errors:0 dropped:0 overruns:0 carrier:0
34
+ collisions:0 txqueuelen:1000
35
+ RX bytes:1392844460 (1.2 GiB) TX bytes:691785313 (659.7 MiB)
36
+ Interrupt:16
37
+
38
+ eth0:5 Link encap:Ethernet HWaddr 00:0c:29:41:71:45
39
+ inet addr:192.168.5.1 Bcast:192.168.5.255 Mask:255.255.255.0
40
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
41
+
42
+ eth0.11 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
43
+ inet addr:192.168.0.16 Bcast:192.168.0.255 Mask:255.255.255.0
44
+ inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
45
+ inet6 addr: 1111:2222:3333:4444::2/64 Scope:Global
46
+ inet6 addr: 1111:2222:3333:4444::3/64 Scope:Global
47
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
48
+ RX packets:1208795008 errors:0 dropped:0 overruns:0 frame:0
49
+ TX packets:3269635153 errors:0 dropped:0 overruns:0 carrier:0
50
+ collisions:0 txqueuelen:0
51
+ RX bytes:1751940374 (1.6 GiB) TX bytes:2195567597 (2.0 GiB)
52
+
53
+ eth0.151 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
54
+ inet addr:10.151.0.16 Bcast:10.151.0.255 Mask:255.255.255.0
55
+ inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
56
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
57
+ RX packets:206553677 errors:0 dropped:0 overruns:0 frame:0
58
+ TX packets:163901336 errors:0 dropped:0 overruns:0 carrier:0
59
+ collisions:0 txqueuelen:0
60
+ RX bytes:3190792261 (2.9 GiB) TX bytes:755086548 (720.1 MiB)
61
+
62
+ eth0.152 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
63
+ inet addr:10.152.1.16 Bcast:10.152.3.255 Mask:255.255.252.0
64
+ inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
65
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
66
+ RX packets:14016741 errors:0 dropped:0 overruns:0 frame:0
67
+ TX packets:55232 errors:0 dropped:0 overruns:0 carrier:0
68
+ collisions:0 txqueuelen:0
69
+ RX bytes:664957462 (634.1 MiB) TX bytes:4876434 (4.6 MiB)
70
+
71
+ eth0.153 Link encap:Ethernet HWaddr 00:aa:bb:cc:dd:ee
72
+ inet addr:10.153.1.16 Bcast:10.153.3.255 Mask:255.255.252.0
73
+ inet6 addr: fe80::2aa:bbff:fecc:ddee/64 Scope:Link
74
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
75
+ RX packets:2022667595 errors:0 dropped:0 overruns:0 frame:0
76
+ TX packets:1798627472 errors:0 dropped:0 overruns:0 carrier:0
77
+ collisions:0 txqueuelen:0
78
+ RX bytes:4047036732 (3.7 GiB) TX bytes:3451231474 (3.2 GiB)
79
+
80
+ foo:veth0@eth0 Link encap:Ethernet HWaddr ca:b3:73:8b:0c:e4
81
+ BROADCAST MULTICAST MTU:1500 Metric:1
82
+
83
+ tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
84
+ inet addr:172.16.19.39 P-t-P:172.16.19.1 Mask:255.255.255.255
85
+ UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1418 Metric:1
86
+ RX packets:57200 errors:0 dropped:0 overruns:0 frame:0
87
+ TX packets:13782 errors:0 dropped:0 overruns:0 carrier:0
88
+ collisions:0 txqueuelen:100
89
+ RX bytes:7377600 (7.0 MiB) TX bytes:1175481 (1.1 MiB)
90
+
91
+ venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
92
+ UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1418 Metric:1
93
+ RX packets:57200 errors:0 dropped:0 overruns:0 frame:0
94
+ TX packets:13782 errors:0 dropped:0 overruns:0 carrier:0
95
+ collisions:0 txqueuelen:100
96
+ RX bytes:7377600 (7.0 MiB) TX bytes:1175481 (1.1 MiB)
97
+
98
+ venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
99
+ UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1418 Metric:1
100
+ RX packets:57200 errors:0 dropped:0 overruns:0 frame:0
101
+ TX packets:13782 errors:0 dropped:0 overruns:0 carrier:0
102
+ collisions:0 txqueuelen:100
103
+ RX bytes:7377600 (7.0 MiB) TX bytes:1175481 (1.1 MiB)
104
+
105
+ lo Link encap:Local Loopback
106
+ inet addr:127.0.0.1 Mask:255.0.0.0
107
+ inet6 addr: ::1/128 Scope:Host
108
+ UP LOOPBACK RUNNING MTU:16436 Metric:1
109
+ RX packets:524 errors:0 dropped:0 overruns:0 frame:0
110
+ TX packets:524 errors:0 dropped:0 overruns:0 carrier:0
111
+ collisions:0 txqueuelen:0
112
+ RX bytes:35224 (34.3 KiB) TX bytes:35224 (34.3 KiB)
113
+
114
+ eth3 Link encap:Ethernet HWaddr E8:39:35:C5:C8:54
115
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
116
+ RX packets:13395101 errors:0 dropped:0 overruns:0 frame:0
117
+ TX packets:9492909 errors:0 dropped:0 overruns:0 carrier:0
118
+ collisions:0 txqueuelen:1000
119
+ RX bytes:1325650573 (1.2 GiB) TX bytes:1666310189 (1.5 GiB)
120
+ Interrupt:36 Memory:f4800000-f4ffffff
121
+
122
+ ovs-system Link encap:Ethernet HWaddr 7A:7A:80:80:6C:24
123
+ BROADCAST MULTICAST MTU:1500 Metric:1
124
+ RX packets:0 errors:0 dropped:0 overruns:0 frame:0
125
+ TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
126
+ collisions:0 txqueuelen:0
127
+ RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
128
+
129
+ xapi1 Link encap:Ethernet HWaddr E8:39:35:C5:C8:50
130
+ inet addr:192.168.13.34 Bcast:192.168.13.255 Mask:255.255.255.0
131
+ UP BROADCAST RUNNING MTU:1500 Metric:1
132
+ RX packets:160275 errors:0 dropped:0 overruns:0 frame:0
133
+ TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
134
+ collisions:0 txqueuelen:0
135
+ RX bytes:21515031 (20.5 MiB) TX bytes:2052 (2.0 KiB)
136
+
137
+ fwdintf Link encap:Ethernet HWaddr 00:00:00:00:00:0a
138
+ inet6 addr: fe80::200:ff:fe00:a/64 Scope:Link
139
+ UP RUNNING NOARP MULTICAST MTU:1496 Metric:1
140
+ RX packets:0 errors:0 dropped:0 overruns:0 frame:0
141
+ TX packets:2 errors:0 dropped:1 overruns:0 carrier:0
142
+ collisions:0 txqueuelen:1000
143
+ RX bytes:0 (0.0 B) TX bytes:140 (140.0 B)
144
144
  EOM
145
145
  # Note that ifconfig shows foo:veth0@eth0 but fails to show any address information.
146
146
  # This was not a mistake collecting the output and Apparently ifconfig is broken in this regard.
147
147
  end
148
148
 
149
149
  let(:linux_ip_route) do
150
- <<-EOM
151
- 10.116.201.0/24 dev eth0 proto kernel
152
- 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
153
- 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
154
- 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
155
- 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
156
- 10.5.4.0/24 \\ nexthop via 10.5.4.1 dev eth0 weight 1\\ nexthop via 10.5.4.2 dev eth0 weight 1
157
- default via 10.116.201.1 dev eth0
150
+ <<~EOM
151
+ 10.116.201.0/24 dev eth0 proto kernel
152
+ 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
153
+ 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
154
+ 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
155
+ 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
156
+ 10.5.4.0/24 \\ nexthop via 10.5.4.1 dev eth0 weight 1\\ nexthop via 10.5.4.2 dev eth0 weight 1
157
+ default via 10.116.201.1 dev eth0
158
158
  EOM
159
159
  end
160
160
 
161
161
  let(:linux_route_n) do
162
- <<-EOM
163
- Kernel IP routing table
164
- Destination Gateway Genmask Flags Metric Ref Use Iface
165
- 10.116.201.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
166
- 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
167
- 0.0.0.0 10.116.201.1 0.0.0.0 UG 0 0 0 eth0
162
+ <<~EOM
163
+ Kernel IP routing table
164
+ Destination Gateway Genmask Flags Metric Ref Use Iface
165
+ 10.116.201.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
166
+ 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
167
+ 0.0.0.0 10.116.201.1 0.0.0.0 UG 0 0 0 eth0
168
168
  EOM
169
169
  end
170
170
 
171
171
  let(:linux_ip_route_inet6) do
172
- <<-EOM
173
- fe80::/64 dev eth0 proto kernel metric 256
174
- fe80::/64 dev eth0.11 proto kernel metric 256
175
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 expires 86023sec
176
- default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
172
+ <<~EOM
173
+ fe80::/64 dev eth0 proto kernel metric 256
174
+ fe80::/64 dev eth0.11 proto kernel metric 256
175
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 expires 86023sec
176
+ default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
177
177
  EOM
178
178
  end
179
179
 
180
180
  let(:linux_ip_addr) do
181
- <<-EOM
182
- 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
183
- link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
184
- inet 127.0.0.1/8 scope host lo
185
- inet6 ::1/128 scope host
186
- valid_lft forever preferred_lft forever
187
- 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
188
- link/ether 12:31:3d:02:be:a2 brd ff:ff:ff:ff:ff:ff
189
- inet 10.116.201.76/24 brd 10.116.201.255 scope global eth0
190
- inet 10.116.201.75/32 scope global eth0
191
- inet 10.116.201.74/24 scope global secondary eth0
192
- inet 192.168.5.1/24 brd 192.168.5.255 scope global eth0:5
193
- inet6 fe80::1031:3dff:fe02:bea2/64 scope link
194
- valid_lft forever preferred_lft forever
195
- inet6 2001:44b8:4160:8f00:a00:27ff:fe13:eacd/64 scope global dynamic
196
- valid_lft 6128sec preferred_lft 2526sec
197
- 3: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
198
- link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
199
- inet 192.168.0.16/24 brd 192.168.0.255 scope global eth0.11
200
- inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
201
- inet6 1111:2222:3333:4444::2/64 scope global
202
- valid_lft forever preferred_lft forever
203
- inet6 1111:2222:3333:4444::3/64 scope global
204
- valid_lft forever preferred_lft forever
205
- 4: eth0.151@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
206
- link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
207
- inet 10.151.0.16/24 brd 10.151.0.255 scope global eth0.151
208
- inet 10.151.1.16/24 scope global eth0.151
209
- inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
210
- valid_lft forever preferred_lft forever
211
- 5: eth0.152@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
212
- link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
213
- inet 10.152.1.16/22 brd 10.152.3.255 scope global eth0.152
214
- inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
215
- valid_lft forever preferred_lft forever
216
- 6: eth0.153@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
217
- link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
218
- inet 10.153.1.16/22 brd 10.153.3.255 scope global eth0.153
219
- inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
220
- valid_lft forever preferred_lft forever
221
- 7: foo:veth0@eth0@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
222
- link/ether ca:b3:73:8b:0c:e4 brd ff:ff:ff:ff:ff:ff
223
- inet 192.168.212.2/24 scope global foo:veth0@eth0
224
- 8: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
225
- link/none
226
- inet 172.16.19.39 peer 172.16.19.1 scope global tun0
227
- 9: venet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
228
- link/void
229
- inet 127.0.0.2/32 scope host venet0
230
- inet 172.16.19.48/32 scope global venet0:0
231
- 12: xapi1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
232
- link/ether e8:39:35:c5:c8:50 brd ff:ff:ff:ff:ff:ff
233
- inet 192.168.13.34/24 brd 192.168.13.255 scope global xapi1
234
- valid_lft forever preferred_lft forever
235
- 13: fwdintf: <MULTICAST,NOARP,UP,LOWER_UP> mtu 1496 qdisc pfifo_fast state UNKNOWN group default qlen 1000
236
- link/ether 00:00:00:00:00:0a brd ff:ff:ff:ff:ff:ff
237
- 14: ip6tnl0@NONE: <NOARP,UP,LOWER_UP> mtu 1452 qdisc noqueue state UNKNOWN group default qlen 1
238
- link/tunnel6 :: brd ::
239
- inet6 fe80::f47a:2aff:fef0:c6ef/64 scope link
240
- valid_lft forever preferred_lft forever
181
+ <<~EOM
182
+ 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
183
+ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
184
+ inet 127.0.0.1/8 scope host lo
185
+ inet6 ::1/128 scope host
186
+ valid_lft forever preferred_lft forever
187
+ 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
188
+ link/ether 12:31:3d:02:be:a2 brd ff:ff:ff:ff:ff:ff
189
+ inet 10.116.201.76/24 brd 10.116.201.255 scope global eth0
190
+ inet 10.116.201.75/32 scope global eth0
191
+ inet 10.116.201.74/24 scope global secondary eth0
192
+ inet 192.168.5.1/24 brd 192.168.5.255 scope global eth0:5
193
+ inet6 fe80::1031:3dff:fe02:bea2/64 scope link
194
+ valid_lft forever preferred_lft forever
195
+ inet6 2001:44b8:4160:8f00:a00:27ff:fe13:eacd/64 scope global dynamic
196
+ valid_lft 6128sec preferred_lft 2526sec
197
+ 3: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
198
+ link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
199
+ inet 192.168.0.16/24 brd 192.168.0.255 scope global eth0.11
200
+ inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
201
+ inet6 1111:2222:3333:4444::2/64 scope global
202
+ valid_lft forever preferred_lft forever
203
+ inet6 1111:2222:3333:4444::3/64 scope global
204
+ valid_lft forever preferred_lft forever
205
+ 4: eth0.151@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
206
+ link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
207
+ inet 10.151.0.16/24 brd 10.151.0.255 scope global eth0.151
208
+ inet 10.151.1.16/24 scope global eth0.151
209
+ inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
210
+ valid_lft forever preferred_lft forever
211
+ 5: eth0.152@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
212
+ link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
213
+ inet 10.152.1.16/22 brd 10.152.3.255 scope global eth0.152
214
+ inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
215
+ valid_lft forever preferred_lft forever
216
+ 6: eth0.153@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
217
+ link/ether 00:aa:bb:cc:dd:ee brd ff:ff:ff:ff:ff:ff
218
+ inet 10.153.1.16/22 brd 10.153.3.255 scope global eth0.153
219
+ inet6 fe80::2e0:81ff:fe2b:48e7/64 scope link
220
+ valid_lft forever preferred_lft forever
221
+ 7: foo:veth0@eth0@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
222
+ link/ether ca:b3:73:8b:0c:e4 brd ff:ff:ff:ff:ff:ff
223
+ inet 192.168.212.2/24 scope global foo:veth0@eth0
224
+ 8: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
225
+ link/none
226
+ inet 172.16.19.39 peer 172.16.19.1 scope global tun0
227
+ 9: venet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
228
+ link/void
229
+ inet 127.0.0.2/32 scope host venet0
230
+ inet 172.16.19.48/32 scope global venet0:0
231
+ 12: xapi1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
232
+ link/ether e8:39:35:c5:c8:50 brd ff:ff:ff:ff:ff:ff
233
+ inet 192.168.13.34/24 brd 192.168.13.255 scope global xapi1
234
+ valid_lft forever preferred_lft forever
235
+ 13: fwdintf: <MULTICAST,NOARP,UP,LOWER_UP> mtu 1496 qdisc pfifo_fast state UNKNOWN group default qlen 1000
236
+ link/ether 00:00:00:00:00:0a brd ff:ff:ff:ff:ff:ff
237
+ 14: ip6tnl0@NONE: <NOARP,UP,LOWER_UP> mtu 1452 qdisc noqueue state UNKNOWN group default qlen 1
238
+ link/tunnel6 :: brd ::
239
+ inet6 fe80::f47a:2aff:fef0:c6ef/64 scope link
240
+ valid_lft forever preferred_lft forever
241
241
  EOM
242
242
  end
243
243
 
244
244
  let(:linux_ip_link_s_d) do
245
- <<-EOM
246
- 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
247
- link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
248
- RX: bytes packets errors dropped overrun mcast
249
- 35224 524 0 0 0 0
250
- TX: bytes packets errors dropped carrier collsns
251
- 35224 524 0 0 0 0
252
- 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
253
- link/ether 12:31:3d:02:be:a2 brd ff:ff:ff:ff:ff:ff
254
- RX: bytes packets errors dropped overrun mcast
255
- 1392844460 2659966 0 0 0 0
256
- TX: bytes packets errors dropped carrier collsns
257
- 691785313 1919690 0 0 0 0
258
- 3: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
259
- link/ether 00:0c:29:41:71:45 brd ff:ff:ff:ff:ff:ff
260
- vlan id 11 <REORDER_HDR>
261
- RX: bytes packets errors dropped overrun mcast
262
- 0 0 0 0 0 0
263
- TX: bytes packets errors dropped carrier collsns
264
- 0 0 0 0 0 0
265
- 4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
266
- link/none
267
- RX: bytes packets errors dropped overrun mcast
268
- 1392844460 2659966 0 0 0 0
269
- TX: bytes packets errors dropped carrier collsns
270
- 691785313 1919690 0 0 0 0
271
- 5: venet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
272
- link/void
273
- RX: bytes packets errors dropped overrun mcast
274
- 1392844460 2659966 0 0 0 0
275
- TX: bytes packets errors dropped carrier collsns
276
- 691785313 1919690 0 0 0 0
277
- 10: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP mode DEFAULT qlen 1000
278
- link/ether e8:39:35:c5:c8:54 brd ff:ff:ff:ff:ff:ff
279
- RX: bytes packets errors dropped overrun mcast
280
- 1321907045 13357087 0 0 0 3126613
281
- TX: bytes packets errors dropped carrier collsns
282
- 1661526184 9467091 0 0 0 0
283
- 11: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT
284
- link/ether 7a:7a:80:80:6c:24 brd ff:ff:ff:ff:ff:ff
285
- RX: bytes packets errors dropped overrun mcast
286
- 0 0 0 0 0 0
287
- TX: bytes packets errors dropped carrier collsns
288
- 0 0 0 0 0 0
289
- 12: xapi1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
290
- link/ether e8:39:35:c5:c8:50 brd ff:ff:ff:ff:ff:ff
291
- RX: bytes packets errors dropped overrun mcast
292
- 21468183 159866 0 0 0 0
293
- TX: bytes packets errors dropped carrier collsns
294
- 2052 6 0 0 0 0
295
- 13: fwdintf: <MULTICAST,NOARP,UP,LOWER_UP> mtu 1496 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
296
- link/ether 00:00:00:00:00:0a brd ff:ff:ff:ff:ff:ff promiscuity 0
297
- RX: bytes packets errors dropped overrun mcast
298
- 0 0 0 0 0 0
299
- TX: bytes packets errors dropped carrier collsns
300
- 140 2 0 1 0 0
301
- 14: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1
302
- link/tunnel6 :: brd :: promiscuity 0
303
- ip6tnl ip6ip6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
304
- RX: bytes packets errors dropped overrun mcast
305
- 0 0 0 0 0 0
306
- TX: bytes packets errors dropped carrier collsns
307
- 0 0 0 0 0 0
245
+ <<~EOM
246
+ 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
247
+ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
248
+ RX: bytes packets errors dropped overrun mcast
249
+ 35224 524 0 0 0 0
250
+ TX: bytes packets errors dropped carrier collsns
251
+ 35224 524 0 0 0 0
252
+ 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
253
+ link/ether 12:31:3d:02:be:a2 brd ff:ff:ff:ff:ff:ff
254
+ RX: bytes packets errors dropped overrun mcast
255
+ 1392844460 2659966 0 0 0 0
256
+ TX: bytes packets errors dropped carrier collsns
257
+ 691785313 1919690 0 0 0 0
258
+ 3: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
259
+ link/ether 00:0c:29:41:71:45 brd ff:ff:ff:ff:ff:ff
260
+ vlan id 11 <REORDER_HDR>
261
+ RX: bytes packets errors dropped overrun mcast
262
+ 0 0 0 0 0 0
263
+ TX: bytes packets errors dropped carrier collsns
264
+ 0 0 0 0 0 0
265
+ 4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
266
+ link/none
267
+ RX: bytes packets errors dropped overrun mcast
268
+ 1392844460 2659966 0 0 0 0
269
+ TX: bytes packets errors dropped carrier collsns
270
+ 691785313 1919690 0 0 0 0
271
+ 5: venet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
272
+ link/void
273
+ RX: bytes packets errors dropped overrun mcast
274
+ 1392844460 2659966 0 0 0 0
275
+ TX: bytes packets errors dropped carrier collsns
276
+ 691785313 1919690 0 0 0 0
277
+ 10: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP mode DEFAULT qlen 1000
278
+ link/ether e8:39:35:c5:c8:54 brd ff:ff:ff:ff:ff:ff
279
+ RX: bytes packets errors dropped overrun mcast
280
+ 1321907045 13357087 0 0 0 3126613
281
+ TX: bytes packets errors dropped carrier collsns
282
+ 1661526184 9467091 0 0 0 0
283
+ 11: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT
284
+ link/ether 7a:7a:80:80:6c:24 brd ff:ff:ff:ff:ff:ff
285
+ RX: bytes packets errors dropped overrun mcast
286
+ 0 0 0 0 0 0
287
+ TX: bytes packets errors dropped carrier collsns
288
+ 0 0 0 0 0 0
289
+ 12: xapi1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
290
+ link/ether e8:39:35:c5:c8:50 brd ff:ff:ff:ff:ff:ff
291
+ RX: bytes packets errors dropped overrun mcast
292
+ 21468183 159866 0 0 0 0
293
+ TX: bytes packets errors dropped carrier collsns
294
+ 2052 6 0 0 0 0
295
+ 13: fwdintf: <MULTICAST,NOARP,UP,LOWER_UP> mtu 1496 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
296
+ link/ether 00:00:00:00:00:0a brd ff:ff:ff:ff:ff:ff promiscuity 0
297
+ RX: bytes packets errors dropped overrun mcast
298
+ 0 0 0 0 0 0
299
+ TX: bytes packets errors dropped carrier collsns
300
+ 140 2 0 1 0 0
301
+ 14: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1
302
+ link/tunnel6 :: brd :: promiscuity 0
303
+ ip6tnl ip6ip6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
304
+ RX: bytes packets errors dropped overrun mcast
305
+ 0 0 0 0 0 0
306
+ TX: bytes packets errors dropped carrier collsns
307
+ 0 0 0 0 0 0
308
308
  EOM
309
309
  end
310
310
 
311
311
  let(:linux_arp_an) do
312
- <<-EOM
313
- ? (10.116.201.1) at fe:ff:ff:ff:ff:ff [ether] on eth0
312
+ <<~EOM
313
+ ? (10.116.201.1) at fe:ff:ff:ff:ff:ff [ether] on eth0
314
314
  EOM
315
315
  end
316
316
 
317
317
  let(:linux_ip_neighbor_show) do
318
- <<-EOM
319
- 10.116.201.1 dev eth0 lladdr fe:ff:ff:ff:ff:ff REACHABLE
318
+ <<~EOM
319
+ 10.116.201.1 dev eth0 lladdr fe:ff:ff:ff:ff:ff REACHABLE
320
320
  EOM
321
321
  end
322
322
 
323
323
  let(:linux_ip_inet6_neighbor_show) do
324
- <<-EOM
325
- 1111:2222:3333:4444::1 dev eth0.11 lladdr 00:1c:0e:12:34:56 router REACHABLE
326
- fe80::21c:eff:fe12:3456 dev eth0.11 lladdr 00:1c:0e:30:28:00 router REACHABLE
327
- fe80::21c:eff:fe12:3456 dev eth0.153 lladdr 00:1c:0e:30:28:00 router REACHABLE
324
+ <<~EOM
325
+ 1111:2222:3333:4444::1 dev eth0.11 lladdr 00:1c:0e:12:34:56 router REACHABLE
326
+ fe80::21c:eff:fe12:3456 dev eth0.11 lladdr 00:1c:0e:30:28:00 router REACHABLE
327
+ fe80::21c:eff:fe12:3456 dev eth0.153 lladdr 00:1c:0e:30:28:00 router REACHABLE
328
328
  EOM
329
329
  end
330
330
 
331
331
  let(:linux_ethtool) do
332
- <<-EOM
333
- Settings for eth0:
334
- Supported ports: [ FIBRE ]
335
- Supported link modes: 1000baseT/Full
336
- 10000baseT/Full
337
- Supported pause frame use: No
338
- Supports auto-negotiation: Yes
339
- Advertised link modes: 1000baseT/Full
340
- 10000baseT/Full
341
- Advertised pause frame use: No
342
- Advertised auto-negotiation: Yes
343
- Speed: 10000Mb/s
344
- Duplex: Full
345
- Port: FIBRE
346
- PHYAD: 0
347
- Transceiver: external
348
- Auto-negotiation: on
349
- Supports Wake-on: d
350
- Wake-on: d
351
- Current message level: 0x00000007 (7)
352
- drv probe link
353
- Link detected: yes
332
+ <<~EOM
333
+ Settings for eth0:
334
+ Supported ports: [ FIBRE ]
335
+ Supported link modes: 1000baseT/Full
336
+ 10000baseT/Full
337
+ Supported pause frame use: No
338
+ Supports auto-negotiation: Yes
339
+ Advertised link modes: 1000baseT/Full
340
+ 10000baseT/Full
341
+ Advertised pause frame use: No
342
+ Advertised auto-negotiation: Yes
343
+ Speed: 10000Mb/s
344
+ Duplex: Full
345
+ Port: FIBRE
346
+ PHYAD: 0
347
+ Transceiver: external
348
+ Auto-negotiation: on
349
+ Supports Wake-on: d
350
+ Wake-on: d
351
+ Current message level: 0x00000007 (7)
352
+ drv probe link
353
+ Link detected: yes
354
354
  EOM
355
355
  end
356
356
 
357
357
  let(:linux_ethtool_g) do
358
- <<-EOM
359
- Ring parameters for eth0:
360
- Pre-set maximums:
361
- RX: 8192
362
- RX Mini: 0
363
- RX Jumbo: 0
364
- TX: 8192
365
- Current hardware settings:
366
- RX: 8192
367
- RX Mini: 0
368
- RX Jumbo: 0
369
- TX: 8192
358
+ <<~EOM
359
+ Ring parameters for eth0:
360
+ Pre-set maximums:
361
+ RX: 8192
362
+ RX Mini: 0
363
+ RX Jumbo: 0
364
+ TX: 8192
365
+ Current hardware settings:
366
+ RX: 8192
367
+ RX Mini: 0
368
+ RX Jumbo: 0
369
+ TX: 8192
370
370
 
371
371
  EOM
372
372
  end
@@ -745,18 +745,18 @@ EOM
745
745
 
746
746
  describe "with a link level default route" do
747
747
  let(:linux_ip_route) do
748
- <<-EOM
749
- 10.116.201.0/24 dev eth0 proto kernel
750
- default dev eth0 scope link
748
+ <<~EOM
749
+ 10.116.201.0/24 dev eth0 proto kernel
750
+ default dev eth0 scope link
751
751
  EOM
752
752
  end
753
753
 
754
754
  let(:linux_route_n) do
755
- <<-EOM
756
- Kernel IP routing table
757
- Destination Gateway Genmask Flags Metric Ref Use Iface
758
- 10.116.201.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
759
- 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0
755
+ <<~EOM
756
+ Kernel IP routing table
757
+ Destination Gateway Genmask Flags Metric Ref Use Iface
758
+ 10.116.201.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
759
+ 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0
760
760
  EOM
761
761
  end
762
762
 
@@ -775,18 +775,18 @@ EOM
775
775
 
776
776
  describe "with a subinterface" do
777
777
  let(:linux_ip_route) do
778
- <<-EOM
779
- 192.168.0.0/24 dev eth0.11 proto kernel src 192.168.0.2
780
- default via 192.168.0.15 dev eth0.11
778
+ <<~EOM
779
+ 192.168.0.0/24 dev eth0.11 proto kernel src 192.168.0.2
780
+ default via 192.168.0.15 dev eth0.11
781
781
  EOM
782
782
  end
783
783
 
784
784
  let(:linux_route_n) do
785
- <<-EOM
786
- Kernel IP routing table
787
- Destination Gateway Genmask Flags Metric Ref Use Iface
788
- 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.11
789
- 0.0.0.0 192.168.0.15 0.0.0.0 UG 0 0 0 eth0.11
785
+ <<~EOM
786
+ Kernel IP routing table
787
+ Destination Gateway Genmask Flags Metric Ref Use Iface
788
+ 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.11
789
+ 0.0.0.0 192.168.0.15 0.0.0.0 UG 0 0 0 eth0.11
790
790
  EOM
791
791
  end
792
792
 
@@ -873,21 +873,21 @@ EOM
873
873
  describe "when dealing with routes" do
874
874
  it "adds routes" do
875
875
  plugin.run
876
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( :destination => "10.116.201.0/24", :proto => "kernel", :family => "inet" )
877
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( :destination => "10.5.4.0/24", :family => "inet", :via => "10.5.4.1")
878
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( :destination => "10.5.4.0/24", :family => "inet", :via => "10.5.4.2")
879
- expect(plugin["network"]["interfaces"]["foo:veth0@eth0"]["routes"]).to include Mash.new( :destination => "192.168.212.0/24", :proto => "kernel", :src => "192.168.212.2", :family => "inet" )
880
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( :destination => "fe80::/64", :metric => "256", :proto => "kernel", :family => "inet6" )
881
- expect(plugin["network"]["interfaces"]["eth0.11"]["routes"]).to include Mash.new( :destination => "1111:2222:3333:4444::/64", :metric => "1024", :family => "inet6" )
882
- expect(plugin["network"]["interfaces"]["eth0.11"]["routes"]).to include Mash.new( :destination => "default", :via => "1111:2222:3333:4444::1", :metric => "1024", :family => "inet6")
876
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( destination: "10.116.201.0/24", proto: "kernel", family: "inet" )
877
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( destination: "10.5.4.0/24", family: "inet", via: "10.5.4.1")
878
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( destination: "10.5.4.0/24", family: "inet", via: "10.5.4.2")
879
+ expect(plugin["network"]["interfaces"]["foo:veth0@eth0"]["routes"]).to include Mash.new( destination: "192.168.212.0/24", proto: "kernel", src: "192.168.212.2", family: "inet" )
880
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).to include Mash.new( destination: "fe80::/64", metric: "256", proto: "kernel", family: "inet6" )
881
+ expect(plugin["network"]["interfaces"]["eth0.11"]["routes"]).to include Mash.new( destination: "1111:2222:3333:4444::/64", metric: "1024", family: "inet6" )
882
+ expect(plugin["network"]["interfaces"]["eth0.11"]["routes"]).to include Mash.new( destination: "default", via: "1111:2222:3333:4444::1", metric: "1024", family: "inet6")
883
883
  end
884
884
 
885
885
  describe "when there isn't a source field in route entries and no ipv6 default routes" do
886
886
  let(:linux_ip_route_inet6) do
887
- <<-EOM
888
- fe80::/64 dev eth0 proto kernel metric 256
889
- fe80::/64 dev eth0.11 proto kernel metric 256
890
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 expires 86023sec
887
+ <<~EOM
888
+ fe80::/64 dev eth0 proto kernel metric 256
889
+ fe80::/64 dev eth0.11 proto kernel metric 256
890
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 expires 86023sec
891
891
  EOM
892
892
  end
893
893
 
@@ -910,22 +910,22 @@ EOM
910
910
 
911
911
  describe "when there's a source field in the default route entry" do
912
912
  let(:linux_ip_route) do
913
- <<-EOM
914
- 10.116.201.0/24 dev eth0 proto kernel
915
- 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
916
- 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
917
- 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
918
- 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
919
- default via 10.116.201.1 dev eth0 src 10.116.201.76
913
+ <<~EOM
914
+ 10.116.201.0/24 dev eth0 proto kernel
915
+ 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
916
+ 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
917
+ 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
918
+ 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
919
+ default via 10.116.201.1 dev eth0 src 10.116.201.76
920
920
  EOM
921
921
  end
922
922
 
923
923
  let(:linux_ip_route_inet6) do
924
- <<-EOM
925
- fe80::/64 dev eth0 proto kernel metric 256
926
- fe80::/64 dev eth0.11 proto kernel metric 256
927
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024
928
- default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
924
+ <<~EOM
925
+ fe80::/64 dev eth0 proto kernel metric 256
926
+ fe80::/64 dev eth0.11 proto kernel metric 256
927
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024
928
+ default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
929
929
  EOM
930
930
  end
931
931
 
@@ -949,24 +949,24 @@ EOM
949
949
 
950
950
  describe "when there're several default routes" do
951
951
  let(:linux_ip_route) do
952
- <<-EOM
953
- 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
954
- 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
955
- 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
956
- 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
957
- 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
958
- default via 10.116.201.1 dev eth0 metric 10
959
- default via 10.116.201.254 dev eth0 metric 9
952
+ <<~EOM
953
+ 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
954
+ 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
955
+ 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
956
+ 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
957
+ 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
958
+ default via 10.116.201.1 dev eth0 metric 10
959
+ default via 10.116.201.254 dev eth0 metric 9
960
960
  EOM
961
961
  end
962
962
 
963
963
  let(:linux_ip_route_inet6) do
964
- <<-EOM
965
- fe80::/64 dev eth0 proto kernel metric 256
966
- fe80::/64 dev eth0.11 proto kernel metric 256
967
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
968
- default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
969
- default via 1111:2222:3333:4444::ffff dev eth0.11 metric 1023
964
+ <<~EOM
965
+ fe80::/64 dev eth0 proto kernel metric 256
966
+ fe80::/64 dev eth0.11 proto kernel metric 256
967
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
968
+ default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
969
+ default via 1111:2222:3333:4444::ffff dev eth0.11 metric 1023
970
970
  EOM
971
971
  end
972
972
 
@@ -992,24 +992,24 @@ EOM
992
992
 
993
993
  describe "when there're a mixed setup of routes that could be used to set ipaddress" do
994
994
  let(:linux_ip_route) do
995
- <<-EOM
996
- 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
997
- 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
998
- 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
999
- 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1000
- 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1001
- default via 10.116.201.1 dev eth0 metric 10
1002
- default via 10.116.201.254 dev eth0 metric 9 src 10.116.201.74
995
+ <<~EOM
996
+ 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
997
+ 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
998
+ 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
999
+ 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1000
+ 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1001
+ default via 10.116.201.1 dev eth0 metric 10
1002
+ default via 10.116.201.254 dev eth0 metric 9 src 10.116.201.74
1003
1003
  EOM
1004
1004
  end
1005
1005
 
1006
1006
  let(:linux_ip_route_inet6) do
1007
- <<-EOM
1008
- fe80::/64 dev eth0 proto kernel metric 256
1009
- fe80::/64 dev eth0.11 proto kernel metric 256
1010
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1011
- default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1012
- default via 1111:2222:3333:4444::ffff dev eth0.11 metric 1023 src 1111:2222:3333:4444::2
1007
+ <<~EOM
1008
+ fe80::/64 dev eth0 proto kernel metric 256
1009
+ fe80::/64 dev eth0.11 proto kernel metric 256
1010
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1011
+ default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1012
+ default via 1111:2222:3333:4444::ffff dev eth0.11 metric 1023 src 1111:2222:3333:4444::2
1013
1013
  EOM
1014
1014
  end
1015
1015
 
@@ -1033,22 +1033,22 @@ EOM
1033
1033
 
1034
1034
  describe "when there's a source field in a local route entry but it isnt in the default route" do
1035
1035
  let(:linux_ip_route) do
1036
- <<-EOM
1037
- 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
1038
- 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
1039
- 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
1040
- 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1041
- 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1042
- default via 10.116.201.1 dev eth0
1036
+ <<~EOM
1037
+ 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
1038
+ 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
1039
+ 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
1040
+ 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1041
+ 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1042
+ default via 10.116.201.1 dev eth0
1043
1043
  EOM
1044
1044
  end
1045
1045
 
1046
1046
  let(:linux_ip_route_inet6) do
1047
- <<-EOM
1048
- fe80::/64 dev eth0 proto kernel metric 256
1049
- fe80::/64 dev eth0.11 proto kernel metric 256
1050
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1051
- default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1047
+ <<~EOM
1048
+ fe80::/64 dev eth0 proto kernel metric 256
1049
+ fe80::/64 dev eth0.11 proto kernel metric 256
1050
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1051
+ default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1052
1052
  EOM
1053
1053
  end
1054
1054
 
@@ -1086,9 +1086,9 @@ EOM
1086
1086
 
1087
1087
  context "when then ipv4 interface has the NOARP flag and no ipv6 routes exist" do
1088
1088
  let(:linux_ip_route) do
1089
- <<-EOM
1090
- 10.118.19.1 dev tun0 proto kernel src 10.118.19.39
1091
- default via 172.16.19.1 dev tun0
1089
+ <<~EOM
1090
+ 10.118.19.1 dev tun0 proto kernel src 10.118.19.39
1091
+ default via 172.16.19.1 dev tun0
1092
1092
  EOM
1093
1093
  end
1094
1094
  let(:linux_ip_route_inet6) { "" }
@@ -1109,8 +1109,8 @@ EOM
1109
1109
 
1110
1110
  describe "with a link level default route" do
1111
1111
  let(:linux_ip_route) do
1112
- <<-EOM
1113
- default dev venet0 scope link
1112
+ <<~EOM
1113
+ default dev venet0 scope link
1114
1114
  EOM
1115
1115
  end
1116
1116
 
@@ -1130,8 +1130,8 @@ EOM
1130
1130
 
1131
1131
  describe "with a link level default route to an unaddressed int" do
1132
1132
  let(:linux_ip_route) do
1133
- <<-EOM
1134
- default dev eth3 scope link
1133
+ <<~EOM
1134
+ default dev eth3 scope link
1135
1135
  EOM
1136
1136
  end
1137
1137
 
@@ -1155,8 +1155,8 @@ EOM
1155
1155
 
1156
1156
  describe "with a link level default route with a source" do
1157
1157
  let(:linux_ip_route) do
1158
- <<-EOM
1159
- default dev fwdintf scope link src 2.2.2.2
1158
+ <<~EOM
1159
+ default dev fwdintf scope link src 2.2.2.2
1160
1160
  EOM
1161
1161
  end
1162
1162
 
@@ -1180,9 +1180,9 @@ EOM
1180
1180
 
1181
1181
  describe "when not having a global scope ipv6 address" do
1182
1182
  let(:linux_ip_route_inet6) do
1183
- <<-EOM
1184
- fe80::/64 dev eth0 proto kernel metric 256
1185
- default via fe80::21c:eff:fe12:3456 dev eth0.153 src fe80::2e0:81ff:fe2b:48e7 metric 1024
1183
+ <<~EOM
1184
+ fe80::/64 dev eth0 proto kernel metric 256
1185
+ default via fe80::21c:eff:fe12:3456 dev eth0.153 src fe80::2e0:81ff:fe2b:48e7 metric 1024
1186
1186
  EOM
1187
1187
  end
1188
1188
  before(:each) do
@@ -1202,20 +1202,20 @@ EOM
1202
1202
 
1203
1203
  describe "with no default route" do
1204
1204
  let(:linux_ip_route) do
1205
- <<-EOM
1206
- 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
1207
- 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
1208
- 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
1209
- 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1210
- 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1205
+ <<~EOM
1206
+ 10.116.201.0/24 dev eth0 proto kernel src 10.116.201.76
1207
+ 192.168.5.0/24 dev eth0 proto kernel src 192.168.5.1
1208
+ 192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
1209
+ 172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1210
+ 192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1211
1211
  EOM
1212
1212
  end
1213
1213
 
1214
1214
  let(:linux_ip_route_inet6) do
1215
- <<-EOM
1216
- fe80::/64 dev eth0 proto kernel metric 256
1217
- fe80::/64 dev eth0.11 proto kernel metric 256
1218
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1215
+ <<~EOM
1216
+ fe80::/64 dev eth0 proto kernel metric 256
1217
+ fe80::/64 dev eth0.11 proto kernel metric 256
1218
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1219
1219
  EOM
1220
1220
  end
1221
1221
 
@@ -1240,18 +1240,18 @@ EOM
1240
1240
  describe "with openvz setup" do
1241
1241
  let(:linux_ip_route) { "default dev venet0 scope link" }
1242
1242
  let(:linux_ip_addr) do
1243
- <<-EOM
1244
- 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
1245
- link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
1246
- inet 127.0.0.1/8 scope host lo
1247
- inet6 ::1/128 scope host
1248
- valid_lft forever preferred_lft forever
1249
- 2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
1250
- link/void
1251
- inet 127.0.0.2/32 scope host venet0
1252
- inet 10.116.201.76/24 brd 10.116.201.255 scope global venet0:0
1253
- inet6 2001:44b8:4160:8f00:a00:27ff:fe13:eacd/64 scope global dynamic
1254
- valid_lft 6128sec preferred_lft 2526sec
1243
+ <<~EOM
1244
+ 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
1245
+ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
1246
+ inet 127.0.0.1/8 scope host lo
1247
+ inet6 ::1/128 scope host
1248
+ valid_lft forever preferred_lft forever
1249
+ 2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
1250
+ link/void
1251
+ inet 127.0.0.2/32 scope host venet0
1252
+ inet 10.116.201.76/24 brd 10.116.201.255 scope global venet0:0
1253
+ inet6 2001:44b8:4160:8f00:a00:27ff:fe13:eacd/64 scope global dynamic
1254
+ valid_lft 6128sec preferred_lft 2526sec
1255
1255
  EOM
1256
1256
  end
1257
1257
  # We don't have the corresponding ipv6 data for these tests
@@ -1275,31 +1275,31 @@ EOM
1275
1275
  end
1276
1276
 
1277
1277
  it "sets correct routing information" do
1278
- expect(plugin["network"]["interfaces"]["venet0:0"]["routes"]).to eq([Mash.new( :destination => "default", :family => "inet", :scope => "link" )])
1278
+ expect(plugin["network"]["interfaces"]["venet0:0"]["routes"]).to eq([Mash.new( destination: "default", family: "inet", scope: "link" )])
1279
1279
  end
1280
1280
 
1281
1281
  it "sets correct address information" do
1282
- expect(plugin["network"]["interfaces"]["venet0:0"]["addresses"]).to eq("10.116.201.76" => Mash.new(:family => "inet", :prefixlen => "24", :netmask => "255.255.255.0", :broadcast => "10.116.201.255", :scope => "Global"))
1282
+ expect(plugin["network"]["interfaces"]["venet0:0"]["addresses"]).to eq("10.116.201.76" => Mash.new(family: "inet", prefixlen: "24", netmask: "255.255.255.0", broadcast: "10.116.201.255", scope: "Global"))
1283
1283
  end
1284
1284
  end
1285
1285
 
1286
1286
  describe "with irrelevant routes (container setups)" do
1287
1287
  let(:linux_ip_route) do
1288
- <<-EOM
1289
- 10.116.201.0/26 dev eth0 proto kernel src 10.116.201.39
1290
- 10.116.201.0/26 dev if4 proto kernel src 10.116.201.45
1291
- 10.118.19.0/26 dev eth0 proto kernel src 10.118.19.39
1292
- 10.118.19.0/26 dev if5 proto kernel src 10.118.19.45
1293
- default via 10.116.201.1 dev eth0 src 10.116.201.99
1288
+ <<~EOM
1289
+ 10.116.201.0/26 dev eth0 proto kernel src 10.116.201.39
1290
+ 10.116.201.0/26 dev if4 proto kernel src 10.116.201.45
1291
+ 10.118.19.0/26 dev eth0 proto kernel src 10.118.19.39
1292
+ 10.118.19.0/26 dev if5 proto kernel src 10.118.19.45
1293
+ default via 10.116.201.1 dev eth0 src 10.116.201.99
1294
1294
  EOM
1295
1295
  end
1296
1296
 
1297
1297
  let(:linux_ip_route_inet6) do
1298
- <<-EOM
1299
- fe80::/64 dev eth0 proto kernel metric 256
1300
- fe80::/64 dev eth0.11 proto kernel metric 256
1301
- 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::FFFF:2
1302
- default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1298
+ <<~EOM
1299
+ fe80::/64 dev eth0 proto kernel metric 256
1300
+ fe80::/64 dev eth0.11 proto kernel metric 256
1301
+ 1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::FFFF:2
1302
+ default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1303
1303
  EOM
1304
1304
  end
1305
1305
 
@@ -1313,9 +1313,9 @@ EOM
1313
1313
  end
1314
1314
 
1315
1315
  it "doesn't add bogus routes" do
1316
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).not_to include Mash.new( :destination => "10.116.201.0/26", :proto => "kernel", :family => "inet", :via => "10.116.201.39" )
1317
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).not_to include Mash.new( :destination => "10.118.19.0/26", :proto => "kernel", :family => "inet", :via => "10.118.19.39" )
1318
- expect(plugin["network"]["interfaces"]["eth0"]["routes"]).not_to include Mash.new( :destination => "1111:2222:3333:4444::/64", :family => "inet6", :metric => "1024" )
1316
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).not_to include Mash.new( destination: "10.116.201.0/26", proto: "kernel", family: "inet", via: "10.116.201.39" )
1317
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).not_to include Mash.new( destination: "10.118.19.0/26", proto: "kernel", family: "inet", via: "10.118.19.39" )
1318
+ expect(plugin["network"]["interfaces"]["eth0"]["routes"]).not_to include Mash.new( destination: "1111:2222:3333:4444::/64", family: "inet6", metric: "1024" )
1319
1319
  end
1320
1320
 
1321
1321
  it "doesn't set ipaddress" do
@@ -1330,8 +1330,8 @@ EOM
1330
1330
  # This should never happen in the real world.
1331
1331
  describe "when encountering a surprise interface" do
1332
1332
  let(:linux_ip_route) do
1333
- <<-EOM
1334
- 192.168.122.0/24 dev virbr0 proto kernel src 192.168.122.1
1333
+ <<~EOM
1334
+ 192.168.122.0/24 dev virbr0 proto kernel src 192.168.122.1
1335
1335
  EOM
1336
1336
  end
1337
1337
 
@@ -1344,38 +1344,38 @@ EOM
1344
1344
 
1345
1345
  describe "when running with ip version ss131122" do
1346
1346
  let(:linux_ip_link_s_d) do
1347
- <<-EOM
1348
- 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT group default
1349
- link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0
1350
- RX: bytes packets errors dropped overrun mcast
1351
- 35224 524 0 0 0 0
1352
- TX: bytes packets errors dropped carrier collsns
1353
- 35224 524 0 0 0 0
1354
- 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
1355
- link/ether 12:31:3d:02:be:a2 brd ff:ff:ff:ff:ff:ff promiscuity 0
1356
- RX: bytes packets errors dropped overrun mcast
1357
- 1392844460 2659966 0 0 0 0
1358
- TX: bytes packets errors dropped carrier collsns
1359
- 691785313 1919690 0 0 0 0
1360
- 3: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
1361
- link/ether 00:0c:29:41:71:45 brd ff:ff:ff:ff:ff:ff promiscuity 0
1362
- vlan protocol 802.1Q id 11 <REORDER_HDR>
1363
- RX: bytes packets errors dropped overrun mcast
1364
- 0 0 0 0 0 0
1365
- TX: bytes packets errors dropped carrier collsns
1366
- 0 0 0 0 0 0
1367
- 4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
1368
- link/none promiscuity 0
1369
- RX: bytes packets errors dropped overrun mcast
1370
- 1392844460 2659966 0 0 0 0
1371
- TX: bytes packets errors dropped carrier collsns
1372
- 691785313 1919690 0 0 0 0
1373
- 5: venet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
1374
- link/void promiscuity 0
1375
- RX: bytes packets errors dropped overrun mcast
1376
- 1392844460 2659966 0 0 0 0
1377
- TX: bytes packets errors dropped carrier collsns
1378
- 691785313 1919690 0 0 0 0
1347
+ <<~EOM
1348
+ 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT group default
1349
+ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0
1350
+ RX: bytes packets errors dropped overrun mcast
1351
+ 35224 524 0 0 0 0
1352
+ TX: bytes packets errors dropped carrier collsns
1353
+ 35224 524 0 0 0 0
1354
+ 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
1355
+ link/ether 12:31:3d:02:be:a2 brd ff:ff:ff:ff:ff:ff promiscuity 0
1356
+ RX: bytes packets errors dropped overrun mcast
1357
+ 1392844460 2659966 0 0 0 0
1358
+ TX: bytes packets errors dropped carrier collsns
1359
+ 691785313 1919690 0 0 0 0
1360
+ 3: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
1361
+ link/ether 00:0c:29:41:71:45 brd ff:ff:ff:ff:ff:ff promiscuity 0
1362
+ vlan protocol 802.1Q id 11 <REORDER_HDR>
1363
+ RX: bytes packets errors dropped overrun mcast
1364
+ 0 0 0 0 0 0
1365
+ TX: bytes packets errors dropped carrier collsns
1366
+ 0 0 0 0 0 0
1367
+ 4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
1368
+ link/none promiscuity 0
1369
+ RX: bytes packets errors dropped overrun mcast
1370
+ 1392844460 2659966 0 0 0 0
1371
+ TX: bytes packets errors dropped carrier collsns
1372
+ 691785313 1919690 0 0 0 0
1373
+ 5: venet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
1374
+ link/void promiscuity 0
1375
+ RX: bytes packets errors dropped overrun mcast
1376
+ 1392844460 2659966 0 0 0 0
1377
+ TX: bytes packets errors dropped carrier collsns
1378
+ 691785313 1919690 0 0 0 0
1379
1379
  EOM
1380
1380
  end
1381
1381