driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Failing after 58s
driver / test (3.13) (pull_request) Failing after 55s
driver / lowest (pull_request) Failing after 30s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m4s
CI / driver (pull_request) Failing after 2m29s
driver / publish (pull_request) Skipped
netOrk keeps one list of NTP servers per site and aligns a device that differs (NetOrk/netork#2360). A BMC takes part through Redfish's ManagerNetworkProtocol: NTP.NTPServers is read, and written with a PATCH that carries the resource's @odata.etag as If-Match, so a change made on the BMC in between is refused instead of overwritten. BMCs give the array a fixed length and show the unused slots as empty strings (three on an iDRAC 9, two on an iLO 5). Such an array is filled up with its empty value, and more servers than slots are refused before anything is written. Servers of a disabled NTP are not in use: they read as none, and the write turns NTP on. Servers the BMC already uses are not written again, so a poll that aligns it every time does not churn. get_ntp_servers() follows the same rule. A BMC runs on UTC or an offset (DateTimeLocalOffset), not a zone, so time_sync_writes is {"ntp_servers"} and the zone is read only where the manager names an IANA zone (TimeZoneName). A BMC whose Redfish has no NTP block (the Supermicro X10's v1_0_0) raises rather than claiming it has no servers. The bmc driver has it over Redfish only; ipmi has none. Needs napalm-device-types 4.35.0. Refs NetOrk/netork#2367
91 lines
2.5 KiB
TOML
91 lines
2.5 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=77"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "napalm-redfish"
|
|
version = "0.6.0"
|
|
description = "NAPALM driver for server baseboard management controllers over DMTF Redfish"
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"napalm>=5.1", # older releases import pkg_resources, which a 3.12 venv lacks
|
|
"napalm-device-types>=4.35.0",
|
|
# Before 3.4.1, max_retry=0 (retries=0) gets no response back at all.
|
|
"redfish>=3.4.1",
|
|
# 1.5.0 imports python-dateutil without declaring it.
|
|
"pyghmi>=1.5.1",
|
|
]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"Topic :: System :: Hardware",
|
|
"Topic :: System :: Networking",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# responses mocks the BMC's HTTP answers in the tests.
|
|
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6", "responses>=0.23"]
|
|
|
|
[project.urls]
|
|
Repository = "https://git.netork.io/NAPALM/napalm-redfish"
|
|
Issues = "https://git.netork.io/NAPALM/napalm-redfish/issues"
|
|
Changelog = "https://git.netork.io/NAPALM/napalm-redfish/src/branch/main/CHANGELOG.md"
|
|
|
|
[project.entry-points."napalm.drivers"]
|
|
redfish = "napalm_redfish:RedfishDriver"
|
|
ipmi = "napalm_redfish.ipmi:IpmiDriver"
|
|
bmc = "napalm_redfish.bmc:BmcDriver"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["napalm_redfish*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
napalm_redfish = ["py.typed"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Recorded device output keeps its lines.
|
|
"tests/**" = ["E501"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict = true
|
|
# napalm itself is untyped, so every driver subclasses Any.
|
|
disallow_subclassing_any = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["napalm.*", "redfish.*", "pyghmi.*", "requests.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
# Not yet under strict mypy (quality baseline); may only shrink.
|
|
module = [
|
|
"napalm_redfish.bmc",
|
|
"napalm_redfish.driver",
|
|
"napalm_redfish.ipmi",
|
|
"napalm_redfish.parsers.common",
|
|
"napalm_redfish.parsers.environment",
|
|
"napalm_redfish.parsers.manager",
|
|
"napalm_redfish.parsers.system",
|
|
"napalm_redfish.transport",
|
|
]
|
|
ignore_errors = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
# The tests import their helpers as tests.conftest, also under a bare pytest.
|
|
pythonpath = ["."]
|
|
|
|
[tool.coverage.run]
|
|
source = ["napalm_redfish"]
|
|
|
|
[tool.coverage.report]
|
|
fail_under = 94
|