Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
todo: consider term caps
todo: bgp to have xr-alike neighbor/template statements with upgrade-cli
todo: more upgrade-cli knobs
  • Loading branch information
mc36 committed Feb 11, 2023
1 parent 7cb46bf commit 58d1022
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 12 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13965,3 +13965,7 @@ todo: rework snmp to use sensors
---------------------------------- 2023-02-11 05:09:19 23.2.11
todo: router asdf vrf qwer, converted to current form
todo: interface lo0 as lo-core, persistently
---------------------------------- 2023-02-11 11:03:46 23.2.11
todo: consider term caps
todo: bgp to have xr-alike neighbor/template statements with upgrade-cli
todo: more upgrade-cli knobs
3 changes: 1 addition & 2 deletions src/net/freertr/cfg/cfgAll.java
Original file line number Diff line number Diff line change
Expand Up @@ -2859,8 +2859,7 @@ public static cfgIconn iconDel(String nam) {
* @param create create new on this number if not found
* @return descriptor, null if not found
*/
public static cfgRtr rtrFind(tabRouteAttr.routeType typ, int num,
boolean create) {
public static cfgRtr rtrFind(tabRouteAttr.routeType typ, int num, boolean create) {
if (num < 1) {
return null;
}
Expand Down
28 changes: 23 additions & 5 deletions src/net/freertr/cfg/cfgRtr.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public class cfgRtr implements Comparator<cfgRtr>, cfgGeneric {
*/
public cfgVrf vrf;

/**
* embed vrf name to router knob
*/
public boolean embedVrf;

/**
* forwarder of this router
*/
Expand Down Expand Up @@ -201,6 +206,7 @@ public class cfgRtr implements Comparator<cfgRtr>, cfgGeneric {
// router *
"router .*! no automesh",
"router .*! no description",
"router .*! no upgrade-cli",
// router rift
"router rift[46] .*! no suppress-prefix",
"router rift[46] .*! level 24",
Expand Down Expand Up @@ -1762,12 +1768,19 @@ private synchronized List<String> getShRun(int mode, int filter) {
default:
return l;
}
l.add("router " + num2name(type) + " " + number);
String a = "";
if (embedVrf) {
a = " vrf " + vrf.name;
}
l.add("router " + num2name(type) + " " + number + a);
cmds.cfgLine(l, description == null, cmds.tabulator, "description", description);
if (vrf == null) {
l.add(cmds.tabulator + "no vrf");
} else {
l.add(cmds.tabulator + "vrf " + vrf.name);
cmds.cfgLine(l, !embedVrf, cmds.tabulator, "upgrade-cli", "");
if (!embedVrf) {
if (vrf == null) {
l.add(cmds.tabulator + "no vrf");
} else {
l.add(cmds.tabulator + "vrf " + vrf.name);
}
}
ipRtr rtr = getRouter();
if (rtr != null) {
Expand Down Expand Up @@ -1951,6 +1964,7 @@ public void getHelp(userHelping l) {
l.add(null, "2 . <name:vrf> name of table");
l.add(null, "1 2 automesh specify auto mesh te tunnels");
l.add(null, "2 . <name:pl> name of prefix list");
l.add(null, "1 . upgrade-cli embed vrf name to router knob");
getRedistHelp(l, 0);
ipRtr rtr = getRouter();
if (rtr != null) {
Expand All @@ -1970,6 +1984,10 @@ public synchronized void doCfgStr(cmds cmd) {
if (neg) {
a = cmd.word();
}
if (a.equals("upgrade-cli")) {
embedVrf = !neg;
return;
}
if (a.equals("description")) {
description = cmd.getRemaining();
if (neg) {
Expand Down
25 changes: 22 additions & 3 deletions src/net/freertr/user/userConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,9 @@ private void getHelpGlobal(userHelping l) {
l.add(null, "5 . optional parameters allowed");
l.add(null, "1 2 router enable a routing protocol");
cfgRtr.getRouterList(l, 0, " to configure");
l.add(null, "3 . <num> process id");
l.add(null, "3 4,. <num> process id");
l.add(null, "4 5 vrf bind a vrf");
l.add(null, "5 . <name:vrf> vrf to bind to");
l.add(null, "1 2 chat-script build a chat script");
l.add(null, "2 . <name:cht> name of script");
l.add(null, "1 2 object-group build an object group");
Expand Down Expand Up @@ -1039,12 +1041,29 @@ private void doGlobal() {
cmd.error("invalid routing protocol");
return;
}
modeDconfig = cfgAll.rtrFind(o, bits.str2num(cmd.word()), true);
if (modeDconfig == null) {
cfgRtr rtr = cfgAll.rtrFind(o, bits.str2num(cmd.word()), true);
if (rtr == null) {
cmd.error("bad process number");
return;
}
modeDconfig = rtr;
cmds c = cmd.copyBytes(false);
modeV = modes.config;
if (!cmd.word().equals("vrf")) {
return;
}
a = c.getRemaining();
userHelping hlp = getHelping(false, true, true);
reader.setContext(hlp, "");
String b = hlp.repairLine(a);
if (b.length() < 1) {
pipe.linePut("bad: " + a);
modeV = modes.global;
reader.setContext(hlp, "");
return;
}
rtr.embedVrf = true;
executeCommand(c.getRemaining());
return;
}
if (a.equals("scheduler")) {
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v23.2.11-cur, done by cs@nop.
-;-;-;2023-02-11 05:18:29, took 00:09:10, with 80 workers, on 3186 cases, 0 failed, 0 traces, 0 retries
-;-;-;2023-02-11 11:13:02, took 00:09:16, with 80 workers, on 3186 cases, 0 failed, 0 traces, 1 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/basic01.tst;basic01.tst;success;dummy test
http://sources.freertr.org/cfg/basic02.tst;basic02.tst;success;interface with slot
Expand Down
3 changes: 3 additions & 0 deletions src/rtr.ftr
Original file line number Diff line number Diff line change
Expand Up @@ -3184,8 +3184,10 @@ qc pass: socks4 server
qc pass: socks5 server
qc pass: tacacs server
qc pass: udp forwarder server
todo: consider term caps
todo: router asdf vrf qwer, converted to current form
todo: interface lo0 as lo-core, persistently
todo: bgp to have xr-alike neighbor/template statements with upgrade-cli
todo: rework snmp to use sensors
todo: mpls inband performance measurement
todo: backup path support to the spf class
Expand All @@ -3211,6 +3213,7 @@ todo: ilnp (rfc6740)
todo: lisp4, lisp6
todo: l2vpn for isis
todo: hip (rfc4423)
todo: more upgrade-cli knobs
todo: more tabbables
todo: more show commands
todo: more clear commands
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v23.2.11-cur, done by cs@nop.<br/>
tested: 2023-02-11 05:18:29, took 00:09:10, with 80 workers, on 3186 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2023-02-11 11:13:02, took 00:09:16, with 80 workers, on 3186 cases, 0 failed, 0 traces, 1 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down
3 changes: 3 additions & 0 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
consider term caps
router asdf vrf qwer, converted to current form
interface lo0 as lo-core, persistently
bgp to have xr-alike neighbor/template statements with upgrade-cli
rework snmp to use sensors
mpls inband performance measurement
backup path support to the spf class
Expand All @@ -25,6 +27,7 @@ ilnp (rfc6740)
lisp4, lisp6
l2vpn for isis
hip (rfc4423)
more upgrade-cli knobs
more tabbables
more show commands
more clear commands
Expand Down

0 comments on commit 58d1022

Please sign in to comment.