@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. | はい |
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. | いいえ |
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. | いいえ |
members | string[] | The devices it stands for when their links are not told apart, such as stack units. | いいえ |
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 layout 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 | The cable's type, such as cat6, mmf-om4, smf or dac. | いいえ |
length | Length | The cable's length. | いいえ |
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. | いいえ |
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. | はい |
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