foreman_discovery 9.1.5 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/discovered_hosts_controller.rb +5 -4
  3. data/app/controllers/api/v2/discovery_rules_controller.rb +1 -1
  4. data/app/controllers/concerns/foreman/controller/parameters/discovered_host.rb +2 -9
  5. data/app/controllers/discovered_hosts_controller.rb +10 -21
  6. data/app/controllers/discovery_rules_controller.rb +1 -1
  7. data/app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb +1 -1
  8. data/app/helpers/discovered_hosts_helper.rb +2 -3
  9. data/app/models/discovery_attribute_set.rb +1 -1
  10. data/app/models/discovery_rule.rb +1 -1
  11. data/app/models/host/discovered.rb +23 -17
  12. data/app/models/host/managed_extensions.rb +2 -5
  13. data/app/services/foreman_discovery/host_converter.rb +0 -6
  14. data/app/services/foreman_discovery/node_api/power.rb +0 -8
  15. data/app/views/discovered_hosts/_discovered_host_modal.html.erb +12 -13
  16. data/app/views/discovered_hosts/_selected_hosts.html.erb +1 -1
  17. data/app/views/discovered_hosts/multiple_destroy.html.erb +5 -4
  18. data/app/views/discovered_hosts/show.html.erb +9 -1
  19. data/app/views/discovered_hosts/welcome.html.erb +10 -0
  20. data/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb +1 -1
  21. data/db/migrate/20150714144500_review_discovery_permissions.rb +9 -7
  22. data/db/migrate/20161006094714_add_constraints_on_subnets_smart_proxies.rb +0 -3
  23. data/extra/discover-host +18 -11
  24. data/extra/discovery/rhel7-vlan.json +352 -0
  25. data/lib/foreman_discovery/engine.rb +2 -1
  26. data/lib/foreman_discovery/version.rb +1 -1
  27. data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
  28. data/locale/ca/foreman_discovery.edit.po +1 -1
  29. data/locale/ca/foreman_discovery.po +1 -1
  30. data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
  31. data/locale/de/foreman_discovery.edit.po +2 -2
  32. data/locale/de/foreman_discovery.po +2 -2
  33. data/locale/en/LC_MESSAGES/foreman_discovery.mo +0 -0
  34. data/locale/en/foreman_discovery.edit.po +79 -75
  35. data/locale/en/foreman_discovery.po +13 -10
  36. data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
  37. data/locale/en_GB/foreman_discovery.edit.po +1 -1
  38. data/locale/en_GB/foreman_discovery.po +1 -1
  39. data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
  40. data/locale/es/foreman_discovery.edit.po +2 -2
  41. data/locale/es/foreman_discovery.po +2 -2
  42. data/locale/foreman_discovery.pot +89 -81
  43. data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
  44. data/locale/fr/foreman_discovery.edit.po +2 -2
  45. data/locale/fr/foreman_discovery.po +2 -2
  46. data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
  47. data/locale/gl/foreman_discovery.edit.po +1 -1
  48. data/locale/gl/foreman_discovery.po +1 -1
  49. data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
  50. data/locale/it/foreman_discovery.edit.po +2 -2
  51. data/locale/it/foreman_discovery.po +2 -2
  52. data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
  53. data/locale/ja/foreman_discovery.edit.po +2 -2
  54. data/locale/ja/foreman_discovery.po +2 -2
  55. data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
  56. data/locale/ko/foreman_discovery.edit.po +2 -2
  57. data/locale/ko/foreman_discovery.po +2 -2
  58. data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
  59. data/locale/pt_BR/foreman_discovery.edit.po +2 -2
  60. data/locale/pt_BR/foreman_discovery.po +2 -2
  61. data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
  62. data/locale/ru/foreman_discovery.edit.po +2 -2
  63. data/locale/ru/foreman_discovery.po +2 -2
  64. data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
  65. data/locale/sv_SE/foreman_discovery.edit.po +1 -1
  66. data/locale/sv_SE/foreman_discovery.po +1 -1
  67. data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
  68. data/locale/zh_CN/foreman_discovery.edit.po +2 -2
  69. data/locale/zh_CN/foreman_discovery.po +2 -2
  70. data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
  71. data/locale/zh_TW/foreman_discovery.edit.po +2 -2
  72. data/locale/zh_TW/foreman_discovery.po +2 -2
  73. data/test/functional/api/v2/discovered_hosts_controller_test.rb +16 -17
  74. data/test/functional/api/v2/discovery_rules_controller_test.rb +2 -3
  75. data/test/functional/api/v2/fact_value_extensions_test.rb +1 -1
  76. data/test/functional/discovered_hosts_controller_test.rb +102 -133
  77. data/test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb +5 -6
  78. data/test/test_helper_discovery.rb +18 -0
  79. data/test/unit/discovered_extensions_test.rb +25 -33
  80. data/test/unit/discovery_attribute_set_test.rb +5 -8
  81. data/test/unit/discovery_taxonomy_extensions_test.rb +2 -2
  82. data/test/unit/host_discovered_test.rb +30 -30
  83. data/test/unit/managed_extensions_test.rb +0 -1
  84. metadata +6 -4
  85. data/app/services/foreman_discovery/node_api/power_legacy_direct_service.rb +0 -15
  86. data/app/services/foreman_discovery/node_api/power_legacy_proxied_service.rb +0 -12
