fix: stop scoring every HTTPS port as a BMC; name the missing license

netOrk's discovery took six switches for BMCs: the PortSpec for 443
added 5 points to every device with a web UI, and nothing else scored
them. The port now carries no weight.

The real BMC, a Supermicro X10DRL-i, was not recognised at all. Its web
UI (ATEN firmware) gets a rule, as do iDRAC and iLO; discovery fetches
those landing pages today. A rule for a Redfish error body covers the
service root once discovery reads it.

That board refuses Redfish without a Supermicro license, even the
service root (403 OemLicenseNotPassed, "SUM DCMS OOB"). The library
reports only the status, so open() reads the error body once more and
raises RedfishLicenseError naming the licenses.

Release 0.1.1.
This commit is contained in:
christianmanivong committed 2026-10-13 09:58:40 +02:00
1 parent c7d947a870
commit 93bbc63f3d
10 files changed
+183 -8

No files matched your search

+14
View File
@@ -3,6 +3,7 @@
import json
from datetime import datetime
from importlib.metadata import entry_points
from pathlib import Path
import napalm
import pytest
@@ -487,3 +488,16 @@ def test_get_management_protocols_missing(driver, server):
assert protocols["https"] == {"enabled": True, "port": 443}
assert protocols["ipmi"] == {"enabled": False, "port": 623}
assert protocols["ssh"] == {"enabled": False, "port": None}
def test_unlicensed_bmc_says_so(server):
# A Supermicro X10 refuses Redfish entirely until a license is activated.
x10 = Path(__file__).parent / "fixtures" / "supermicro-x10drl-i-3.91"
body = json.loads((x10 / "service_root_403.json").read_text())
server.override("GET", "/redfish/v1/", 403, body)
d = RedfishDriver("bmc.example.net", "netork", "s3cret", optional_args={"verify_ssl": False})
with pytest.raises(ConnectionException) as exc:
d.open()
message = str(exc.value)
assert "license" in message.lower()
assert "SUM DCMS OOB" in message