YAML.load_stream(File.read(file)) do |document|
values = document.fetch('spec', {}).fetch('values', {})
next if values['machineName'].nil? || values['bootMACAddress'].nil?
machine_name = values['machineName']
boot_mac_address = values['bootMACAddress']
bmc_port = URI.parse(values['bmcAddress']).port
YAML.load_stream(File.read(file)) do |document|
values = document.fetch('spec', {}).fetch('values', {})
next if values['machineName'].nil? || values['bootMACAddress'].nil?
machine_name = values['machineName']
boot_mac_address = values['bootMACAddress']
bmc_port = URI.parse(values['bmcAddress']).port