Skip to content

Commit 155a591

Browse files
lab generator update (#30)
* conversion to frr * Fixed bug for frr conversion Fixed bug when a router was running both ospf and rip, the former would overwrite the latter. Now every frr.conf line is appended one after another. * Fix makeBgpConf appending "router bgp" to frr.conf instead of reassigning the string * test * updated electron (?) * Added routing software option * electron update (don't know) * Update generateZip function to include daemonOption parameter * changed place drop down menu for routing software * removed unused variable * added routing software choice for single router * custom commands for frr.conf can now be put in the appropriate text box * corretto mispelling * Solved bug where in model.js where frr.free was not initialised and didn't allow the lab to generate correctly * Capitalised Frr * selected frr as standard choice * specified base image for terminal, ws, ns * Corrected error where frr would be thrown out of bgp "mode" when adding bgp debug commands not allowing custom frr.conf commands to fall in the bgp section * Update package-lock.json * Update package.json * Update package.json * Delete package.json * Create package.json * removed daemonOption param * removed code block that would have never run * Updated DNS to new name daemon. Fixed bug in DNS configuration (legacy bug?) * Update index.html * introduced text boxes to allow custom commands in frr.conf * added paragraph level break in index.html between text boxes
1 parent 905c648 commit 155a591

File tree

4 files changed

+406
-211
lines changed

4 files changed

+406
-211
lines changed

index.html

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,14 @@ <h4>
401401
</div>
402402

403403
<div data-ng-show="machine.type=='router'">
404-
<label>Dynamic routing: </label>
404+
<label>Dynamic routing </label><br>
405+
<span>Routing software:</span>
406+
<select id="daemonDropDown" data-ng-model="machine.routingSoftware">
407+
<option value="frr">FRR</option>
408+
<option value="quagga">Quagga</option>
409+
</select>
410+
<br><br>
411+
<span>Routing protocols:</span>
405412
<p>
406413
<input title="en" type="checkbox" value="router"
407414
data-ng-model="machine.routing.rip.en" /> rip
@@ -443,10 +450,13 @@ <h4>
443450
<input title="redistributec" type="checkbox" value="1"
444451
data-ng-model="machine.routing.rip.connected" /> redistribute connected
445452
</div>
446-
<label>Directly in ripd.conf:</label>
453+
<div>
454+
<label data-ng-show="machine.routingSoftware == 'quagga'">Directly in ripd.conf:</label>
455+
<label data-ng-show="machine.routingSoftware == 'frr'">Directly after rip config in frr.conf:</label>
447456
<textarea title="free" rows="3" class="form-control"
448457
data-ng-model="machine.routing.rip.free"></textarea>
449458
<hr>
459+
</div>
450460
</div>
451461
<p>
452462
<input title="en" type="checkbox" value="ns"
@@ -457,7 +467,7 @@ <h4>
457467
Network</span>
458468
<span class="btn btn-danger" data-ng-click="removeOspfNetwork(machine)"
459469
data-ng-disabled="machine.routing.ospf.network.length<=1">Remove
460-
Newtork</span>
470+
Network</span>
461471
<div data-ng-repeat="onet in machine.routing.ospf.network track by $index">
462472
<div>
463473
<label>Network: </label>
@@ -502,10 +512,13 @@ <h4>
502512
value="{{i.eth.number}}">eth{{i.eth.number}}</option>
503513
</select>
504514
</div>
505-
<label>Directly in ospfd.conf:</label>
515+
<div>
516+
<label data-ng-show="machine.routingSoftware == 'quagga'">Directly in ospfd.conf:</label>
517+
<label data-ng-show="machine.routingSoftware == 'frr'">Directly after ospf config in frr.conf:</label>
506518
<textarea title="free" rows="3" class="form-control"
507519
data-ng-model="machine.routing.ospf.free"></textarea>
508520
<hr>
521+
</div>
509522
</div>
510523
<p>
511524
<input title="en" type="checkbox" value="router"
@@ -546,11 +559,18 @@ <h4>
546559
data-ng-model="machine.routing.bgp.remote[$index].description" />
547560
</div>
548561
<div>
549-
<label>Directly in bgpd.conf:</label>
562+
<label data-ng-show="machine.routingSoftware == 'quagga'">Directly in bgpd.conf:</label>
563+
<label data-ng-show="machine.routingSoftware == 'frr'">Directly after bgp config in frr.conf:</label>
550564
<textarea title="free" rows="3" class="form-control"
551565
data-ng-model="machine.routing.bgp.free"></textarea>
566+
<hr>
552567
</div>
553568
</div>
569+
<div data-ng-show="machine.routingSoftware == 'frr'">
570+
<label>Directly in frr.conf:</label>
571+
<textarea title="free" rows="3" class="form-control"
572+
data-ng-model="machine.routing.frr.free"></textarea>
573+
</div>
554574
</div>
555575
</td>
556576
</tr>
@@ -723,4 +743,4 @@ <h4 class="modal-title">Running Commands</h4>
723743
</div>
724744
</body>
725745

726-
</html>
746+
</html>

src/lab-generator/controller.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ app.config(["$compileProvider",
1111
app.controller("nc", function ($location, $anchorScroll, $scope) {
1212

1313
$scope.app = "include/app.html";
14-
1514
$scope.labInfo = JSON.clone(labInfo);
1615
$scope.netkit = [];
1716
$scope.counter = 0;

0 commit comments

Comments
 (0)