Add RouterOS 7.x support to '/mpls ldp' path (#271)

* Added RouterOS 7.x support to '/mpls ldp' path

* Updated /mpls ldp path
- Reordered fields to match CLI
- Set 'vrf' field as primary key
- Fixed distribute-for-default field
- Added missing fields from RouterOS 7.x

* Add changelog fragment
This commit is contained in:
samburney 2024-04-18 06:58:40 +09:30 committed by GitHub
parent 99581a00f7
commit 59f6591621
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 14 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- api_info, api_modify - Add RouterOS 7.x support to ``/mpls ldp`` path (https://github.com/ansible-collections/community.routeros/pull/271).

View file

@ -3602,20 +3602,40 @@ PATHS = {
), ),
), ),
('mpls', 'ldp'): APIData( ('mpls', 'ldp'): APIData(
unversioned=VersionedAPIData( versioned=[
single_value=True, ('7.1', '>=', VersionedAPIData(
fully_understood=True, fully_understood=True,
fields={ primary_keys=('vrf', ),
'distribute-for-default-route': KeyInfo(default=False), fields={
'enabled': KeyInfo(default=False), 'afi': KeyInfo(can_disable=True),
'hop-limit': KeyInfo(default=255), 'distribute-for-default': KeyInfo(can_disable=True),
'loop-detect': KeyInfo(default=False), 'path-vector-limit': KeyInfo(can_disable=True),
'lsr-id': KeyInfo(default='0.0.0.0'), 'vrf': KeyInfo(),
'path-vector-limit': KeyInfo(default=255), 'comment': KeyInfo(can_disable=True, remove_value=''),
'transport-address': KeyInfo(default='0.0.0.0'), 'hop-limit': KeyInfo(can_disable=True),
'use-explicit-null': KeyInfo(default=False), 'preferred-afi': KeyInfo(can_disable=True),
}, 'loop-detect': KeyInfo(can_disable=True),
), 'transport-addresses': KeyInfo(can_disable=True),
'disabled': KeyInfo(default=False),
'lsr-id': KeyInfo(can_disable=True),
'use-explicit-null': KeyInfo(can_disable=True),
},
)),
('7.1', '<', VersionedAPIData(
single_value=True,
fully_understood=True,
fields={
'distribute-for-default-route': KeyInfo(default=False),
'enabled': KeyInfo(default=False),
'hop-limit': KeyInfo(default=255),
'loop-detect': KeyInfo(default=False),
'lsr-id': KeyInfo(default='0.0.0.0'),
'path-vector-limit': KeyInfo(default=255),
'transport-address': KeyInfo(default='0.0.0.0'),
'use-explicit-null': KeyInfo(default=False),
},
)),
],
), ),
('port', 'firmware'): APIData( ('port', 'firmware'): APIData(
unversioned=VersionedAPIData( unversioned=VersionedAPIData(