foreman_datacenter 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfddbddaec51548c83241cb2e6f6f67d278a0deb
|
4
|
+
data.tar.gz: 09cb2f356f8cd03012120c692459ecd2a2824291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bee5f620af5ff070f5024267231923865a8481acc59acee6867c950c371164b44a9a29a872527440d208fdc442953715295d371d77e9c5a34c9838298f2343a7
|
7
|
+
data.tar.gz: 497286a012ffb1388c1ba95f407810a552035ecc3d43289133e5bdf8936d59b06f5295f0b6d16a1d8459d3dcbf3b9e613a609ee6129bdbe53c3c3657d34ed3bd
|
@@ -11,7 +11,7 @@ module ForemanDatacenter
|
|
11
11
|
error e.to_s
|
12
12
|
search = resource_base.search_for ''
|
13
13
|
end
|
14
|
-
@devices = search.includes(:
|
14
|
+
@devices = search.includes(:device_role, :device_type, :site, :rack).
|
15
15
|
paginate(:page => params[:page])
|
16
16
|
end
|
17
17
|
|
@@ -22,6 +22,8 @@ module ForemanDatacenter
|
|
22
22
|
has_many :modules, :class_name => 'ForemanDatacenter::DeviceModule'
|
23
23
|
has_one :ipmi_interface, -> { where(name: 'ipmi', mgmt_only: true) },
|
24
24
|
:class_name => 'ForemanDatacenter::DeviceInterface'
|
25
|
+
has_one :mgmt_interface, -> { where(name: 'mgmt', mgmt_only: true) },
|
26
|
+
:class_name => 'ForemanDatacenter::DeviceInterface'
|
25
27
|
belongs_to_host
|
26
28
|
has_one :management_device, :class_name => 'ForemanDatacenter::ManagementDevice'
|
27
29
|
has_one :site, :through => :rack
|
@@ -53,13 +55,17 @@ module ForemanDatacenter
|
|
53
55
|
scoped_search in: :device_type, on: :model, complete_value: true, rename: :type
|
54
56
|
|
55
57
|
delegate :site_id, to: :rack, allow_nil: true
|
56
|
-
delegate :mac_address, to: :ipmi_interface, allow_nil: true
|
57
58
|
delegate :manufacturer_id, :is_console_server, :is_pdu, :is_network_device,
|
58
59
|
to: :device_type, allow_nil: true
|
59
60
|
delegate :console_url, :login, :password, to: :management_device
|
60
61
|
|
62
|
+
def mac_address
|
63
|
+
ipmi_interface.try(:ip_address) || mgmt_interface.try(:mac_address)
|
64
|
+
end
|
65
|
+
|
61
66
|
def ip_address
|
62
|
-
ipmi_interface.try(:ip_address) ||
|
67
|
+
ipmi_interface.try(:ip_address) || mgmt_interface.try(:ip_address) ||
|
68
|
+
primary_ip4
|
63
69
|
end
|
64
70
|
|
65
71
|
def parent?
|
@@ -13,7 +13,6 @@
|
|
13
13
|
<th>Rack</th>
|
14
14
|
<th>Role</th>
|
15
15
|
<th>Type</th>
|
16
|
-
<th>IP Address</th>
|
17
16
|
<th>Action</th>
|
18
17
|
</tr>
|
19
18
|
</thead>
|
@@ -32,7 +31,6 @@
|
|
32
31
|
<td><%= h device.rack.name %></td>
|
33
32
|
<td><%= h device.device_role.name %></td>
|
34
33
|
<td><%= h device.device_type.model %></td>
|
35
|
-
<td><%= h device.ip_address %></td>
|
36
34
|
<td>
|
37
35
|
<%= action_buttons(
|
38
36
|
display_link_if_authorized(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_datacenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Ivanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|