INNER CODE UNIT · Python
device
xoseperez/espurna · code/ota.py:182
device = devices[index - 1]
board["hostname"] = device.get("hostname")
board["board"] = device.get("target_board", "")
board["ip"] = device.get("ip", "")
board["size"] = get_device_size(device)
return board
def get_board_by_mac(devices, mac):
"""
Returns the required data to flash a given board
"""
for device in devices:
if device.get("mac", "").lower() == mac:
board = {}
board["hostname"] = device.get("hostname")
board["board"] = device.get("device")
board["ip"] = device.get("ip")