@@ -13,6 +13,7 @@ end
13
13
  base = find_base
14
14
  version = "3.4.0"
15
15
  interfaces = []
16
+ preserve_interfaces = false
16
17
  primary = nil
17
18
  bootif = nil
18
19
  url = "http://admin:changeme@localhost:3000"
@@ -33,6 +34,10 @@ OptionParser.new do |opts|
33
34
  interfaces << v
34
35
  end
35
36
 
37
+ opts.on("-x", "--[no-]preserve-interfaces", "Preserve interfaces from JSON") do |v|
38
+ preserve_interfaces = true
39
+ end
40
+
36
41
  opts.on("-pNAME", "--primary=NAME", "Interface to use as primary (defaults to the first one)") do |v|
37
42
  primary = v
38
43
  end
@@ -61,18 +66,20 @@ json = JSON.parse(File.read(base))
61
66
  json["foreman_organization"] = organization if organization
62
67
  json["foreman_location"] = location if location
63
68
  json["discovery_version"] = version
64
- json["interfaces"] = interfaces.map{|i| i.first}.join(',')
65
- interfaces.each do |iface|
66
- name, subnet = iface
67
- mac = (["52"] + 5.times.map { '%02x' % rand(0..255) }).join(':')
68
- ip = "192.168.#{subnet}.#{rand(1..253)}"
69
- json["macaddress_#{name}"] = mac
70
- json["ipaddress_#{name}"] = ip
71
- if name == primary
72
- json["macaddress"] = mac
73
- json["ipaddress"] = ip
69
+ unless preserve_interfaces
70
+ json["interfaces"] = interfaces.map{|i| i.first}.join(',')
71
+ interfaces.each do |iface|
72
+ name, subnet = iface
73
+ mac = (["52"] + 5.times.map { '%02x' % rand(0..255) }).join(':')
74
+ ip = "192.168.#{subnet}.#{rand(1..253)}"
75
+ json["macaddress_#{name}"] = mac
76
+ json["ipaddress_#{name}"] = ip
77
+ if name == primary
78
+ json["macaddress"] = mac
79
+ json["ipaddress"] = ip
80
+ end
81
+ json["discovery_bootif"] = mac if name == bootif
74
82
  end
75
- json["discovery_bootif"] = mac if name == bootif
76
83
  end
77
84
  puts JSON.pretty_generate(json)
