foreman_datacenter 0.1.47 → 0.1.48
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: 939df6100118cf4668cde16490a2cb6d4030dc35
|
4
|
+
data.tar.gz: fa4a4448db4cc2ad2b2bcf25738e0574cfb7886f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc69e06292eefa62573c53d64c7435d5a386095f62ca76a4650ee2a16848ce0dacdfd125084e84b39ff8a453f9619880a04fccc8c6afcc64a0870daab03442df
|
7
|
+
data.tar.gz: ea73aa9a68d1b95efa9ce6f1009af056479418e28bd4a19ed68f32e92ed1d598d529aaa75ccfa8668e92a0a3dda277458394bee33af6c02fce539fd85b63ede8
|
@@ -127,6 +127,23 @@ module ForemanDatacenter
|
|
127
127
|
return result
|
128
128
|
end
|
129
129
|
|
130
|
+
def sync_interfaces_with_host
|
131
|
+
if host
|
132
|
+
existed_names = interfaces.map(&:name)
|
133
|
+
host.interfaces.each do |interface|
|
134
|
+
unless existed_names.include?(interface.identifier)
|
135
|
+
interfaces.create(
|
136
|
+
name: interface.identifier,
|
137
|
+
form_factor: ForemanDatacenter::DeviceInterface::DEFAULT_FORM_FACTOR,
|
138
|
+
mac_address: interface.mac,
|
139
|
+
ip_address: interface.ip,
|
140
|
+
mgmt_only: interface.identifier == 'ipmi'
|
141
|
+
)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
130
147
|
private
|
131
148
|
|
132
149
|
def create_interfaces
|
@@ -149,24 +166,6 @@ module ForemanDatacenter
|
|
149
166
|
end
|
150
167
|
end
|
151
168
|
|
152
|
-
def sync_interfaces_with_host
|
153
|
-
if host
|
154
|
-
existed_names = interfaces.map(&:name)
|
155
|
-
# abort interfaces.map(&:identifier).inspect
|
156
|
-
host.interfaces.each do |interface|
|
157
|
-
unless existed_names.include?(interface.identifier)
|
158
|
-
interfaces.create(
|
159
|
-
name: interface.identifier,
|
160
|
-
form_factor: ForemanDatacenter::DeviceInterface::DEFAULT_FORM_FACTOR,
|
161
|
-
mac_address: interface.mac,
|
162
|
-
ip_address: interface.ip,
|
163
|
-
mgmt_only: interface.identifier == 'ipmi'
|
164
|
-
)
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
169
|
def create_console_ports
|
171
170
|
device_type.console_port_templates.each do |template|
|
172
171
|
console_ports.create(template.attrs_to_copy)
|
@@ -46,7 +46,7 @@
|
|
46
46
|
<strong>Device</strong>
|
47
47
|
</div>
|
48
48
|
<!-- table_css_classes removed purposely -->
|
49
|
-
<table class="table table-hover panel-body
|
49
|
+
<table class="table table-hover panel-body nonmarginbottom">
|
50
50
|
<tbody>
|
51
51
|
<tr>
|
52
52
|
<td>Site</td>
|
@@ -175,7 +175,7 @@
|
|
175
175
|
<strong>Management</strong>
|
176
176
|
</div>
|
177
177
|
<!-- table_css_classes removed purposely -->
|
178
|
-
<table class="table table-hover panel-body
|
178
|
+
<table class="table table-hover panel-body nonmarginbottom">
|
179
179
|
<tbody>
|
180
180
|
<tr>
|
181
181
|
<td>Role</td>
|
@@ -329,7 +329,7 @@
|
|
329
329
|
<div class="panel-body">None</div>
|
330
330
|
<% else %>
|
331
331
|
<!-- table_css_classes removed purposely -->
|
332
|
-
<table class="table table-hover panel-body
|
332
|
+
<table class="table table-hover panel-body nonmarginbottom">
|
333
333
|
<tbody>
|
334
334
|
<%= render partial: 'interface', collection: @device.non_management_interfaces %>
|
335
335
|
</tbody>
|