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
Some tests have a single try except block when assigning the required variables, leading to a less accurate log message if one of the variable is missing.
The try except block will also catch the first missing variable but not the others:
for ethernet_interface in ethernet_interfaces:
try:
for var in required_vars:
get(ethernet_interface, var, required=True)
peer_ethernet_interfaces = get(self.hostvars, f"{ethernet_interface['peer']}.ethernet_interfaces", required=True)
peer_interface = get_item(
peer_ethernet_interfaces,
"name",
ethernet_interface["peer_interface"],
required=True,
var_name=f"name: {ethernet_interface['peer_interface']}",
)
peer_interface_ip = get(peer_interface, "ip_address", required=True)
[...]
except AristaAvdMissingVariableError as e:
LOGGER.info("Variable '%s' is missing. Please validate the Ethernet interfaces data model of this host and his peer(s).", str(e))
continue
The tests should be refactor to have accurate logs with the missing variables for the test.
The text was updated successfully, but these errors were encountered:
Some tests have a single
try except
block when assigning the required variables, leading to a less accurate log message if one of the variable is missing.The
try except
block will also catch the first missing variable but not the others:The tests should be refactor to have accurate logs with the missing variables for the test.
The text was updated successfully, but these errors were encountered: