Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error messages and missing "f" in f-strings #561

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ def bmc_set_permanent_ip_addr(bmc: Bmc, interface_info: InterfaceInfo):
"IPv4.1.Netmask": str(interface_info.ipv4_address.netmask),
}
}
logger.info("BMC was DHCP, setting permanent {interface_info.ipv4_address}")
logger.info(f"BMC was DHCP IP {interface_info.ipv4_address}, making this permanent")
bmc.redfish_request(REDFISH_PATH, method="PATCH", payload=payload)
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def switches_for(nautobot, chassis_info: ChassisInfo) -> dict[str, dict]:
}
switches = nautobot_switches(nautobot, switch_macs.union(base_switch_macs))
if not switches:
raise Exception("No switches found in nautobot for {switch_macs}")
raise Exception(
f"There are no switch Devices in nautobot that match the LLDP info "
f"reported by server BMC - I found no Devices where "
f"chassis_mac_address is one of {switch_macs}"
)
return switches


Expand Down
Loading