78
85
  response = RestClient.post url + "/api/v2/discovered_hosts/facts", {"facts" => json}.to_json, {content_type: :json, accept: :json}
@@ -0,0 +1,352 @@
1
+ {
2
+ "lib": "/usr/share/fdi/facts/",
3
+ "virtual": "physical",
4
+ "is_virtual": false,
5
+ "kernel": "Linux",
6
+ "architecture": "x86_64",
7
+ "hardwaremodel": "x86_64",
8
+ "operatingsystem": "RedHat",
9
+ "os": {
10
+ "name": "RedHat",
11
+ "family": "RedHat",
12
+ "release": {
13
+ "major": "7",
14
+ "minor": "3",
15
+ "full": "7.3"
16
+ }
17
+ },
18
+ "network_eno49_444": "192.168.1.16",
19
+ "network_lo": "127.0.0.0",
20
+ "hardwareisa": "x86_64",
21
+ "vlans": "444",
22
+ "physicalprocessorcount": 2,
23
+ "system_uptime": {
24
+ "seconds": 2542,
25
+ "hours": 0,
26
+ "days": 0,
27
+ "uptime": "0:42 hours"
28
+ },
29
+ "netmask": "255.255.255.0",
30
+ "memorysize": "125.79 GB",
31
+ "memoryfree": "124.62 GB",
32
+ "swapsize": "0.00 MB",
33
+ "swapfree": "0.00 MB",
34
+ "swapsize_mb": "0.00",
35
+ "swapfree_mb": "0.00",
36
+ "memorysize_mb": "128813.88",
37
+ "memoryfree_mb": "127615.10",
38
+ "ps": "ps -ef",
39
+ "kernelrelease": "3.10.0-514.el7.x86_64",
40
+ "fqdn": "fdi",
41
+ "uniqueid": "b20a896666",
42
+ "rubyplatform": "x86_64-linux",
43
+ "rubysitedir": "/usr/local/share/ruby/site_ruby/",
44
+ "hostname": "fdi",
45
+ "macaddress": "44:44:44:44:44:44",
46
+ "operatingsystemrelease": "7.3",
47
+ "boardmanufacturer": "HP",
48
+ "boardproductname": "ProLiant ",
49
+ "boardserialnumber": "XXXXXXXXX",
50
+ "bios_vendor": "HP",
51
+ "bios_version": "P89",
52
+ "bios_release_date": "04/25/2017",
53
+ "manufacturer": "HP",
54
+ "productname": "ProLiant ",
55
+ "serialnumber": "XXXXXXXXXX",
56
+ "uuid": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
57
+ "type": "Rack Mount Chassis",
58
+ "path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/extension/bin:/root/bin",
59
+ "selinux": false,
60
+ "filesystems": "ext2,ext3,ext4,iso9660,squashfs",
61
+ "uptime_hours": 0,
62
+ "osfamily": "RedHat",
63
+ "kernelmajversion": "3.10",
64
+ "interfaces": "eno1,eno2,eno3,eno4,eno49,eno50,eno49_444,lo",
65
+ "macaddress_eno1": "44:44:44:44:44:40",
66
+ "mtu_eno1": 1500,
67
+ "macaddress_eno2": "44:44:44:44:44:41",
68
+ "mtu_eno2": 1500,
69
+ "macaddress_eno3": "44:44:44:44:44:42",
70
+ "mtu_eno3": 1500,
71
+ "macaddress_eno4": "44:44:44:44:44:43",
72
+ "mtu_eno4": 1500,
73
+ "macaddress_eno49": "44:44:44:44:44:44",
74
+ "mtu_eno49": 1500,
75
+ "macaddress_eno50": "44:44:44:44:44:45",
76
+ "mtu_eno50": 1500,
77
+ "ipaddress_eno49_444": "192.168.1.16",
78
+ "macaddress_eno49_444": "44:44:44:44:44:44",
79
+ "netmask_eno49_444": "255.255.255.0",
80
+ "mtu_eno49_444": 1500,
81
+ "ipaddress_lo": "127.0.0.1",
82
+ "netmask_lo": "255.0.0.0",
83
+ "mtu_lo": 65536,
84
+ "operatingsystemmajrelease": "7",
85
+ "kernelversion": "3.10.0",
86
+ "gid": "root",
87
+ "uptime": "0:42 hours",
88
+ "rubyversion": "2.0.0",
89
+ "id": "root",
90
+ "ipaddress": "192.168.1.16",
91
+ "processors": {
92
+ "models": [
93
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
94
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
95
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
96
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
97
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
98
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
99
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
100
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
101
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
102
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
103
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
104
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
105
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
106
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
107
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
108
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
109
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
110
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
111
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
112
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
113
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
114
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
115
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
116
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
117
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
118
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
119
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
120
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
121
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
122
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
123
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
124
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
125
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
126
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
127
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
128
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
129
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
130
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
131
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
132
+ "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz"
133
+ ],
134
+ "count": 40,
135
+ "physicalcount": 2
136
+ },
137
+ "processor0": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
138
+ "processor1": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
139
+ "processor2": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
140
+ "processor3": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
141
+ "processor4": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
142
+ "processor5": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
143
+ "processor6": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
144
+ "processor7": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
145
+ "processor8": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
146
+ "processor9": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
147
+ "processor10": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
148
+ "processor11": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
149
+ "processor12": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
150
+ "processor13": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
151
+ "processor14": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
152
+ "processor15": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
153
+ "processor16": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
154
+ "processor17": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
155
+ "processor18": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
156
+ "processor19": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
157
+ "processor20": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
158
+ "processor21": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
159
+ "processor22": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
160
+ "processor23": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
161
+ "processor24": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
162
+ "processor25": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
163
+ "processor26": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
164
+ "processor27": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
165
+ "processor28": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
166
+ "processor29": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
167
+ "processor30": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
168
+ "processor31": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
169
+ "processor32": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
170
+ "processor33": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
171
+ "processor34": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
172
+ "processor35": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
173
+ "processor36": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
174
+ "processor37": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
175
+ "processor38": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
176
+ "processor39": "Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz",
177
+ "processorcount": 40,
178
+ "facterversion": "2.4.6",
179
+ "sshrsakey": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
180
+ "sshfp_rsa": "SSHFP 1 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nSSHFP 1 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
181
+ "sshecdsakey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx",
182
+ "sshfp_ecdsa": "SSHFP 3 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nSSHFP 3 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
183
+ "sshed25519key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
184
+ "sshfp_ed25519": "SSHFP 4 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx\nSSHFP 4 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx",
185
+ "uptime_seconds": 2542,
186
+ "uptime_days": 0,
187
+ "blockdevice_sda_size": 1000171331584,
188
+ "blockdevice_sda_vendor": "HP",
189
+ "blockdevice_sda_model": "LOGICAL VOLUME",
190
+ "blockdevice_sr0_size": 248512512,
191
+ "blockdevice_sr0_vendor": "HP",
192
+ "blockdevice_sr0_model": "Virtual DVD-ROM",
193
+ "blockdevices": "sda,sr0",
194
+ "timezone": "UTC",
195
+ "lldp_neighbor_chassisid_eno49": "55:55:55:55:55:55",
196
+ "lldp_neighbor_portid_eno49": "548",
197
+ "lldp_neighbor_sysname_eno49": "XXXXXXXXXXXXXX",
198
+ "lldp_neighbor_mngaddr_ipv4_eno49": "192.168.1.1",
199
+ "lldp_neighbor_mtu_eno49": "1514",
200
+ "lldp_neighbor_chassisid_eno50": "55:55:55:55:55:56",
201
+ "lldp_neighbor_portid_eno50": "597",
202
+ "lldp_neighbor_sysname_eno50": "XXXXXXXXXXXXXXXXXXXX",
203
+ "lldp_neighbor_mngaddr_ipv4_eno50": "192.168.1.1",
204
+ "lldp_neighbor_mtu_eno50": "1514",
205
+ "discovery_version": "3.1.1",
206
+ "discovery_release": "20170323.1",
207
+ "discovery_bootif": "44:44:44:44:44:44",
208
+ "discovery_bootip": "192.168.1.16",
209
+ "duplex_eno1": "unknown! (255)",
210
+ "port_eno1": "Twisted Pair",
211
+ "auto_negotiation_eno1": "true",
212
+ "wol_eno1": true,
213
+ "link_eno1": "false",
214
+ "duplex_eno2": "unknown! (255)",
215
+ "port_eno2": "Twisted Pair",
216
+ "auto_negotiation_eno2": "true",
217
+ "wol_eno2": true,
218
+ "link_eno2": "false",
219
+ "duplex_eno3": "unknown! (255)",
220
+ "port_eno3": "Twisted Pair",
221
+ "auto_negotiation_eno3": "true",
222
+ "wol_eno3": true,
223
+ "link_eno3": "false",
224
+ "duplex_eno4": "unknown! (255)",
225
+ "port_eno4": "Twisted Pair",
226
+ "auto_negotiation_eno4": "true",
227
+ "wol_eno4": true,
228
+ "link_eno4": "false",
229
+ "speed_eno49": "10000",
230
+ "duplex_eno49": "full",
231
+ "port_eno49": "Direct Attach Copper",
232
+ "auto_negotiation_eno49": "false",
233
+ "wol_eno49": true,
234
+ "link_eno49": "true",
235
+ "speed_eno50": "10000",
236
+ "duplex_eno50": "full",
237
+ "port_eno50": "Direct Attach Copper",
238
+ "auto_negotiation_eno50": "false",
239
+ "wol_eno50": false,
240
+ "link_eno50": "true",
241
+ "speed_eno49_444": "10000",
242
+ "duplex_eno49_444": "full",
243
+ "port_eno49_444": "Direct Attach Copper",
244
+ "auto_negotiation_eno49_444": "false",
245
+ "link_eno49_444": "true",
246
+ "link_lo": "true",
247
+ "ipmi_enabled": true,
248
+ "ipmi_ipaddress_source": "Static Address",
249
+ "ipmi_ipaddress": "192.168.2.2",
250
+ "ipmi_ptr": "ilo-myhost.mydomain.fr",
251
+ "ipmi_subnet_mask": "255.255.255.0",
252
+ "ipmi_macaddress": "66:66:66:66:66:66",
253
+ "ipmi_gateway": "192.168.2.254",
254
+ "ipmi_2_ipaddress_source": "Static Address",
255
+ "ipmi_2_ipaddress": "192.168.2.2",
256
+ "ipmi_2_ptr": "ilo-myhost.mydomain.fr",
257
+ "ipmi_2_subnet_mask": "255.255.255.0",
258
+ "ipmi_2_macaddress": "66:66:66:66:66:67",
259
+ "ipmi_2_gateway": "192.168.2.254",
260
+ "nmprimary_connection_id": "primary",
261
+ "nmprimary_connection_uuid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
262
+ "nmprimary_connection_stable-id": "--",
263
+ "nmprimary_connection_interface-name": "--",
264
+ "nmprimary_connection_type": "vlan",
265
+ "nmprimary_connection_autoconnect": "yes",
266
+ "nmprimary_connection_autoconnect-priority": "1",
267
+ "nmprimary_connection_timestamp": "1503413214",
268
+ "nmprimary_connection_read-only": "no",
269
+ "nmprimary_connection_permissions": "",
270
+ "nmprimary_connection_zone": "--",
271
+ "nmprimary_connection_master": "--",
272
+ "nmprimary_connection_slave-type": "--",
273
+ "nmprimary_connection_autoconnect-slaves": "-1 (default)",
274
+ "nmprimary_connection_secondaries": "",
275
+ "nmprimary_connection_gateway-ping-timeout": "0",
276
+ "nmprimary_connection_metered": "unknown",
277
+ "nmprimary_connection_lldp": "-1 (default)",
278
+ "nmprimary_802-3-ethernet_port": "--",
279
+ "nmprimary_802-3-ethernet_speed": "0",
280
+ "nmprimary_802-3-ethernet_duplex": "--",
281
+ "nmprimary_802-3-ethernet_auto-negotiate": "yes",
282
+ "nmprimary_802-3-ethernet_mac-address": "44:44:44:44:44:44",
283
+ "nmprimary_802-3-ethernet_cloned-mac-address": "--",
284
+ "nmprimary_802-3-ethernet_generate-mac-address-mask": "--",
285
+ "nmprimary_802-3-ethernet_mac-address-blacklist": "",
286
+ "nmprimary_802-3-ethernet_mtu": "auto",
287
+ "nmprimary_802-3-ethernet_s390-subchannels": "",
288
+ "nmprimary_802-3-ethernet_s390-nettype": "--",
289
+ "nmprimary_802-3-ethernet_s390-options": "",
290
+ "nmprimary_802-3-ethernet_wake-on-lan": "1 (default)",
291
+ "nmprimary_802-3-ethernet_wake-on-lan-password": "--",
292
+ "nmprimary_ipv4_method": "manual",
293
+ "nmprimary_ipv4_dns": "10.192.168.1.12",
294
+ "nmprimary_ipv4_dns-search": "",
295
+ "nmprimary_ipv4_dns-options": "(default)",
296
+ "nmprimary_ipv4_dns-priority": "0",
297
+ "nmprimary_ipv4_addresses": "192.168.1.16/24",
298
+ "nmprimary_ipv4_gateway": "192.168.1.254",
299
+ "nmprimary_ipv4_routes": "",
300
+ "nmprimary_ipv4_route-metric": "-1",
301
+ "nmprimary_ipv4_ignore-auto-routes": "no",
302
+ "nmprimary_ipv4_ignore-auto-dns": "no",
303
+ "nmprimary_ipv4_dhcp-client-id": "--",
304
+ "nmprimary_ipv4_dhcp-timeout": "0",
305
+ "nmprimary_ipv4_dhcp-send-hostname": "yes",
306
+ "nmprimary_ipv4_dhcp-hostname": "--",
307
+ "nmprimary_ipv4_dhcp-fqdn": "--",
308
+ "nmprimary_ipv4_never-default": "no",
309
+ "nmprimary_ipv4_may-fail": "yes",
310
+ "nmprimary_ipv4_dad-timeout": "-1 (default)",
311
+ "nmprimary_ipv6_method": "ignore",
312
+ "nmprimary_ipv6_dns": "",
313
+ "nmprimary_ipv6_dns-search": "",
314
+ "nmprimary_ipv6_dns-options": "(default)",
315
+ "nmprimary_ipv6_dns-priority": "0",
316
+ "nmprimary_ipv6_addresses": "",
317
+ "nmprimary_ipv6_gateway": "--",
318
+ "nmprimary_ipv6_routes": "",
319
+ "nmprimary_ipv6_route-metric": "-1",
320
+ "nmprimary_ipv6_ignore-auto-routes": "no",
321
+ "nmprimary_ipv6_ignore-auto-dns": "no",
322
+ "nmprimary_ipv6_never-default": "no",
323
+ "nmprimary_ipv6_may-fail": "yes",
324
+ "nmprimary_ipv6_ip6-privacy": "-1 (unknown)",
325
+ "nmprimary_ipv6_addr-gen-mode": "eui64",
326
+ "nmprimary_ipv6_dhcp-send-hostname": "yes",
327
+ "nmprimary_ipv6_dhcp-hostname": "--",
328
+ "nmprimary_ipv6_token": "--",
329
+ "nmprimary_vlan_parent": "--",
330
+ "nmprimary_vlan_id": "444",
331
+ "nmprimary_vlan_flags": "1 (REORDER_HEADERS)",
332
+ "nmprimary_vlan_ingress-priority-map": "",
333
+ "nmprimary_vlan_egress-priority-map": "",
334
+ "nmprimary_general_name": "primary",
335
+ "nmprimary_general_uuid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx",
336
+ "nmprimary_general_devices": "eno49.444",
337
+ "nmprimary_general_state": "activated",
338
+ "nmprimary_general_default": "yes",
339
+ "nmprimary_general_default6": "no",
340
+ "nmprimary_general_vpn": "no",
341
+ "nmprimary_general_zone": "--",
342
+ "nmprimary_general_dbus-path": "/org/freedesktop/NetworkManager/ActiveConnection/0",
343
+ "nmprimary_general_con-path": "/org/freedesktop/NetworkManager/Settings/6",
344
+ "nmprimary_general_spec-object": "/",
345
+ "nmprimary_general_master-path": "--",
346
+ "nmprimary_ip4_address": "192.168.16/24",
347
+ "nmprimary_ip4_gateway": "192.168.1.254",
348
+ "nmprimary_ip4_dns": "192.168.1.12",
349
+ "nmprimary_ip6_address": "XXXXXXXXXXXXXXXXXXXXXXX",
350
+ "nmprimary_ip6_gateway": "",
351
+ "nmprimary_ptr": "myhost.mydomain.fr"
352
+ }
@@ -42,7 +42,7 @@ module ForemanDiscovery
42
42
 
