Support for additional API paths (#125)

* adding api path interface pppoe-client

Signed-off-by: Tomas Herfert <herfik>

* support for api path interface vlan

Signed-off-by: Tomas Herfert <herfik>

* support for api path interface bridge vlan

Signed-off-by: Tomas Herfert <herfik>

* PR ID update

Signed-off-by: Tomas Herfert <herfik>

* typo fix

Signed-off-by: Tomas Herfert <herfik>

* support for API path interface bridge and update of interface bridge port ingress-filtering to True

Signed-off-by: Tomas Herfert <herfik>

* Apply suggestion per code review

Signed-off-by: Tomas Herfert <herfik>

* Update changelogs/fragments/125-api.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Signed-off-by: Tomas Herfert <herfik>
Co-authored-by: Tomas Herfert <herfik>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Tomas Herfert 2022-11-12 16:08:25 +01:00 committed by GitHub
parent 9567bbf292
commit ad9d7c3829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 77 additions and 4 deletions

View file

@ -79,25 +79,29 @@ def join_path(path):
PATHS = {
('interface', 'bridge'): APIData(
# fully_understood=True,
fully_understood=True,
primary_keys=('name', ),
fields={
'admin-mac': KeyInfo(),
'admin-mac': KeyInfo(default=''),
'ageing-time': KeyInfo(default='5m'),
'arp': KeyInfo(default='enabled'),
'arp-timeout': KeyInfo(default='auto'),
'auto-mac': KeyInfo(default=False),
'auto-mac': KeyInfo(default=True),
'comment': KeyInfo(can_disable=True, remove_value=''),
'dhcp-snooping': KeyInfo(default=False),
'disabled': KeyInfo(default=False),
'ether-type': KeyInfo(default='0x8100'),
'fast-forward': KeyInfo(default=True),
'frame-types': KeyInfo(default='admit-all'),
'forward-delay': KeyInfo(default='15s'),
'igmp-snooping': KeyInfo(default=False),
'ingress-filtering': KeyInfo(default=True),
'max-message-age': KeyInfo(default='20s'),
'mtu': KeyInfo(default='auto'),
'name': KeyInfo(),
'priority': KeyInfo(default='0x8000'),
'protocol-mode': KeyInfo(default='rstp'),
'pvid': KeyInfo(default=1),
'transmit-hold-count': KeyInfo(default=6),
'vlan-filtering': KeyInfo(default=False),
},
@ -173,6 +177,49 @@ PATHS = {
'use-peer-dns': KeyInfo(),
},
),
('interface', 'pppoe-client'): APIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'ac-name': KeyInfo(default=''),
'add-default-route': KeyInfo(default=False),
'allow': KeyInfo(default='pap,chap,mschap1,mschap2'),
'comment': KeyInfo(can_disable=True, remove_value=''),
'default-route-distance': KeyInfo(default=1),
'dial-on-demand': KeyInfo(default=False),
'disabled': KeyInfo(default=True),
'host-uniq': KeyInfo(can_disable=True),
'interface': KeyInfo(required=True),
'keepalive-timeout': KeyInfo(default=10),
'max-mru': KeyInfo(default='auto'),
'max-mtu': KeyInfo(default='auto'),
'mrru': KeyInfo(default='disabled'),
'name': KeyInfo(),
'password': KeyInfo(default=''),
'profile': KeyInfo(default='default'),
'service-name': KeyInfo(default=''),
'use-peer-dns': KeyInfo(default=False),
'user': KeyInfo(default=''),
},
),
('interface', 'vlan'): APIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'arp': KeyInfo(default='enabled'),
'arp-timeout': KeyInfo(default='auto'),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interface': KeyInfo(required=True),
'loop-protect': KeyInfo(default='default'),
'loop-protect-disable-time': KeyInfo(default='5m'),
'loop-protect-send-interval': KeyInfo(default='5s'),
'mtu': KeyInfo(default=1500),
'name': KeyInfo(),
'use-service-tag': KeyInfo(default=False),
'vlan-id': KeyInfo(required=True),
},
),
('interface', 'wireless', 'security-profiles'): APIData(
unknown_mechanism=True,
# primary_keys=('default', ),
@ -486,7 +533,7 @@ PATHS = {
'frame-types': KeyInfo(default='admit-all'),
'horizon': KeyInfo(default='none'),
'hw': KeyInfo(default=True),
'ingress-filtering': KeyInfo(default=False),
'ingress-filtering': KeyInfo(default=True),
'interface': KeyInfo(),
'internal-path-cost': KeyInfo(default=10),
'learn': KeyInfo(default='auto'),
@ -531,6 +578,18 @@ PATHS = {
'use-ip-firewall-for-vlan': KeyInfo(default=False),
},
),
('interface', 'bridge', 'vlan'): APIData(
fully_understood=True,
primary_keys=('bridge', 'vlan-ids', ),
fields={
'bridge': KeyInfo(),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'tagged': KeyInfo(default=''),
'untagged': KeyInfo(default=''),
'vlan-ids': KeyInfo(),
},
),
('ip', 'firewall', 'connection', 'tracking'): APIData(
single_value=True,
fully_understood=True,