From 38ae3032180a3d49253237232a0e3de8d2836e7c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 29 Sep 2020 20:43:08 +0200 Subject: pppoe-server: T2936: move to get_config_dict() For easier configuration read in (CLI) validation and also template rendering it makes sense to drop the old, single implementation and move to the new, generic get_config_dict() approach. Recurring configuration parts like ip-pool, ipv6-pool and nameservers have also been split our into individual templates which will be included through Jinja2 - leading to a single-source of the template sections, too. --- .../include/accel-auth-mode.xml.i | 1 + .../include/accel-radius-additions.xml.i | 8 ++++- interface-definitions/include/radius-server.xml.i | 1 + interface-definitions/service_pppoe-server.xml.in | 37 ++++++++++++++++------ 4 files changed, 37 insertions(+), 10 deletions(-) (limited to 'interface-definitions') diff --git a/interface-definitions/include/accel-auth-mode.xml.i b/interface-definitions/include/accel-auth-mode.xml.i index e719112db..750c3117b 100644 --- a/interface-definitions/include/accel-auth-mode.xml.i +++ b/interface-definitions/include/accel-auth-mode.xml.i @@ -16,4 +16,5 @@ local radius + local diff --git a/interface-definitions/include/accel-radius-additions.xml.i b/interface-definitions/include/accel-radius-additions.xml.i index f4db51b97..43810625a 100644 --- a/interface-definitions/include/accel-radius-additions.xml.i +++ b/interface-definitions/include/accel-radius-additions.xml.i @@ -26,6 +26,7 @@ + 1813 @@ -39,6 +40,7 @@ Fail time must be between 0 and 600 seconds + 0 @@ -54,6 +56,7 @@ Timeout must be between 1 and 60 seconds + 3 @@ -67,6 +70,7 @@ Timeout must be between 0 and 60 seconds + 3 @@ -80,6 +84,7 @@ Maximum tries must be between 1 and 20 + 3 @@ -123,7 +128,7 @@ - Port for Dynamic Authorization Extension server (DM/CoA) + Port for Dynamic Authorization Extension server (DM/CoA) (default: 1700) number TCP port @@ -132,6 +137,7 @@ + 1700 diff --git a/interface-definitions/include/radius-server.xml.i b/interface-definitions/include/radius-server.xml.i index 047728233..7c2ddff80 100644 --- a/interface-definitions/include/radius-server.xml.i +++ b/interface-definitions/include/radius-server.xml.i @@ -49,6 +49,7 @@ + 1812 diff --git a/interface-definitions/service_pppoe-server.xml.in b/interface-definitions/service_pppoe-server.xml.in index eaaac0d4c..b38f692d8 100644 --- a/interface-definitions/service_pppoe-server.xml.in +++ b/interface-definitions/service_pppoe-server.xml.in @@ -29,12 +29,13 @@ access-concentrator name limited to alphanumerical characters only (max. 100) + vyos-ac control sessions count - (deny|disable) + ^(deny|disable|replace)$ Invalid value @@ -45,10 +46,15 @@ deny Deny second session authorization + + replace + Terminate first session when second is authorized + - deny disable + deny disable replace + replace @@ -68,6 +74,7 @@ Option to disable a PPPoE Server user + @@ -79,6 +86,7 @@ Static client IP address + * @@ -182,7 +190,7 @@ pap chap mschap mschap-v2 - + @@ -234,10 +242,10 @@ VLAN monitor for the automatic creation of vlans (user per vlan) - - - VLAN ID needs to be between 1 and 4096 - + + + VLAN ID needs to be between 1 and 4096 + @@ -246,7 +254,7 @@ (409[0-6]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{0,2})-(409[0-6]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{0,2}) - + @@ -263,9 +271,10 @@ Maximum Transmission Unit (MTU) - default 1492 - + + 1492 @@ -353,6 +362,7 @@ ^(deny|prefer|require)$ + prefer @@ -361,6 +371,7 @@ + 30 @@ -369,6 +380,7 @@ + 3 @@ -377,6 +389,7 @@ + 0 @@ -437,6 +450,9 @@ Fixed or random interface identifier for IPv6 + + random + random Random interface identifier for IPv6 @@ -450,6 +466,9 @@ Peer interface identifier for IPv6 + + random calling-sid ipv4 + x:x:x:x Interface identifier for IPv6 -- cgit v1.2.3