43
43
  initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
44
44
  Foreman::Plugin.register :foreman_discovery do
45
- requires_foreman '>= 1.15.0'
45
+ requires_foreman '>= 1.16.0'
46
46
 
47
47
  # discovered hosts permissions
48
48
  security_block :discovery do
@@ -112,6 +112,7 @@ module ForemanDiscovery
112
112
  MANAGER = READER + [
113
113
  # core permissions
114
114
  :create_hosts,
115
+ :edit_hosts,
115
116
  :build_hosts,
116
117
  :assign_organizations,
117
118
  :assign_locations,
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "9.1.5"
2
+ VERSION = "10.0.0"
3
3
  end
@@ -6,7 +6,7 @@
6
6
  # Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2015-2016
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: foreman_discovery 9.1.4\n"
9
+ "Project-Id-Version: foreman_discovery 9.1.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
11
  "POT-Creation-Date: 2017-10-17 15:39+0200\n"
12
12
  "PO-Revision-Date: 2017-10-17 23:23+0000\n"
@@ -6,7 +6,7 @@
6
6
  # Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2015-2016
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: foreman_discovery 9.1.4\n"
9
+ "Project-Id-Version: foreman_discovery 9.1.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
11
  "PO-Revision-Date: 2017-10-17 23:23+0000\n"
12
12
  "Last-Translator: Lukáš Zapletal\n"
@@ -12,10 +12,10 @@
12
12
  # stbenjam <stephen@redhat.com>, 2016
13
13
  msgid ""
14
14
  msgstr ""
15
- "Project-Id-Version: foreman_discovery 9.1.4\n"
15
+ "Project-Id-Version: foreman_discovery 9.1.0\n"
16
16
  "Report-Msgid-Bugs-To: \n"
17
17
  "POT-Creation-Date: 2017-10-17 15:39+0200\n"
18
- "PO-Revision-Date: 2017-10-20 17:18+0000\n"
18
+ "PO-Revision-Date: 2017-10-17 23:23+0000\n"
19
19
  "Last-Translator: Lukáš Zapletal\n"
20
20
  "Language-Team: German (http://www.transifex.com/foreman/foreman/language/de/)\n"
21
21
  "MIME-Version: 1.0\n"