You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if swp doesn't have any ip assigned, _get_iface_addr_info will return swp_info which will have only mac like {"mac": "xx:xx.."} and we'll see the key error.
`else:
check if the aaddress is on the device else add one
swp_info = {}
await _get_iface_addr_info(dd, swp, swp_info)
if dev_gw != ".".join(swp_info["ip"]):
E KeyError: "ip"
/usr/local/lib/python3.10/dist-packages/dent_os_testbed/utils/test_utils/tgen_utils.py:296: KeyError`
i think by adding below code we can fix the issue. if 'ip' not in swp_info: out = await IpAddress.add(input_data=[{dd.host_name: [{"dev": swp, "prefix": dev_gw + "/24"}]}] ) elif dev_gw != ".".join(swp_info["ip"]): out = await IpAddress.add(input_data=[{dd.host_name: [{"dev": swp, "prefix": dev_gw + "/24"}]}],)
The text was updated successfully, but these errors were encountered:
All cases listed below failing with error mentioned above:
if swp doesn't have any ip assigned, _get_iface_addr_info will return swp_info which will have only mac like {"mac": "xx:xx.."} and we'll see the key error.
`else:
check if the aaddress is on the device else add one
swp_info = {}
await _get_iface_addr_info(dd, swp, swp_info)
i think by adding below code we can fix the issue.
if 'ip' not in swp_info: out = await IpAddress.add(input_data=[{dd.host_name: [{"dev": swp, "prefix": dev_gw + "/24"}]}] ) elif dev_gw != ".".join(swp_info["ip"]): out = await IpAddress.add(input_data=[{dd.host_name: [{"dev": swp, "prefix": dev_gw + "/24"}]}],)
The text was updated successfully, but these errors were encountered: