Commit 3c839c0
committed
gen_nodes: fix duplicate pcipassthrough keys in YAML output
The template was generating multiple 'pcipassthrough' keys for each
device, causing YAML parsing warnings about duplicate mapping keys.
Fixed by collecting all devices for a target guest first, then
outputting a single 'pcipassthrough' key with all devices under it.
This uses Jinja2's namespace feature to maintain state across loop
iterations.
Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>1 parent c63ffce commit 3c839c0
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments