feat: a missing license can say what the device withholds without it (4.15.0)
CI / test (3.10) (push) Failing after 19s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 29s
CI / test (3.13) (push) Successful in 28s
CI / test (3.10) (pull_request) Failing after 20s
CI / test (3.11) (pull_request) Successful in 26s
CI / test (3.12) (pull_request) Successful in 30s
CI / test (3.13) (pull_request) Successful in 32s
CI / test (3.10) (push) Failing after 19s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 29s
CI / test (3.13) (push) Successful in 28s
CI / test (3.10) (pull_request) Failing after 20s
CI / test (3.11) (pull_request) Successful in 26s
CI / test (3.12) (pull_request) Successful in 30s
CI / test (3.13) (pull_request) Successful in 32s
LicenseDict gets withholds: NotRequired[List[str]]: what a device keeps back for want of a license while the rest of it answers. A Supermicro X10 with only SFT-OOB-LIC answers Redfish but withholds its drives and firmware inventory until DCMS is activated. That makes it partly licensed, not unlicensed, and the caller can tell the two apart (NetOrk/netork#1111).
This commit is contained in:
1 parent
87c9b06bf3
commit
2d1c40c87d
4 files changed
+21
-3
No files matched your search
@@ -23,7 +23,15 @@ def test_a_license_says_what_it_is_and_whether_it_holds():
|
||||
hints = get_type_hints(LicenseDict)
|
||||
assert {"name", "status"} <= set(hints)
|
||||
assert LicenseDict.__required_keys__ == frozenset({"name", "status"})
|
||||
assert set(hints) == {"name", "status", "edition", "expires", "detail"}
|
||||
assert set(hints) == {"name", "status", "edition", "expires", "detail", "withholds"}
|
||||
|
||||
|
||||
def test_a_missing_license_may_say_what_the_device_withholds_without_it():
|
||||
# A Supermicro X10 with only SFT-OOB-LIC answers Redfish but keeps its drives and
|
||||
# firmware inventory until DCMS is activated: partly licensed, not unlicensed.
|
||||
hints = get_type_hints(LicenseDict)
|
||||
assert hints["withholds"] == list[str] or str(hints["withholds"]).endswith("List[str]")
|
||||
assert "withholds" not in LicenseDict.__required_keys__
|
||||
|
||||
|
||||
def test_a_hypervisor_host_says_how_it_stands():
|
||||
|
||||
Reference in new issue
Block a user