turnup-check 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- turnup_check-0.1.0/LICENSE +202 -0
- turnup_check-0.1.0/PKG-INFO +144 -0
- turnup_check-0.1.0/README.md +104 -0
- turnup_check-0.1.0/pyproject.toml +83 -0
- turnup_check-0.1.0/setup.cfg +4 -0
- turnup_check-0.1.0/src/turnup_check/__init__.py +11 -0
- turnup_check-0.1.0/src/turnup_check/cli.py +254 -0
- turnup_check-0.1.0/src/turnup_check/collectors/__init__.py +385 -0
- turnup_check-0.1.0/src/turnup_check/collectors/dcgm.py +177 -0
- turnup_check-0.1.0/src/turnup_check/collectors/lldp_eapi.py +90 -0
- turnup_check-0.1.0/src/turnup_check/collectors/lldp_nvue.py +103 -0
- turnup_check-0.1.0/src/turnup_check/collectors/lldp_snmp.py +252 -0
- turnup_check-0.1.0/src/turnup_check/collectors/redfish.py +454 -0
- turnup_check-0.1.0/src/turnup_check/diff.py +731 -0
- turnup_check-0.1.0/src/turnup_check/engine.py +49 -0
- turnup_check-0.1.0/src/turnup_check/intent/__init__.py +116 -0
- turnup_check-0.1.0/src/turnup_check/intent/file.py +98 -0
- turnup_check-0.1.0/src/turnup_check/intent/nautobot.py +43 -0
- turnup_check-0.1.0/src/turnup_check/intent/netbox.py +378 -0
- turnup_check-0.1.0/src/turnup_check/models.py +591 -0
- turnup_check-0.1.0/src/turnup_check/py.typed +0 -0
- turnup_check-0.1.0/src/turnup_check/report.py +274 -0
- turnup_check-0.1.0/src/turnup_check/telemetry.py +108 -0
- turnup_check-0.1.0/src/turnup_check.egg-info/PKG-INFO +144 -0
- turnup_check-0.1.0/src/turnup_check.egg-info/SOURCES.txt +41 -0
- turnup_check-0.1.0/src/turnup_check.egg-info/dependency_links.txt +1 -0
- turnup_check-0.1.0/src/turnup_check.egg-info/entry_points.txt +2 -0
- turnup_check-0.1.0/src/turnup_check.egg-info/requires.txt +18 -0
- turnup_check-0.1.0/src/turnup_check.egg-info/top_level.txt +1 -0
- turnup_check-0.1.0/tests/test_cli.py +286 -0
- turnup_check-0.1.0/tests/test_dcgm.py +114 -0
- turnup_check-0.1.0/tests/test_diff.py +448 -0
- turnup_check-0.1.0/tests/test_intent_demo_fixtures.py +450 -0
- turnup_check-0.1.0/tests/test_intent_file.py +144 -0
- turnup_check-0.1.0/tests/test_intent_netbox.py +255 -0
- turnup_check-0.1.0/tests/test_lldp.py +172 -0
- turnup_check-0.1.0/tests/test_models.py +151 -0
- turnup_check-0.1.0/tests/test_poll.py +245 -0
- turnup_check-0.1.0/tests/test_redfish.py +267 -0
- turnup_check-0.1.0/tests/test_redfish_dmtf.py +74 -0
- turnup_check-0.1.0/tests/test_report.py +197 -0
- turnup_check-0.1.0/tests/test_snmp.py +101 -0
- turnup_check-0.1.0/tests/test_telemetry.py +259 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Hasanat Kazmi
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: turnup-check
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Diff the intended GPU-hall build (NetBox/Nautobot) against what LLDP, Redfish and DCGM actually see.
|
|
5
|
+
Author: Turnup contributors
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/turnup-dev/turnup-check
|
|
8
|
+
Project-URL: Repository, https://github.com/turnup-dev/turnup-check
|
|
9
|
+
Project-URL: Changelog, https://github.com/turnup-dev/turnup-check/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Issues, https://github.com/turnup-dev/turnup-check/issues
|
|
11
|
+
Keywords: netbox,nautobot,redfish,lldp,dcgm,gpu,datacenter,bring-up
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: System :: Networking :: Monitoring
|
|
20
|
+
Classifier: Topic :: System :: Hardware
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: httpx>=0.27
|
|
25
|
+
Requires-Dist: pydantic>=2.5
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: click>=8.1
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Provides-Extra: snmp
|
|
30
|
+
Requires-Dist: pysnmp>=7.1; extra == "snmp"
|
|
31
|
+
Provides-Extra: netbox
|
|
32
|
+
Requires-Dist: pynetbox>=7.0; extra == "netbox"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-timeout>=2.3; extra == "dev"
|
|
37
|
+
Requires-Dist: hypothesis>=6.100; extra == "dev"
|
|
38
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# turnup-check
|
|
42
|
+
|
|
43
|
+
Acceptance check for GPU halls: reads the intended build from NetBox or Nautobot, polls the hall over
|
|
44
|
+
LLDP, Redfish and DCGM, and prints the diff. One command, seconds per rack, any vendor, Apache-2.0.
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
$ turnup-check --site hall-b --intent netbox
|
|
48
|
+
reading intent 288 links · 18 nodes · 2 leaves
|
|
49
|
+
polling lldp · redfish · dcgm
|
|
50
|
+
✓ 287 / 288 links match intent
|
|
51
|
+
✓ 18 / 18 nodes reachable, firmware baseline ok
|
|
52
|
+
✗ mismatch node7 mlx5_3 → leaf4/22
|
|
53
|
+
expected leaf4/21
|
|
54
|
+
fix move cable one port up
|
|
55
|
+
elapsed 4.1 s
|
|
56
|
+
|
|
57
|
+
report hall-b-<YYYY-MM-DD>.json
|
|
58
|
+
share stats --telemetry opt-in (racks, links)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Every finding comes with the fix a technician can act on. Exit code `0` means the hall matches intent,
|
|
62
|
+
`1` means findings, `2` means the intent could not be read or no telemetry source answered. It writes one
|
|
63
|
+
JSON report. Nothing else: no agent, no database, no account.
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install turnup-check # Python 3.12+
|
|
69
|
+
pip install "turnup-check[snmp]" # adds pysnmp for switches without eAPI/NVUE
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Five minutes on a NetBox site
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
export NETBOX_URL=https://netbox.example NETBOX_TOKEN=...
|
|
76
|
+
export TURNUP_SWITCH_USER=admin TURNUP_SWITCH_PASS=... # LLDP from the leaves
|
|
77
|
+
export TURNUP_BMC_USER=admin TURNUP_BMC_PASS=... # Redfish from the nodes
|
|
78
|
+
turnup-check --site <slug> --intent netbox
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`--only lldp` is the fastest first run: cabling only, switch credentials only. A device that refuses or does
|
|
82
|
+
not answer is reported as unreachable, never fatal. Nautobot works the same way with `--intent nautobot`;
|
|
83
|
+
so does a `turnup.intent/v1` YAML file. What is read from NetBox, the device roles it expects, the
|
|
84
|
+
management-endpoint custom fields and the firmware baseline are in [docs/intent.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/intent.md).
|
|
85
|
+
|
|
86
|
+
## Try it without hardware
|
|
87
|
+
|
|
88
|
+
[simhall](https://github.com/turnup-dev/simhall) is a virtual hall that serves the same NetBox, Redfish,
|
|
89
|
+
eAPI/NVUE and DCGM protocols with fault injection. Its golden scenario reproduces the output above:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install simhall
|
|
93
|
+
simhall serve --golden hall-b & # 127.0.0.1:8900, any token
|
|
94
|
+
turnup-check --site hall-b --intent http://127.0.0.1:8900/netbox # exits 1: one wrong_port
|
|
95
|
+
simhall act '{"kind":"seat_cable","label":"CBL-12-07-03","b_interface":"swp21"}'
|
|
96
|
+
turnup-check --site hall-b --intent http://127.0.0.1:8900/netbox # exits 0: 288 / 288
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Simulated runs are marked `simulated: true` in the report and never count anywhere.
|
|
100
|
+
|
|
101
|
+
## What it finds
|
|
102
|
+
|
|
103
|
+
| Finding | Fix it prints |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `wrong_port`: the NIC shows up on another switch port | `move cable one port up` (or `k ports down`, or `from leaf4/30 to leaf4/21`) |
|
|
106
|
+
| `missing_link`: intended port empty, NIC seen nowhere | `seat cable CBL-12-07-03 at leaf4/21`; `check NIC` when the BMC says the NIC port is down |
|
|
107
|
+
| `link_degraded`: right neighbor, port down or below intended speed | check cable / transceivers |
|
|
108
|
+
| `unexpected_link`: a neighbor where intent has no cable | trace and update intent |
|
|
109
|
+
| `unreachable_node`: Redfish down or HTTP error | check reachability and credentials |
|
|
110
|
+
| `firmware_off_baseline`: a component differs from the baseline | `update bmc on node7 to 1.12.0` |
|
|
111
|
+
| `gpu_count_mismatch`, `gpu_unhealthy`, `nvlink_degraded`, `node_health_warning` | reseat, RMA packet, check NVLink, read the BMC log |
|
|
112
|
+
|
|
113
|
+
A `wrong_port` is one finding, correlated across the NIC and both switch ports, never two. The exact rules,
|
|
114
|
+
including what is a note rather than a finding, are in [docs/findings.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/findings.md).
|
|
115
|
+
|
|
116
|
+
## How it works
|
|
117
|
+
|
|
118
|
+
Switches are read over Arista eAPI, NVIDIA NVUE or SNMP (LLDP-MIB); nodes over DMTF Redfish and the DCGM
|
|
119
|
+
exporter. All devices are polled concurrently with a per-request deadline (`--timeout`, default 3 s), so a
|
|
120
|
+
dead device never stalls the run; a clean hall costs about ten Redfish requests per node.
|
|
121
|
+
[docs/polling.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/polling.md) has the protocols, concurrency limits and the credentials file.
|
|
122
|
+
|
|
123
|
+
The report is `turnup.report/v1` JSON with the summary, every finding with its evidence, and the sources
|
|
124
|
+
that answered: [docs/report.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/report.md). Telemetry is off unless you pass `--telemetry`; the payload
|
|
125
|
+
is counts only, never names: [docs/telemetry.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/telemetry.md).
|
|
126
|
+
|
|
127
|
+
`netbox_plugin/` holds `netbox-turnup-check`, a NetBox plugin that lists report files in a menu
|
|
128
|
+
(`netbox_plugin/README.md`).
|
|
129
|
+
|
|
130
|
+
## Status
|
|
131
|
+
|
|
132
|
+
v0.1.0. The NetBox and Nautobot adapters have run against the public demos (NetBox 4.7, Nautobot 3.2),
|
|
133
|
+
not yet against a production GPU hall. The NVUE and SNMP paths follow the public docs and canned tables and
|
|
134
|
+
have not been verified on a real switch. The full list is in
|
|
135
|
+
[docs/development.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/development.md#status-and-known-gaps-v010), with how to develop, test and
|
|
136
|
+
release.
|
|
137
|
+
|
|
138
|
+
Written from public specifications only: DMTF Redfish, IEEE 802.1AB LLDP and LLDP-MIB, NVIDIA
|
|
139
|
+
DCGM-exporter metric names, NetBox and Nautobot REST API docs, Arista eAPI and NVIDIA NVUE public docs,
|
|
140
|
+
the Prometheus exposition format. Example halls are synthetic.
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
|
|
144
|
+
Apache-2.0. See `LICENSE`.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# turnup-check
|
|
2
|
+
|
|
3
|
+
Acceptance check for GPU halls: reads the intended build from NetBox or Nautobot, polls the hall over
|
|
4
|
+
LLDP, Redfish and DCGM, and prints the diff. One command, seconds per rack, any vendor, Apache-2.0.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
$ turnup-check --site hall-b --intent netbox
|
|
8
|
+
reading intent 288 links · 18 nodes · 2 leaves
|
|
9
|
+
polling lldp · redfish · dcgm
|
|
10
|
+
✓ 287 / 288 links match intent
|
|
11
|
+
✓ 18 / 18 nodes reachable, firmware baseline ok
|
|
12
|
+
✗ mismatch node7 mlx5_3 → leaf4/22
|
|
13
|
+
expected leaf4/21
|
|
14
|
+
fix move cable one port up
|
|
15
|
+
elapsed 4.1 s
|
|
16
|
+
|
|
17
|
+
report hall-b-<YYYY-MM-DD>.json
|
|
18
|
+
share stats --telemetry opt-in (racks, links)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Every finding comes with the fix a technician can act on. Exit code `0` means the hall matches intent,
|
|
22
|
+
`1` means findings, `2` means the intent could not be read or no telemetry source answered. It writes one
|
|
23
|
+
JSON report. Nothing else: no agent, no database, no account.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install turnup-check # Python 3.12+
|
|
29
|
+
pip install "turnup-check[snmp]" # adds pysnmp for switches without eAPI/NVUE
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Five minutes on a NetBox site
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
export NETBOX_URL=https://netbox.example NETBOX_TOKEN=...
|
|
36
|
+
export TURNUP_SWITCH_USER=admin TURNUP_SWITCH_PASS=... # LLDP from the leaves
|
|
37
|
+
export TURNUP_BMC_USER=admin TURNUP_BMC_PASS=... # Redfish from the nodes
|
|
38
|
+
turnup-check --site <slug> --intent netbox
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`--only lldp` is the fastest first run: cabling only, switch credentials only. A device that refuses or does
|
|
42
|
+
not answer is reported as unreachable, never fatal. Nautobot works the same way with `--intent nautobot`;
|
|
43
|
+
so does a `turnup.intent/v1` YAML file. What is read from NetBox, the device roles it expects, the
|
|
44
|
+
management-endpoint custom fields and the firmware baseline are in [docs/intent.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/intent.md).
|
|
45
|
+
|
|
46
|
+
## Try it without hardware
|
|
47
|
+
|
|
48
|
+
[simhall](https://github.com/turnup-dev/simhall) is a virtual hall that serves the same NetBox, Redfish,
|
|
49
|
+
eAPI/NVUE and DCGM protocols with fault injection. Its golden scenario reproduces the output above:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install simhall
|
|
53
|
+
simhall serve --golden hall-b & # 127.0.0.1:8900, any token
|
|
54
|
+
turnup-check --site hall-b --intent http://127.0.0.1:8900/netbox # exits 1: one wrong_port
|
|
55
|
+
simhall act '{"kind":"seat_cable","label":"CBL-12-07-03","b_interface":"swp21"}'
|
|
56
|
+
turnup-check --site hall-b --intent http://127.0.0.1:8900/netbox # exits 0: 288 / 288
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Simulated runs are marked `simulated: true` in the report and never count anywhere.
|
|
60
|
+
|
|
61
|
+
## What it finds
|
|
62
|
+
|
|
63
|
+
| Finding | Fix it prints |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `wrong_port`: the NIC shows up on another switch port | `move cable one port up` (or `k ports down`, or `from leaf4/30 to leaf4/21`) |
|
|
66
|
+
| `missing_link`: intended port empty, NIC seen nowhere | `seat cable CBL-12-07-03 at leaf4/21`; `check NIC` when the BMC says the NIC port is down |
|
|
67
|
+
| `link_degraded`: right neighbor, port down or below intended speed | check cable / transceivers |
|
|
68
|
+
| `unexpected_link`: a neighbor where intent has no cable | trace and update intent |
|
|
69
|
+
| `unreachable_node`: Redfish down or HTTP error | check reachability and credentials |
|
|
70
|
+
| `firmware_off_baseline`: a component differs from the baseline | `update bmc on node7 to 1.12.0` |
|
|
71
|
+
| `gpu_count_mismatch`, `gpu_unhealthy`, `nvlink_degraded`, `node_health_warning` | reseat, RMA packet, check NVLink, read the BMC log |
|
|
72
|
+
|
|
73
|
+
A `wrong_port` is one finding, correlated across the NIC and both switch ports, never two. The exact rules,
|
|
74
|
+
including what is a note rather than a finding, are in [docs/findings.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/findings.md).
|
|
75
|
+
|
|
76
|
+
## How it works
|
|
77
|
+
|
|
78
|
+
Switches are read over Arista eAPI, NVIDIA NVUE or SNMP (LLDP-MIB); nodes over DMTF Redfish and the DCGM
|
|
79
|
+
exporter. All devices are polled concurrently with a per-request deadline (`--timeout`, default 3 s), so a
|
|
80
|
+
dead device never stalls the run; a clean hall costs about ten Redfish requests per node.
|
|
81
|
+
[docs/polling.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/polling.md) has the protocols, concurrency limits and the credentials file.
|
|
82
|
+
|
|
83
|
+
The report is `turnup.report/v1` JSON with the summary, every finding with its evidence, and the sources
|
|
84
|
+
that answered: [docs/report.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/report.md). Telemetry is off unless you pass `--telemetry`; the payload
|
|
85
|
+
is counts only, never names: [docs/telemetry.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/telemetry.md).
|
|
86
|
+
|
|
87
|
+
`netbox_plugin/` holds `netbox-turnup-check`, a NetBox plugin that lists report files in a menu
|
|
88
|
+
(`netbox_plugin/README.md`).
|
|
89
|
+
|
|
90
|
+
## Status
|
|
91
|
+
|
|
92
|
+
v0.1.0. The NetBox and Nautobot adapters have run against the public demos (NetBox 4.7, Nautobot 3.2),
|
|
93
|
+
not yet against a production GPU hall. The NVUE and SNMP paths follow the public docs and canned tables and
|
|
94
|
+
have not been verified on a real switch. The full list is in
|
|
95
|
+
[docs/development.md](https://github.com/turnup-dev/turnup-check/blob/main/docs/development.md#status-and-known-gaps-v010), with how to develop, test and
|
|
96
|
+
release.
|
|
97
|
+
|
|
98
|
+
Written from public specifications only: DMTF Redfish, IEEE 802.1AB LLDP and LLDP-MIB, NVIDIA
|
|
99
|
+
DCGM-exporter metric names, NetBox and Nautobot REST API docs, Arista eAPI and NVIDIA NVUE public docs,
|
|
100
|
+
the Prometheus exposition format. Example halls are synthetic.
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
Apache-2.0. See `LICENSE`.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
[build-system]
|
|
3
|
+
requires = ["setuptools>=77"]
|
|
4
|
+
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "turnup-check"
|
|
8
|
+
version = "0.1.0"
|
|
9
|
+
description = "Diff the intended GPU-hall build (NetBox/Nautobot) against what LLDP, Redfish and DCGM actually see."
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
requires-python = ">=3.12"
|
|
14
|
+
authors = [{ name = "Turnup contributors" }]
|
|
15
|
+
keywords = ["netbox", "nautobot", "redfish", "lldp", "dcgm", "gpu", "datacenter", "bring-up"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: System Administrators",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Topic :: System :: Networking :: Monitoring",
|
|
25
|
+
"Topic :: System :: Hardware",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"httpx>=0.27",
|
|
29
|
+
"pydantic>=2.5",
|
|
30
|
+
"pyyaml>=6.0",
|
|
31
|
+
"click>=8.1",
|
|
32
|
+
"rich>=13.0",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
snmp = ["pysnmp>=7.1"]
|
|
37
|
+
netbox = ["pynetbox>=7.0"]
|
|
38
|
+
dev = [
|
|
39
|
+
"pytest>=8",
|
|
40
|
+
"pytest-asyncio>=0.24",
|
|
41
|
+
"pytest-timeout>=2.3",
|
|
42
|
+
"hypothesis>=6.100",
|
|
43
|
+
"ruff>=0.6",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.scripts]
|
|
47
|
+
turnup-check = "turnup_check.cli:main"
|
|
48
|
+
|
|
49
|
+
[project.urls]
|
|
50
|
+
Homepage = "https://github.com/turnup-dev/turnup-check"
|
|
51
|
+
Repository = "https://github.com/turnup-dev/turnup-check"
|
|
52
|
+
Changelog = "https://github.com/turnup-dev/turnup-check/blob/main/CHANGELOG.md"
|
|
53
|
+
Issues = "https://github.com/turnup-dev/turnup-check/issues"
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.packages.find]
|
|
56
|
+
where = ["src"]
|
|
57
|
+
|
|
58
|
+
[tool.setuptools.package-data]
|
|
59
|
+
turnup_check = ["py.typed"]
|
|
60
|
+
|
|
61
|
+
[tool.pytest.ini_options]
|
|
62
|
+
testpaths = ["tests"]
|
|
63
|
+
asyncio_mode = "auto"
|
|
64
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
65
|
+
timeout = 60
|
|
66
|
+
markers = [
|
|
67
|
+
"integration: needs simhall importable; skipped cleanly otherwise",
|
|
68
|
+
"slow: long-running integration tier (property, scale)",
|
|
69
|
+
]
|
|
70
|
+
filterwarnings = ["error::DeprecationWarning:turnup_check.*"]
|
|
71
|
+
|
|
72
|
+
[tool.ruff]
|
|
73
|
+
target-version = "py312"
|
|
74
|
+
line-length = 110
|
|
75
|
+
extend-exclude = ["netbox_plugin/netbox_turnup_check/templates"]
|
|
76
|
+
|
|
77
|
+
[tool.ruff.lint]
|
|
78
|
+
select = ["E", "F", "W", "I", "UP", "B", "N", "SIM", "RUF"]
|
|
79
|
+
ignore = ["RUF012", "SIM108", "B008"]
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint.per-file-ignores]
|
|
82
|
+
"tests/**" = ["N802", "N806", "RUF001", "RUF003"]
|
|
83
|
+
"netbox_plugin/**" = ["N999"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Copyright 2026 Turnup contributors
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
"""turnup-check: diff the intended GPU-hall build against what LLDP, Redfish and DCGM see."""
|
|
4
|
+
|
|
5
|
+
__version__ = "0.1.0"
|
|
6
|
+
TOOL_NAME = "turnup-check"
|
|
7
|
+
INTENT_SCHEMA = "turnup.intent/v1"
|
|
8
|
+
REPORT_SCHEMA = "turnup.report/v1"
|
|
9
|
+
PING_SCHEMA = "turnup.ping/v1"
|
|
10
|
+
|
|
11
|
+
__all__ = ["INTENT_SCHEMA", "PING_SCHEMA", "REPORT_SCHEMA", "TOOL_NAME", "__version__"]
|