Skip to content

Commit a271812

Browse files
committed
Fixes #38767 - Add BMC Smart Proxy to host.smart_proxy_ids
If a subnet has only a BMC proxy assigned, this smart proxy will be ignored in the host.smart_proxies results. This fix includes BMC proxies in the result.
1 parent 21b5c2c commit a271812

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/models/concerns/hostext/smart_proxy.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def smart_proxy_ids
1212
ids << s.dhcp_id
1313
ids << s.tftp_id
1414
ids << s.dns_id
15+
ids << s.bmc_id
1516
end
1617
ids << domain.dns_id if domain.present?
1718
ids << realm.realm_proxy_id if realm.present?

test/models/host_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3300,7 +3300,8 @@ def to_managed!
33003300
host.subnet.tftp_id = 2
33013301
host.subnet.dhcp_id = 3
33023302
host.subnet.dns_id = 4
3303-
assert host.smart_proxy_ids, [1, 2, 3, 4]
3303+
host.subnet.bmc_id = 5
3304+
assert host.smart_proxy_ids, [1, 2, 3, 4, 5]
33043305
end
33053306

33063307
context 'from hostgroup' do

0 commit comments

Comments
 (0)