Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ip vrf for router OS v7 #259

Merged
merged 11 commits into from
Feb 17, 2024
3 changes: 3 additions & 0 deletions changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- api_data - add support for the ``ip vrf`` path in RouterOS 7 and add support new primary_keys ``routing-mark`` for RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259)
liquorice-head marked this conversation as resolved.
Show resolved Hide resolved
- api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259)
felixfontein marked this conversation as resolved.
Show resolved Hide resolved
36 changes: 26 additions & 10 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,17 +727,33 @@ def join_path(path):
},
),
),
('ip', 'vrf'): APIData(
felixfontein marked this conversation as resolved.
Show resolved Hide resolved
versioned=[
('7', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interfaces': KeyInfo(),
'name': KeyInfo(),
},
)),
]
),
('ip', 'route', 'vrf'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
primary_keys=('routing-mark', ),
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interfaces': KeyInfo(),
'routing-mark': KeyInfo(),
},
),
versioned=[
('7', '<', VersionedAPIData(
fully_understood=True,
primary_keys=('routing-mark', ),
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interfaces': KeyInfo(),
'routing-mark': KeyInfo(),
},
)),
],
),
('ip', 'dhcp-server'): APIData(
unversioned=VersionedAPIData(
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
- ip traffic-flow target
- ip upnp
- ip upnp interfaces
- ip vrf
- ipv6 address
- ipv6 dhcp-client
- ipv6 dhcp-server
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
- ip traffic-flow target
- ip upnp
- ip upnp interfaces
- ip vrf
- ipv6 address
- ipv6 dhcp-client
- ipv6 dhcp-server
Expand Down
Loading