Zoom levels of detail, grouped parallel waves, POP decommissioning (1.15.0)
Zoomed out, cities become dots and POPs small router pills with thinner links and fewer labels. Up close a POP shows the router instead of the skyline, with a router B for a second site. Parallel waves on one cable draw as one line with a combined label. POPs can be decommissioned one at a time or in bulk, with early-termination penalties for affected customers. Dark fiber panels can add parallel links. NLNOG Day joins the conferences. Closes #37 Closes #19 Closes #32
This commit is contained in:
parent
7e20a1a2f0
commit
1d6ec48bf3
6 changed files with 154 additions and 21 deletions
|
|
@ -285,3 +285,39 @@ test('an optical control plane meltdown darkens every leased wave in a region, n
|
|||
assert.equal(ev("S.links.filter(l=>l.kind==='wave').some(l=>linkDown(l))"), false, 'escalating brings them back');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('decommissioning POPs, one or several, removes what is there and charges for the customers', () => {
|
||||
const { ev, errors } = load();
|
||||
ev("ACT.start({});S.cash=1e8;S.lvl=4;for(const g of GOALS)S.done[g.id]=0;ACT.launchBB({city:'fra'})");
|
||||
ev("for(const c of ['ams','par','lon'])ACT.buildPop({city:c});const L=(a,b)=>{UI.via=null;openLinkModal(a,b);ACT.buildLink({tier:1});closeModal();};L('fra','ams');L('fra','par');L('ams','lon');ACT.buyTransit({city:'ams',net:'cog',tier:1});ACT.buyIx({city:'ams',tier:1});ACT.peerAll({city:'ams'});compute()");
|
||||
ev("S.biz.push({id:'b1',type:'l2vpn',name:'Tulip Bank',city:'ams',city2:'fra',bw:10,rate:300,reqs:[],mood:100,start:S.day},{id:'b2',type:'l2vpn',name:'Croissant Co',city:'par',city2:'fra',bw:5,rate:200,reqs:[],mood:100,start:S.day})");
|
||||
ev("selectCity('ams');ACT.tab({t:'infra'})");
|
||||
assert.match(ev("document.getElementById('panelBody').textContent"), /Decommission/);
|
||||
ev("ACT.decomOpen({city:'ams'})");
|
||||
assert.match(ev("document.getElementById('modalCard').textContent"), /Tulip Bank/);
|
||||
const cash = ev('S.cash');
|
||||
ev("ACT.decomToggle({city:'lon'});ACT.decomGo();compute()");
|
||||
assert.equal(ev("!!S.pops.ams||!!S.pops.lon"), false, 'both gone');
|
||||
assert.equal(ev("S.links.some(l=>[l.a,l.b].some(c=>c==='ams'||c==='lon'))"), false);
|
||||
assert.equal(ev("S.transit.length+Object.keys(S.ixp).length"), 0, 'ports and exchange go with them');
|
||||
assert.equal(ev("S.biz.map(b=>b.id).join()"), 'b2', 'only the Amsterdam customer is let go');
|
||||
assert.equal(cash - ev('S.cash'), 10 * 300 * 3, 'three months of the contract');
|
||||
// never the last one
|
||||
ev("ACT.decomOpen({});for(const c of Object.keys(S.pops))ACT.decomToggle({city:c});ACT.decomGo()");
|
||||
assert.ok(ev("Object.keys(S.pops).length") >= 1);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('#19 parallel waves draw as one line, dark fiber can add parallel links, NLNOG Day exists', () => {
|
||||
const { ev, errors } = load();
|
||||
ev("ACT.start({});S.cash=1e9;S.lvl=4;for(const g of GOALS)S.done[g.id]=0;ACT.launchBB({city:'fra'});ACT.buildPop({city:'nyc'});ACT.buildPop({city:'lon'})");
|
||||
ev("for(let i=0;i<4;i++){UI.via='grace';UI.route='same';openLinkModal('nyc','lon');ACT.buildLink({tier:1});closeModal();}compute()");
|
||||
assert.equal(ev("S.links.length"), 4);
|
||||
assert.equal(ev("linkGroups().length"), 1, 'four waves on one cable are one line');
|
||||
assert.match(ev("groupLabel(linkGroups()[0],linkGroups()[0])"), /^4×/);
|
||||
ev("S.links.push({id:'dfp',a:'fra',b:'lon',kind:'df',km:640,sys:'lite',ch:['zr4'],ready:0,mo:500,day:0,cut:0});ACT.selLink({id:'dfp'})");
|
||||
assert.match(ev("document.getElementById('panelBody').textContent"), /Add parallel link/);
|
||||
assert.ok(ev("CONFS.some(c=>c.n==='NLNOG Day'&&c.c==='ams')"));
|
||||
ev("cam.z=0.4;draw(0);cam.z=2;draw(0)");
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue