Fabric ports at 10G, 100G or 400G, in LAGs; fabric customers only when they fit

A fabric (NNI) port comes in 10G, 100G or 400G, as fast as the router
takes and no faster than 400G, and bundles into a LAG of up to eight
members like transit, IX and PNIs. Each member takes a router port (10G
on a breakout, a quarter of one) and pays the monthly price; upgrading
moves and pays for every member. 10G and 100G keep their prices, 400G is
$3,000/mo. A model change that would strand a 400G fabric port is refused,
and saves drop fabric ports that make no sense.

The NNI requirement counted what the port already carried but not the
offer's own bandwidth, so an offer passed as long as the port was not
already over and auto-accept took customers that did not fit. It now
counts the offer too.

Closes #140, closes #307.
This commit is contained in:
Frederic Jung 2026-11-06 06:33:19 +01:00
parent 4ec3fb4a1a
commit 85701dbb82
No known key found for this signature in database
22 changed files with 184 additions and 27 deletions

View file

@ -134,8 +134,11 @@ const API_CMD={
doc:'Hold a link in reserve: its capacity fills last.'},
/* ---------- fabrics and VXCs ---------- */
buyNni:{args:[['city','cityId'],['prov','fabId'],['tier','nniTier']],
quote:a=>({setup:NNI[a.tier]?NNI[a.tier].mo:undefined,monthly:NNI[a.tier]?NNI[a.tier].mo:undefined}),
doc:'Take a port on an interconnection fabric. Monthly. A higher tier upgrades unless the circuits on it already exceed the smaller port.'},
quote:a=>{const ex=nniPort(a.city,a.prov),n=ex?(ex.n||1):1,m=NNI[a.tier]?NNI[a.tier].mo*n:undefined;return {setup:m,monthly:m};},
doc:'Take a port on an interconnection fabric, at any port speed the router takes. Monthly, the first month up front. A higher tier upgrades every member of the port.'},
lagNni:{args:[['city','cityId'],['prov','fabId'],['d','step']],watch:['nni'],
quote:a=>{const pt=nniPort(a.city,a.prov),m=pt&&a.d>0&&NNI[pt.tier]?NNI[pt.tier].mo:0;return {setup:m,monthly:m};},
doc:'Add (d:1) or remove (d:-1) a member of the fabric port\'s LAG: same speed, one more router port, up to 8. Removing is rejected while the circuits would not fit.'},
rmNni:{args:[['city','cityId'],['prov','fabId']],
doc:'Give the fabric port back. Rejected while circuits still use it.'},
buyVxc:{args:[['a','cityId'],['b','cityId'],['prov','fabId'],['t','vxcTier']],