Skip to content

Portrayal 0.2.0

Latest

Choose a tag to compare

@roc-ops roc-ops released this 11 Oct 01:14
· 1526 commits to main since this release
08ebd4d

Portrayal is network hardware as data. Each device is a declarative YAML manifest that places reusable component contracts, and the compiler turns it into one SVG in real millimetres with every port, supply, lamp and bay addressable.

0.2.0 adds power, rack furniture and the rules for laying cable in a rack.

What's in it

  • 256 devices from 22 vendors, 86 more than 0.1.0, none removed. New vendors: Amphenol Network Solutions (11 breaker panels), AurCore (10 DIN-rail switches), Eaton (4 rack PDUs), Supermicro (4 servers), Fibrain (1 patch panel) and HPE (1 server). FS.com gains 47: cable managers, vertical ducts, blanking panels, fan trays, shelves and DIN rail brackets.
  • 1,485 component majors, 524 of them new.
  • 105 NOS listings, up from 29: 42 OcNOS (IP Infusion), 13 DNOS (DriveNets) and 21 SONiC join the 29 ArcOS listings.
  • Connectors and plugs. AC inlets and outlets, USB, D-sub, DC barrel, terminal blocks and headers, ground studs with ring and two-hole lugs, MRJ21, VHDCI and RJ11 are connector slots, and a cable plug seats in each.
  • More optics. CFP, CFP2, CFP4, CXP, OSFP and XFP cages offer generic optics. MPO, BiDi and SC PON generics are new.
  • Rack PDUs and power panels. Outlets, breakers, lines and the input rating are data. The DCIM exports write power outlets, and a PDU's class is derived from what it meters and switches.
  • Rack furniture. chassis.mount says how a part is installed: rack, rack-face, rack-side, din-rail, wall or desktop. Sheet bodies, bevels, overhang, ear positions and rail kits (kind: kit) are new.
  • Cable lay in the kit. The rack command core, bundles, trays, rings, solid bodies, cable types and bend radii. A routed length follows the path a cable would take. The kit in the tree is 0.18.0.
  • New build files. rack.json, kits.json, cable-types.json, lint-rules.json, and an elements.json beside every compiled face.
  • Diagram exports in the kit: draw.io and OmniGraffle, with cables.
  • 173 lint rules, 48 of them new (L125 to L172), and a suite of more than 8,600 tests.

What broke

format is still 1 and the published build is still contract: 2. The 0.2.0 section of CHANGELOG.md lists every change. An entry that needs action is marked BREAKING or ONE-WAY.

  • Removed component majors. 66 majors that 0.1.0 shipped are gone. Each is under Removed with the ref that replaces it. Most are Juniper MX cards: the 22 horizontal cards moved to a new major, and the MX960 vertical twins were replaced by the horizontal card turned 90 degrees.
  • Device majors. 34 of the 170 devices in 0.1.0 took at least one major: a placement id changed, or a slot moved. The causes are ground points that became stud pairs, re-measured MX card slots and re-measured port strips.
  • DCIM renames. Telco Systems is exported as BATM/Telco Systems. The Edgecore DCS510 AC types are renamed. A box that is not racked exports u_height: 0, and the Dell R740xd exports 2U. USB storage and service jacks on 26 cards no longer export as consoles. Several Juniper module types and MIC ports are renamed. Nautobot module types carry their own bays, and ports under them take the parent bay in their names. NetBox nested module bays need NetBox 4.5.7 or later.
  • Schemas. The device schema types ten keys under attrs.power and attrs.management that took any scalar at 0.1.0. A manifest outside the library that used one of these names with another spelling of the value is refused. No key was removed from any schema, and every manifest of the 0.1.0 library validates under both versions.
  • Lint. A manifest outside the library that passed at 0.1.0 can fail one of the 48 new rules.
  • Saved-rack lengths. The rack file is version 3, and routed lengths changed with each step of the cable lay. The rack modules are new in this release, so this concerns a page built from main, not a consumer of 0.1.0.

Getting started

git clone https://github.com/roc-ops/Portrayal.git && cd Portrayal
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[test]"
./build.sh                      # lint, then compile every device into library/dist/
python3 tools/serve.py 8931     # then open http://localhost:8931/kit/index.html

The NetBox and Nautobot types are already built under library/exports/.

Known limits

  • @portrayal/kit on npm is still 0.2.0. It is published separately from this release and has none of the rack modules. Use the kit from a clone to get 0.18.0.
  • The compiled library is going to npm one package per device, a batch a day. @portrayal/index is not on npm yet, so nothing loads the library from a CDN.
  • Three devices are marked draft: dell/r660, dell/r740xd and celestica/ds6001.
  • No rail kit (kind: kit) is in the library yet. The format and the lint rules for one are in place.
  • The Python package is not on PyPI. Install from a clone.

Thanks

Portrayal is sponsored by RocNet Supply. Vendor and product names belong to their owners, and Portrayal is not affiliated with any vendor it models; see NOTICE.

Apache-2.0. Contributions are welcome under the Developer Certificate of Origin (git commit -s).