Skip to content

Commit

Permalink
Change ip vrf for router OS v7 (ansible-collections#259)
Browse files Browse the repository at this point in the history
* Update api_info.py

* Update api_modify.py

* Update _api_data.py

* Update _api_data.py

* Update _api_data.py

* Update api_info.py

* Update api_modify.py

* Update api_info.py

* Update api_modify.py

* Create 259-add-routeros7-support-for-ip-vrf.yml

* Update changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
2 people authored and samburney committed Mar 30, 2024
1 parent 99dc591 commit 7774e27
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
2 changes: 2 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,2 @@
minor_changes:
- api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259)
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(
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 @@ -148,6 +148,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 @@ -157,6 +157,7 @@
- ip traffic-flow target
- ip upnp
- ip upnp interfaces
- ip vrf
- ipv6 address
- ipv6 dhcp-client
- ipv6 dhcp-server
Expand Down

0 comments on commit 7774e27

Please sign in to comment.