Merge "Add check if there is no default gateway"

This commit is contained in:
Jenkins 2017-01-17 12:01:31 +00:00 committed by Gerrit Code Review
commit 15310d6989
1 changed files with 5 additions and 3 deletions

8
agent
View File

@ -333,9 +333,11 @@ class NodeAgent
iface = $2 iface = $2
end end
result = _get_all_interfaces_info result = _get_all_interfaces_info
result[:default_gateway] = gw if gw and iface
result[:default_interface] = iface result[:default_gateway] = gw
result[:mac] = @facter["macaddress_#{iface.gsub('-', '_')}"].upcase result[:default_interface] = iface
result[:mac] = @facter["macaddress_#{iface.gsub('-', '_')}"].upcase
end
result result
end end