Skip to content

DSL overview and syntax ​

Every Networker topology is a text file in an XML-like language, the DSL (.dsl files). Whatever you do in the views is written back to this text, and you can edit the text directly in the DSL editor. This reference lists every element (tag), each one's attributes, and the values each attribute accepts.

Download the schema

The single-file schema these pages are based on is also served by the app at /dsl-schema.md, and the Import dialog links to it.

File structure ​

A file has an optional <Catalog> block followed by exactly one <Topology> block.

text
<Catalog>          <!-- optional, at most one: reusable templates -->
  ...device, NIC, cable and transceiver templates...
</Catalog>

<Topology view="rack-elevation">   <!-- required, exactly one: what is installed -->
  ...racks, devices, cables, power cords...
</Topology>
  • The Catalog holds templates: a switch model, a server chassis, a NIC card, a cable part number. They describe hardware once.
  • The Topology holds what is installed: racks, the devices in them (each optionally made from a template with template="id"), and the cables and power cords between their ports.

<Topology view="..."> records which view the file opens in. See the View enum.

Attribute syntax ​

There are two kinds of attribute values:

KindSyntaxExample
Stringkey="value"label="leaf-01", speed="400G"
Objectkey={{ k1: v1, k2: v2 }} — double braces, numeric values onlyposition={{ x: 100, y: 200 }}

Object attributes are used for position and layout; see Layout object. Comments use XML syntax: <!-- ... -->.

Element map ​

ElementWhere it goesPage
<Server>, <Switch>, <PDU> (templates)<Catalog>Catalog: device templates
<Nic> / <PortGroup> / <Phase> / <Inlet> (in a template)inside a catalog deviceCatalog: device templates
<Nic id> (standalone NIC)<Catalog>Catalog: NICs, cables, transceivers
<Cable id> (cable template)<Catalog>Catalog: NICs, cables, transceivers
<Transceiver id><Catalog>Catalog: NICs, cables, transceivers
<Rack><Topology>Topology: racks and devices
<Server>, <Switch>, <PDU> (installed)<Topology>Topology: racks and devices
<Nic>, <PortGroup>, <Phase>, <Port>, <Outlet>, <Inlet>inside an installed deviceTopology: ports, inlets, bonds
<Bond>, <Breakout>inside an installed deviceTopology: ports, inlets, bonds
<Cable>, <PowerCable><Topology>Cables and power cords
<Transceiver>, <Fiber>, <Copper> (assembly)inside a <Cable>Cables and power cords

Port paths ​

Cables, power cords and bonds point at ports by path:

DeviceLabel/NicLabel/PortLabel        e.g. node-001/eth0/p0
DeviceLabel/NicLabel/PortLabel:N      e.g. leaf-01/ports/swp1:2   (channel 2 of a breakout port)
  • The path is read from the left: device, then NIC (or port group, phase, inlet), then everything after that is the port name. Port names may contain / (xe-1/1/15, Eth1/1).
  • :N picks a breakout channel, counted from 0. Only switch ports can be broken out.
  • A port that is not broken out takes one cable; a breakout port takes one cable per channel.
  • Bond members are written relative to the device, without the device label: eth0/p0.

Errors ​

The file is checked as a whole when it is imported or applied. Any error rejects the whole import and the message names what is wrong, for example Cable "from" path ... not found or Bond "bond0" member "eth9/p0" not found. The rules that produce errors are listed with each element.

Labels (filter tags) ​

Devices, cables and power cords take a labels attribute: comma-separated tags such as labels="rack-a,gpu". Surrounding spaces are trimmed and repeats are dropped; a tag cannot contain , or ". Labels are what the label filter in each view's side bar works on; see Editing items.