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
@@ -18,97 +18,97 @@
18
18
 
19
19
  require_relative "../../../spec_helper.rb"
20
20
 
21
- SOLARIS_DMI_OUT = <<-EOS
22
- ID SIZE TYPE
23
- 0 64 SMB_TYPE_BIOS (type 0) (BIOS information)
24
-
25
- Vendor: American Megatrends Inc.
26
- Version String: 4701
27
- Release Date: 08/26/2014
28
- Address Segment: 0xf000
29
- ROM Size: 8388608 bytes
30
- Image Size: 65536 bytes
31
- Characteristics: 0x53f8b9c80
32
- SMB_BIOSFL_PCI (PCI is supported)
33
- SMB_BIOSFL_APM (APM is supported)
34
- SMB_BIOSFL_FLASH (BIOS is Flash Upgradeable)
35
- SMB_BIOSFL_SHADOW (BIOS shadowing is allowed)
36
- SMB_BIOSFL_CDBOOT (Boot from CD is supported)
37
- SMB_BIOSFL_SELBOOT (Selectable Boot supported)
38
- SMB_BIOSFL_ROMSOCK (BIOS ROM is socketed)
39
- SMB_BIOSFL_EDD (EDD Spec is supported)
40
- SMB_BIOSFL_525_12M (int 0x13 5.25" 1.2M floppy)
41
- SMB_BIOSFL_35_720K (int 0x13 3.5" 720K floppy)
42
- SMB_BIOSFL_35_288M (int 0x13 3.5" 2.88M floppy)
43
- SMB_BIOSFL_I5_PRINT (int 0x5 print screen svcs)
44
- SMB_BIOSFL_I9_KBD (int 0x9 8042 keyboard svcs)
45
- SMB_BIOSFL_I14_SER (int 0x14 serial svcs)
46
- SMB_BIOSFL_I17_PRINTER (int 0x17 printer svcs)
47
- 0x100000000
48
- 0x400000000
49
- Characteristics Extension Byte 1: 0x3
50
- SMB_BIOSXB1_ACPI (ACPI is supported)
51
- SMB_BIOSXB1_USBL (USB legacy is supported)
52
- Characteristics Extension Byte 2: 0xd
53
- SMB_BIOSXB2_BBOOT (BIOS Boot Specification supported)
54
- SMB_BIOSXB2_ETCDIST (Enable Targeted Content Distrib.)
55
- SMB_BIOSXB2_UEFI (UEFI Specification supported)
56
- Version Number: 0.0
57
- Embedded Ctlr Firmware Version Number: 0.0
58
-
59
- ID SIZE TYPE
60
- 1 129 SMB_TYPE_SYSTEM (type 1) (system information)
61
-
62
- Manufacturer: System manufacturer
63
- Product: System Product Name
64
- Version: System Version
65
- Serial Number: System Serial Number
66
-
67
- UUID: 20b1001e-8c00-0072-5566-10c37b474fc1
68
- Wake-Up Event: 0x6 (power switch)
69
- SKU Number: SKU
70
- Family: To be filled by O.E.M.
71
-
72
- ID SIZE TYPE
73
- 2 116 SMB_TYPE_BASEBOARD (type 2) (base board)
74
-
75
- Manufacturer: ASUSTeK COMPUTER INC.
76
- Product: P9X79 WS
77
- Version: Rev 1.xx
78
- Serial Number: 140525831000250
79
- Asset Tag: To be filled by O.E.M.
80
- Location Tag: To be filled by O.E.M.
81
-
82
- Chassis: 3
83
- Flags: 0x9
84
- SMB_BBFL_MOTHERBOARD (board is a motherboard)
85
- SMB_BBFL_REPLACABLE (board is field-replacable)
86
- Board Type: 0xa (motherboard)
87
-
88
- ID SIZE TYPE
89
- 46 38 SMB_TYPE_OBDEVS (type 10) (on-board devices)
90
-
91
- Onboard Ethernet
92
- Onboard Audio
93
-
94
- ID SIZE TYPE
95
- 3 106 SMB_TYPE_CHASSIS (type 3) (system enclosure or chassis)
96
-
97
- Manufacturer: Chassis Manufacture
98
- Version: Chassis Version
99
- Serial Number: Chassis Serial Number
100
- Asset Tag: PCS
101
-
102
- OEM Data: 0x0
103
- SKU number: ^E
104
- Lock Present: N
105
- Chassis Type: 0x3 (desktop)
106
- Boot-Up State: 0x3 (safe)
107
- Power Supply State: 0x3 (safe)
108
- Thermal State: 0x3 (safe)
109
- Chassis Height: 0u
110
- Power Cords: 1
111
- Element Records: 0
21
+ SOLARIS_DMI_OUT = <<~EOS.freeze
22
+ ID SIZE TYPE
23
+ 0 64 SMB_TYPE_BIOS (type 0) (BIOS information)
24
+
25
+ Vendor: American Megatrends Inc.
26
+ Version String: 4701
27
+ Release Date: 08/26/2014
28
+ Address Segment: 0xf000
29
+ ROM Size: 8388608 bytes
30
+ Image Size: 65536 bytes
31
+ Characteristics: 0x53f8b9c80
32
+ SMB_BIOSFL_PCI (PCI is supported)
33
+ SMB_BIOSFL_APM (APM is supported)
34
+ SMB_BIOSFL_FLASH (BIOS is Flash Upgradeable)
35
+ SMB_BIOSFL_SHADOW (BIOS shadowing is allowed)
36
+ SMB_BIOSFL_CDBOOT (Boot from CD is supported)
37
+ SMB_BIOSFL_SELBOOT (Selectable Boot supported)
38
+ SMB_BIOSFL_ROMSOCK (BIOS ROM is socketed)
39
+ SMB_BIOSFL_EDD (EDD Spec is supported)
40
+ SMB_BIOSFL_525_12M (int 0x13 5.25" 1.2M floppy)
41
+ SMB_BIOSFL_35_720K (int 0x13 3.5" 720K floppy)
42
+ SMB_BIOSFL_35_288M (int 0x13 3.5" 2.88M floppy)
43
+ SMB_BIOSFL_I5_PRINT (int 0x5 print screen svcs)
44
+ SMB_BIOSFL_I9_KBD (int 0x9 8042 keyboard svcs)
45
+ SMB_BIOSFL_I14_SER (int 0x14 serial svcs)
46
+ SMB_BIOSFL_I17_PRINTER (int 0x17 printer svcs)
47
+ 0x100000000
48
+ 0x400000000
49
+ Characteristics Extension Byte 1: 0x3
50
+ SMB_BIOSXB1_ACPI (ACPI is supported)
51
+ SMB_BIOSXB1_USBL (USB legacy is supported)
52
+ Characteristics Extension Byte 2: 0xd
53
+ SMB_BIOSXB2_BBOOT (BIOS Boot Specification supported)
54
+ SMB_BIOSXB2_ETCDIST (Enable Targeted Content Distrib.)
55
+ SMB_BIOSXB2_UEFI (UEFI Specification supported)
56
+ Version Number: 0.0
57
+ Embedded Ctlr Firmware Version Number: 0.0
58
+
59
+ ID SIZE TYPE
60
+ 1 129 SMB_TYPE_SYSTEM (type 1) (system information)
61
+
62
+ Manufacturer: System manufacturer
63
+ Product: System Product Name
64
+ Version: System Version
65
+ Serial Number: System Serial Number
66
+
67
+ UUID: 20b1001e-8c00-0072-5566-10c37b474fc1
68
+ Wake-Up Event: 0x6 (power switch)
69
+ SKU Number: SKU
70
+ Family: To be filled by O.E.M.
71
+
72
+ ID SIZE TYPE
73
+ 2 116 SMB_TYPE_BASEBOARD (type 2) (base board)
74
+
75
+ Manufacturer: ASUSTeK COMPUTER INC.
76
+ Product: P9X79 WS
77
+ Version: Rev 1.xx
78
+ Serial Number: 140525831000250
79
+ Asset Tag: To be filled by O.E.M.
80
+ Location Tag: To be filled by O.E.M.
81
+
82
+ Chassis: 3
83
+ Flags: 0x9
84
+ SMB_BBFL_MOTHERBOARD (board is a motherboard)
85
+ SMB_BBFL_REPLACABLE (board is field-replacable)
86
+ Board Type: 0xa (motherboard)
87
+
88
+ ID SIZE TYPE
89
+ 46 38 SMB_TYPE_OBDEVS (type 10) (on-board devices)
90
+
91
+ Onboard Ethernet
92
+ Onboard Audio
93
+
94
+ ID SIZE TYPE
95
+ 3 106 SMB_TYPE_CHASSIS (type 3) (system enclosure or chassis)
96
+
97
+ Manufacturer: Chassis Manufacture
98
+ Version: Chassis Version
99
+ Serial Number: Chassis Serial Number
100
+ Asset Tag: PCS
101
+
102
+ OEM Data: 0x0
103
+ SKU number: ^E
104
+ Lock Present: N
105
+ Chassis Type: 0x3 (desktop)
106
+ Boot-Up State: 0x3 (safe)
107
+ Power Supply State: 0x3 (safe)
108
+ Thermal State: 0x3 (safe)
109
+ Chassis Height: 0u
110
+ Power Cords: 1
111
+ Element Records: 0
112
112
  EOS
113
113
 
114
114
  describe Ohai::System, "Solaris2.X DMI plugin" do
@@ -41,9 +41,9 @@ describe Ohai::System, "Solaris2.X filesystem plugin" do
41
41
 
42
42
  context "when 'zfs get' properties are not configured" do
43
43
  it "collects all filesystem properties" do
44
- expect(plugin).to receive(:shell_out).
45
- with("zfs get -p -H all").
46
- and_return(mock_shell_out(0, "", ""))
44
+ expect(plugin).to receive(:shell_out)
45
+ .with("zfs get -p -H all")
46
+ .and_return(mock_shell_out(0, "", ""))
47
47
  plugin.run
48
48
  end
49
49
  end
@@ -52,16 +52,16 @@ describe Ohai::System, "Solaris2.X filesystem plugin" do
52
52
  shared_examples_for "configured zfs properties" do
53
53
  let(:plugin_config) do
54
54
  {
55
- :filesystem => {
56
- :zfs_properties => zfs_properties,
55
+ filesystem: {
56
+ zfs_properties: zfs_properties,
57
57
  },
58
58
  }
59
59
  end
60
60
 
61
61
  it "collects configured filesystem properties" do
62
- expect(plugin).to receive(:shell_out).
63
- with("zfs get -p -H #{expected_cmd}").
64
- and_return(mock_shell_out(0, "", ""))
62
+ expect(plugin).to receive(:shell_out)
63
+ .with("zfs get -p -H #{expected_cmd}")
64
+ .and_return(mock_shell_out(0, "", ""))
65
65
  plugin.run
66
66
  end
67
67
  end
@@ -22,7 +22,7 @@ describe Ohai::System, "Solaris2.X kernel plugin" do
22
22
  # NOTE: Solaris will report the same module loaded multiple times
23
23
  # with the same ID, Loadaddr, etc. and only the info column different
24
24
  # ignoring it, and removing the data from this fixture.
25
- MODINFO = <<-TOOMUCH
25
+ MODINFO = <<-TOOMUCH.freeze
26
26
  Id Loadaddr Size Info Rev Module Name
27
27
  6 1180000 4623 1 1 specfs (filesystem for specfs)
28
28
  8 1185df0 38c4 1 1 TS (time sharing sched class)
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Daniel DeLeo <dan@chef.io>
3
- # Copyright:: Copyright (c) 2010-2016 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2010-2018, Chef Software Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,103 +21,102 @@ require_relative "../../../spec_helper.rb"
21
21
  describe Ohai::System, "Solaris2.X network plugin" do
22
22
 
23
23
  before do
24
- @solaris_arp_rn = <<-ARP_RN
25
- Net to Media Table: IPv4
26
- Device IP Address Mask Flags Phys Addr
27
- ------ -------------------- --------------- ----- ---------------
28
- rtls0 172.31.4.1 255.255.255.255 00:14:69:81:0b:c0
29
- rtls0 172.31.4.44 255.255.255.255 00:0c:29:c4:9a:11
30
- rtls0 172.31.5.16 255.255.255.255 de:ad:be:ef:3b:ba
31
- rtls0 172.31.4.16 255.255.255.255 d8:d3:85:65:39:40
32
- rtls0 172.31.4.12 255.255.255.255 d8:d3:85:bb:43:b0
33
- rtls0 172.31.4.115 255.255.255.255 52:54:00:0d:b7:5b
34
- rtls0 172.31.4.126 255.255.255.255 52:54:00:2d:93:0c
35
- rtls0 172.31.4.125 255.255.255.255 02:08:20:2e:29:8d
36
- rtls0 172.31.4.121 255.255.255.255 52:54:00:25:8a:3f
37
- rtls0 172.31.4.103 255.255.255.255 SP 52:54:00:7f:22:e7
38
- rtls0 172.31.4.102 255.255.255.255 02:08:20:88:38:18
39
- rtls0 172.31.4.106 255.255.255.255 02:08:20:6d:cc:aa
40
- rtls0 172.31.4.83 255.255.255.255 02:08:20:05:8e:75
41
- rtls0 172.31.4.82 255.255.255.255 52:54:00:2d:93:0c
42
- rtls0 172.31.4.81 255.255.255.255 02:08:20:37:80:87
43
- rtls0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
24
+ @solaris_arp_rn = <<~ARP_RN
25
+ Net to Media Table: IPv4
26
+ Device IP Address Mask Flags Phys Addr
27
+ ------ -------------------- --------------- ----- ---------------
28
+ rtls0 172.31.4.1 255.255.255.255 00:14:69:81:0b:c0
29
+ rtls0 172.31.4.44 255.255.255.255 00:0c:29:c4:9a:11
30
+ rtls0 172.31.5.16 255.255.255.255 de:ad:be:ef:3b:ba
31
+ rtls0 172.31.4.16 255.255.255.255 d8:d3:85:65:39:40
32
+ rtls0 172.31.4.12 255.255.255.255 d8:d3:85:bb:43:b0
33
+ rtls0 172.31.4.115 255.255.255.255 52:54:00:0d:b7:5b
34
+ rtls0 172.31.4.126 255.255.255.255 52:54:00:2d:93:0c
35
+ rtls0 172.31.4.125 255.255.255.255 02:08:20:2e:29:8d
36
+ rtls0 172.31.4.121 255.255.255.255 52:54:00:25:8a:3f
37
+ rtls0 172.31.4.103 255.255.255.255 SP 52:54:00:7f:22:e7
38
+ rtls0 172.31.4.102 255.255.255.255 02:08:20:88:38:18
39
+ rtls0 172.31.4.106 255.255.255.255 02:08:20:6d:cc:aa
40
+ rtls0 172.31.4.83 255.255.255.255 02:08:20:05:8e:75
41
+ rtls0 172.31.4.82 255.255.255.255 52:54:00:2d:93:0c
42
+ rtls0 172.31.4.81 255.255.255.255 02:08:20:37:80:87
43
+ rtls0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
44
44
  ARP_RN
45
45
 
46
- @solaris_ifconfig = <<-ENDIFCONFIG
47
- lo0:3: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
48
- inet 127.0.0.1 netmask ff000000
49
- e1000g0:3: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
50
- inet 72.2.115.28 netmask ffffff80 broadcast 72.2.115.127
51
- e1000g2:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
52
- inet 10.2.115.28 netmask ffffff80 broadcast 10.2.115.127
53
- inet6 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64
54
- net0: flags=40201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS,L3PROTECT> mtu 1500 index 2
55
- inet 37.153.96.148 netmask fffffe00 broadcast 37.153.97.255
56
- ether 90:b8:d0:16:9b:97
57
- net1:1: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2
58
- inet 10.16.125.36 netmask fffffe00 broadcast 10.16.125.255
59
- ether 90:b8:d0:16:9b:97
60
- ip.tun0: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 1480 index 3
61
- inet tunnel src 109.146.85.57 tunnel dst 109.146.85.212
62
- tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
63
- tunnel hop limit 60
64
- inet6 fe80::6d92:5539/10 --> fe80::6d92:55d4
65
- ip.tun0:1: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 1480 index 3
66
- inet6 2::45/128 --> 2::46
67
- lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
68
- inet 127.0.0.1 netmask ff000000
69
- eri0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 \
70
- index 2
71
- inet 172.17.128.208 netmask ffffff00 broadcast 172.17.128.255
72
- ip6.tun0: flags=10008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4> mtu 1460 index 3
73
- inet6 tunnel src fe80::1 tunnel dst fe80::2
74
- tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
75
- tunnel hop limit 60 tunnel encapsulation limit 4
76
- inet 10.0.0.208 --> 10.0.0.210 netmask ff000000
77
- qfe1: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
78
- usesrc vni0
79
- inet6 fe80::203:baff:fe17:4be0/10
80
- ether 0:3:ba:17:4b:e0
81
- vni0: flags=2002210041<UP,RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 1460 index 5
82
- srcof qfe1
83
- inet6 fe80::203:baff:fe17:4444/128
46
+ @solaris_ifconfig = <<~ENDIFCONFIG
47
+ lo0:3: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
48
+ inet 127.0.0.1 netmask ff000000
49
+ e1000g0:3: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
50
+ inet 72.2.115.28 netmask ffffff80 broadcast 72.2.115.127
51
+ e1000g2:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
52
+ inet 10.2.115.28 netmask ffffff80 broadcast 10.2.115.127
53
+ inet6 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64
54
+ net0: flags=40201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS,L3PROTECT> mtu 1500 index 2
55
+ inet 37.153.96.148 netmask fffffe00 broadcast 37.153.97.255
56
+ ether 90:b8:d0:16:9b:97
57
+ net1:1: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2
58
+ inet 10.16.125.36 netmask fffffe00 broadcast 10.16.125.255
59
+ ether 90:b8:d0:16:9b:97
60
+ ip.tun0: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 1480 index 3
61
+ inet tunnel src 109.146.85.57 tunnel dst 109.146.85.212
62
+ tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
63
+ tunnel hop limit 60
64
+ inet6 fe80::6d92:5539/10 --> fe80::6d92:55d4
65
+ ip.tun0:1: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 1480 index 3
66
+ inet6 2::45/128 --> 2::46
67
+ lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
68
+ inet 127.0.0.1 netmask ff000000
69
+ eri0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
70
+ inet 172.17.128.208 netmask ffffff00 broadcast 172.17.128.255
71
+ ip6.tun0: flags=10008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4> mtu 1460 index 3
72
+ inet6 tunnel src fe80::1 tunnel dst fe80::2
73
+ tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
74
+ tunnel hop limit 60 tunnel encapsulation limit 4
75
+ inet 10.0.0.208 --> 10.0.0.210 netmask ff000000
76
+ qfe1: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
77
+ usesrc vni0
78
+ inet6 fe80::203:baff:fe17:4be0/10
79
+ ether 0:3:ba:17:4b:e0
80
+ vni0: flags=2002210041<UP,RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 1460 index 5
81
+ srcof qfe1
82
+ inet6 fe80::203:baff:fe17:4444/128
84
83
  ENDIFCONFIG
85
84
 
86
- @solaris_netstat_rn = <<-NETSTAT_RN
87
- Routing Table: IPv4
88
- Destination Gateway Flags Ref Use Interface
89
- -------------------- -------------------- ----- ----- ---------- ---------
90
- default 10.13.37.1 UG 1 0 e1000g0
91
- 10.13.37.0 10.13.37.157 U 1 2 e1000g0
92
- 127.0.0.1 127.0.0.1 UH 1 35 lo0
93
-
94
- Routing Table: IPv6
95
- Destination/Mask Gateway Flags Ref Use If
96
- --------------------------- --------------------------- ----- --- ------- -----
97
- fe80::/10 fe80::250:56ff:fe13:3757 U 1 0 e1000g0
98
- ::1 ::1 UH 1 0 lo0
85
+ @solaris_netstat_rn = <<~NETSTAT_RN
86
+ Routing Table: IPv4
87
+ Destination Gateway Flags Ref Use Interface
88
+ -------------------- -------------------- ----- ----- ---------- ---------
89
+ default 10.13.37.1 UG 1 0 e1000g0
90
+ 10.13.37.0 10.13.37.157 U 1 2 e1000g0
91
+ 127.0.0.1 127.0.0.1 UH 1 35 lo0
92
+
93
+ Routing Table: IPv6
94
+ Destination/Mask Gateway Flags Ref Use If
95
+ --------------------------- --------------------------- ----- --- ------- -----
96
+ fe80::/10 fe80::250:56ff:fe13:3757 U 1 0 e1000g0
97
+ ::1 ::1 UH 1 0 lo0
99
98
  NETSTAT_RN
100
99
 
101
- @solaris_route_get = <<-ROUTE_GET
102
- route to: default
103
- destination: default
104
- mask: default
105
- gateway: 10.13.37.1
106
- interface: e1000g0 index 3
107
- flags: <UP,GATEWAY,DONE,STATIC>
108
- recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
109
- 0 0 0 0 0 0 1500 0
100
+ @solaris_route_get = <<~ROUTE_GET
101
+ route to: default
102
+ destination: default
103
+ mask: default
104
+ gateway: 10.13.37.1
105
+ interface: e1000g0 index 3
106
+ flags: <UP,GATEWAY,DONE,STATIC>
107
+ recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
108
+ 0 0 0 0 0 0 1500 0
110
109
  ROUTE_GET
111
110
 
112
- @solaris11_route_get = <<-ROUTE_GET
113
- route to: default
114
- destination: default
115
- mask: default
116
- gateway: 10.13.37.1
117
- interface: net1 index 2
118
- flags: <UP,GATEWAY,DONE,STATIC>
119
- recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
120
- 0 0 0 0 0 0 1500 0
111
+ @solaris11_route_get = <<~ROUTE_GET
112
+ route to: default
113
+ destination: default
114
+ mask: default
115
+ gateway: 10.13.37.1
116
+ interface: net1 index 2
117
+ flags: <UP,GATEWAY,DONE,STATIC>
118
+ recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
119
+ 0 0 0 0 0 0 1500 0
121
120
  ROUTE_GET
122
121
 
123
122
  @ifconfig_lines = @solaris_ifconfig.split("\n")
@@ -133,7 +132,7 @@ ROUTE_GET
133
132
 
134
133
  describe "gathering IP layer address info" do
135
134
  before do
136
- @stdout = double("Pipe, stdout, cmd=`route get default`", :read => @solaris_route_get)
135
+ @stdout = double("Pipe, stdout, cmd=`route get default`", read: @solaris_route_get)
137
136
  allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
138
137
  allow(@plugin).to receive(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @solaris_ifconfig, ""))
139
138
  @plugin.run
@@ -162,7 +161,7 @@ ROUTE_GET
162
161
 
163
162
  describe "gathering solaris 11 zone IP layer address info" do
164
163
  before do
165
- @stdout = double("Pipe, stdout, cmd=`route get default`", :read => @solaris11_route_get)
164
+ @stdout = double("Pipe, stdout, cmd=`route get default`", read: @solaris11_route_get)
166
165
  allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris11_route_get, ""))
167
166
  allow(@plugin).to receive(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @solaris_ifconfig, ""))
168
167
  @plugin.run
@@ -181,7 +180,7 @@ ROUTE_GET
181
180
 
182
181
  describe "setting the node's default IP address attribute" do
183
182
  before do
184
- @stdout = double("Pipe, stdout, cmd=`route get default`", :read => @solaris_route_get)
183
+ @stdout = double("Pipe, stdout, cmd=`route get default`", read: @solaris_route_get)
185
184
  allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
186
185
  @plugin.run
187
186
  end