Add support for additional '/mpls' paths (#272)

* Add support for additional '/mpls' paths
- Enable '/mpls interface' for use in api_info/api_modify and update fields.
- Add '/mpls ldp accept-filter' path.
- Add '/mpls ldp advertise-filter' path.
- Add '/mpls ldp interface' path.

* Add changelogs/fragments/272-additional_mpls_path_support.yml

* Fixed new paths in api_info.py and api_modify.py

* Remove dot.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
samburney 2024-04-18 15:25:57 +09:30 committed by GitHub
parent 78d2fdd0f2
commit 6fde8f3baf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 56 additions and 5 deletions

View file

@ -3613,13 +3613,13 @@ PATHS = {
),
('mpls', 'interface'): APIData(
unversioned=VersionedAPIData(
unknown_mechanism=True,
# primary_keys=('default', ),
fully_understood=True,
fields={
'default': KeyInfo(),
'disabled': KeyInfo(),
'interface': KeyInfo(),
'disabled': KeyInfo(default=False),
'comment': KeyInfo(can_disable=True, remove_value=''),
'interface': KeyInfo(required=True),
'mpls-mtu': KeyInfo(),
'info': KeyInfo(can_disable=True),
},
),
),
@ -3659,6 +3659,47 @@ PATHS = {
)),
],
),
('mpls', 'ldp', 'accept-filter'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
fields={
'accept': KeyInfo(can_disable=True),
'disabled': KeyInfo(default=False),
'comment': KeyInfo(can_disable=True, remove_value=''),
'neighbor': KeyInfo(can_disable=True),
'prefix': KeyInfo(can_disable=True),
'vrf': KeyInfo(can_disable=True),
},
),
),
('mpls', 'ldp', 'advertise-filter'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
fields={
'advertise': KeyInfo(default=''),
'disabled': KeyInfo(default=False),
'comment': KeyInfo(can_disable=True, remove_value=''),
'neighbor': KeyInfo(),
'prefix': KeyInfo(),
'vrf': KeyInfo(),
},
),
),
('mpls', 'ldp', 'interface'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
fields={
'disabled': KeyInfo(default=False),
'comment': KeyInfo(can_disable=True, remove_value=''),
'accept-dynamic-neighbors': KeyInfo(can_disable=True),
'afi': KeyInfo(can_disable=True),
'hello-interval': KeyInfo(can_disable=True),
'hold-time': KeyInfo(can_disable=True),
'interface': KeyInfo(required=True),
'transport-addresses': KeyInfo(can_disable=True),
},
),
),
('port', 'firmware'): APIData(
unversioned=VersionedAPIData(
single_value=True,