@shumoku/core · input model
YAML reference
欄の説明は、正本である型のコメント(英語)をそのまま表示しています。
ネットワークの YAML に書ける欄です。入力モデルの型から生成しています。
Document
The whole YAML document: one network.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
name | string | The network's name. | いいえ |
description | string | What the network is, in words. | いいえ |
groups | Group[] | Its places, written nested: sites, buildings, rooms, racks. | いいえ |
routingDomains | RoutingDomain[] | Its separate routing domains, such as VPCs and VRFs. | いいえ |
connections | Connection[] | Logical connections made of several links. | いいえ |
segments | Segment[] | Its shared networks, such as VLANs and subnets. | いいえ |
redundancy | Redundancy[] | Its redundancy sets, such as VRRP pairs and HA clusters. | いいえ |
nodes | Node[] | Its devices, virtual machines and services. | はい |
links | Link[] | Its links, each between two nodes or between a node and a segment or routing domain. | はい |
terminations | Termination[] | The passive points its cables run through: outlets, risers, patch panels. | いいえ |
Node
A device, a virtual machine or a service: one thing links end at.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | node id | Unique among nodes; links, segments and redundancy sets name the node by it. | はい |
label | string | The node's name, left out when it is not known; the id is then only a handle. | いいえ |
type | string | What kind of node it is, such as router, l3-switch, firewall, server, virtual-machine or access-point. | いいえ |
product | Product | What it is, from its maker down to its model, as far as is known. | いいえ |
productId | string | The product in the project's own library that this node is, by that product's id. A different thing from `product`, which names the maker and model. | いいえ |
platform | string | For a virtual machine, what runs it, such as ec2, esxi or proxmox. | いいえ |
service | string | For a managed service, the service's name within its provider, such as lambda or s3. | いいえ |
resource | string | For a managed service, the kind of resource within the service, such as function or bucket. | いいえ |
software | string | The software it runs, such as its operating system or hypervisor. | いいえ |
address | string | An address whose segment is not known; once it is, the address goes in the segment. | いいえ |
asn | number | The autonomous system it is in, such as a router's local AS. | いいえ |
description | string | Anything else worth knowing about it, in words. | いいえ |
group | group id | The place it is in. | いいえ |
assumed | true | Its existence is not confirmed. Details that are not known are left out instead. | いいえ |
host | node id | redundancy id | What it runs on: a node, or a redundancy set when which of its nodes is not known. This is a hosting relationship, not a network link; communication is written in links. A host alone does not identify a VM: services and other workloads can also be hosted. The drawing draws a host as a box holding what runs on it, its own card at the top; a redundancy set named as a host becomes a frame round its nodes and its guests. A node that names a group other than its host's stays in that group. | いいえ |
members | string[] | The devices it stands for when their links are not told apart, such as stack units. | いいえ |
ports | Port[] | Its ports, when more than their names is known or the node has ports no link uses. | いいえ |
Port
A port of a node: what the device calls it, and what is known of the receptacle. A link end names the port by its name; a port is written here when something more than the name is known, or when the node has ports no link uses.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
name | string | Its name as the device calls it, such as `ge-0/0/1`; unique among the node's ports. A port known only by its hardware address is named by that address. | はい |
label | string | The name it is shown with, when it differs from `name`, such as `Gi1/0/1`. | いいえ |
interfaceName | string | The full interface name the operating system reports, such as `GigabitEthernet1/0/1`. | いいえ |
aliases | string[] | Other names it goes by, for matching. | いいえ |
role | string | What it is for, such as downlink, uplink, wan, lan, management, power or console. | いいえ |
faceplateLabel | string | The marking on the faceplate, such as `1`, when it differs from the name. | いいえ |
speed | string | The rate the port is made for, such as 1G or 10G. | いいえ |
connectors | string[] | The receptacles it has, such as rj45, sfp+ or qsfp28; two or more when they share the port and only one is in use at a time (a combo port). | いいえ |
poe | boolean | Whether it can power the device at the other end (PoE). | いいえ |
source | 'catalog' | 'custom' | Where the port's description came from: the product's catalog entry, or written by hand. | いいえ |
notes | string | Anything else worth knowing about it, in words. | いいえ |
Link
Undirected: the two ends have no order. Two nodes may have several links, such as parallel cables or the two tunnels of one VPN.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | link id | Written only when something refers to the link, such as its drawing or its cable run. | いいえ |
endpoints | [Endpoint, Endpoint] | Its two ends, in either order. | はい |
speed | Rate | The rate the link runs at. | いいえ |
bandwidth | Rate | A lower rate than the link runs at, that traffic over it is held to. | いいえ |
cable | string | Cable | The cable: its type, such as cat6, om4, smf or dac, written bare; or the cable in full. | いいえ |
length | Length | The cable's length. | いいえ |
via | string[] | The terminations the cable passes, in order from the first end to the second. | いいえ |
segments | segment id[] | The segments the link carries. Both ends are in each of them. | いいえ |
description | string | Anything else worth knowing about it, in words. | いいえ |
connection | connection id | The connection this link is one part of. | いいえ |
assumed | true | Its existence is not confirmed. Unknown ports or segments are left out instead. | いいえ |
virtual | true | It has no cable of its own, such as a VPN tunnel, a VM's adapter in a port group, or a BGP session across a shared LAN. A link whose way is not known is neither virtual nor cabled. | いいえ |
Link end: node
One end of a link: a node (and its port when known), a segment the node is in, or a routing domain the node is attached to as a whole.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
node | node id | The node the link ends at. | はい |
port | string | The port's name as the device calls it, such as `ge-0/0/1`; left out when not known. | いいえ |
plug | Plug | What is plugged into the port at this end. | いいえ |
Link end: segment
A link end at a segment: the node at the other end is joined to the segment as a whole.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
segment | segment id | The segment the node is joined to. | はい |
Link end: routing domain
A link end at a routing domain: the node at the other end is attached to it as a whole.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
routingDomain | routing domain id | The routing domain the node is attached to. | はい |
Plug
What is plugged into a port at one end of a link: the cable's plug, and the transceiver in it.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
cage | string | The form the plug presents, such as rj45, sfp+ or qsfp28. Left out when the port's connectors or the module's standard already say it. | いいえ |
module | Module | The transceiver in the plug, for a pluggable cage. An RJ45 plug, a DAC or an AOC has none. | いいえ |
Module
A transceiver in a plug.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
standard | string | The standard it implements, such as 10GBASE-SR, 1000BASE-T or 100GBASE-LR4. | はい |
sku | string | Its part number, such as SFP-10G-SR-S. | いいえ |
productId | string | The product in the project's own library that this module is, by that product's id. | いいえ |
Cable
A cable, when more than its type is known. Written bare, a cable is its type.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
type | string | Its type: a grade, such as cat6, om4 or os2, or a medium, such as twisted-pair, mmf, smf, dac or aoc. | いいえ |
productId | string | The product in the project's own library that this cable is, by that product's id. | いいえ |
Termination
A passive point a cable runs through on its way between two nodes: a wall outlet, a riser (EPS) or a patch panel. Links name the terminations they pass in `via`. Where a termination sits on a floor plan is not part of the network.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | string | Unique among terminations; links name it by this. | はい |
label | string | Its name, such as `Outlet 1F-03`. | いいえ |
role | 'outlet' | 'eps' | 'panel' | What it is: a wall outlet, a riser (eps) or a patch panel. | はい |
autoFor | string | Written on an outlet a routing dialog made for one link's run through one riser, as `<link id>:<riser id>`, so the outlet goes when that run does. | いいえ |
Group
A place: site, building, room. A group written inside another is a place within it.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | group id | Unique among groups; nodes and segments name their group by it. | はい |
label | string | The place's name, such as `Tokyo DC` or `Rack A1`. | いいえ |
groups | Group[] | The places within it. | いいえ |
Segment
A shared network that any number of links can carry, such as a VLAN, a handoff segment or a cloud subnet. A node is in a segment when it has an address there, when a link carrying the segment ends at it, or when a link joins it to the segment itself.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | segment id | Unique among segments; links name the segments they carry by it. | はい |
label | string | Its name, such as `mgmt` or `users-a`. | いいえ |
vlan | number | Its VLAN ID, 1 to 4094. | いいえ |
prefix | OneOrMore<string> | Its subnets, such as `10.0.10.0/24`, or one for each address family. | いいえ |
routingDomain | routing domain id | The routing domain it belongs to, when it is a separate one such as a VPC or a VRF. | いいえ |
group | group id | The place the segment is confined to, such as an availability zone. | いいえ |
addresses | Readonly<Record<node id | redundancy id, OneOrMore<string>>> | The addresses nodes have in the segment, by node. An address belongs to a node's presence in the segment rather than to a port. A redundancy set's shared address is written under the set. | いいえ |
Routing domain
A separate routing domain that segments belong to, such as a VPC, a cloud virtual network or a VRF. Written only when such a domain is known; a network with a single routing table has none, and a subnet, a place or an autonomous system is not one (see a node's asn).
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | routing domain id | Unique among routing domains; segments name theirs by it. | はい |
label | string | Its name, such as the VPC's or the VRF's. | いいえ |
prefix | OneOrMore<string> | The address ranges it holds, such as a VPC's CIDR blocks. | いいえ |
Connection
One logical connection made of several links, such as a VPN made of two tunnels.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | connection id | Unique among connections; each of its links names it by this. | はい |
label | string | Its name, such as the VPN's. | いいえ |
Redundancy set
Separate nodes that stand in for one another, such as a VRRP pair or an HA cluster.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | redundancy id | Unique among redundancy sets; a node's host or a segment address can name the set by it. | はい |
label | string | Its name, such as the cluster's. | いいえ |
nodes | node id[] | Two or more. | はい |
kind | string | How they stand in for one another, such as ha (VRRP, HSRP), vc (a virtual chassis), vss, vpc, mlag or stack. | いいえ |
assumed | true | The pairing is believed but not confirmed. | いいえ |
Value types
Shapes that fields above refer to by name.
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
Rate | `${number}${'M' | 'G' | 'T'}` | A rate: a number and its unit, such as 100M, 2.5G or 50M. | いいえ |
Length | `${number}${'mm' | 'cm' | 'm' | 'km' | 'in' | 'ft'}` | A cable's length with its unit, such as 3m. | いいえ |
Product | string | A product path from its maker down to as specific as is known, such as `juniper`, `juniper/ex4400` or `juniper/ex4400/ex4400-48p`. An unknown maker is `?`, as in `?/ex4400-48p`. | いいえ |
OneOrMore | T | [T, ...T[]] | One value is written bare and several as a list, which is never empty. | いいえ |
実行可能な例
name: Branch network
nodes:
- id: router
label: Router
type: router
- id: switch
label: Access switch
type: l2-switch
links:
- endpoints: [{node: router}, {node: switch}]
examples/getting-started.yaml