Appearance
Layout object
position (on a device) and layout (on a NIC, port group, phase or inlet) use the object syntax: double braces, comma-separated key: value pairs, numbers only.
position={{ x: 100, y: 200 }}
layout={{ x: 0, y: 0, cols: 8, groupSize: 4, rows: 2 }}
layout={{ x: 360, y: 12, cols: 1, w: 60 }}| Field | Used in | Valid values / description |
|---|---|---|
x | both | Number: horizontal position |
y | both | Number: vertical position |
cols | layout | Whole number: columns in the port grid |
groupSize | layout | Whole number: put a gap after every N columns |
rows | layout | Whole number ≥ 1: rows in the grid (fills column by column) |
w | layout | Number: width of the group's box, in card units. Ports are fitted inside |
h | layout | Number: height of the group's box, in card units |
Card units and millimetres
layout values are in card units, measured from the top-left of the faceplate:
424units across the standard 19" chassis width (440 mm);84units per rack unit down (44.45 mm, 1U).
The Materials editor draws faceplates to scale and shows sizes in millimetres, converting with these ratios. For example an OCP NIC 3.0 SFF card, 76 mm wide, is w: 73.24.
A device whose cardWidth is not 424 was drawn before every chassis became the standard width; on load its groups' x and w are rescaled by 424 / cardWidth.
Rows and columns
- Without
rows: the group iscolsports wide, with as many rows as needed, filled left to right, then top to bottom. - With
rows: exactly that many rows, filled top to bottom, then left to right — ports 1 and 2 stacked, as on a switch. Ifrows × colscannot hold every port, the grid grows toceil(ports / rows)columns, so ports never overlap.
groupSize splits the columns into groups with a gap between them in both cases.
How rows face
With more than one row, each row is drawn right way up or upside down (latch on the other side), like a switch with rows stacked belly to belly. Set it with attributes on the group's element, not inside layout:
| Attribute | Valid values | Description |
|---|---|---|
facing | alternate, up, down | alternate: blocks of rows take turns, first up, then down. up / down: every row the same way |
adjacentRows | whole number ≥ 1, default 1 | With alternate, how many rows in a block face the same way. 2 with 4 rows is up, up, down, down |
Without facing, a group with rows alternates, and one without faces up. A single row always faces up. Both attributes are only read alongside a layout.
xml
<PortGroup label="ports" portCount="64" speed="800G" connector="OSFP"
layout={{ x: 12, y: 0, cols: 16, groupSize: 4, rows: 4 }}
facing="alternate" adjacentRows="2" />Port alignment
When a group's box is wider than its ports (stretched with w), align on the group's element says where the ports sit:
| Value | Description |
|---|---|
left | Against the left edge (default) |
center | Centred |
right | Against the right edge |
xml
<Nic label="cx7-1" portCount="1" speed="400G" connector="OSFP"
layout={{ x: 360, y: 12, cols: 1, w: 60 }} align="right" />Without w/h the box is exactly as large as its port grid, so align changes nothing.