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

Conversation

liquorice-head
Copy link
Contributor

@liquorice-head liquorice-head commented Feb 6, 2024

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
In router OS 7, the path to vrf and the fields used have changed
tested on v7.13.3

Copy link

github-actions bot commented Feb 6, 2024

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and the docs are now incorporated into main:
https://ansible-collections.github.io/community.routeros/branch/main

fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interfaces': KeyInfo(),
'routing-mark': KeyInfo(),
'name': KeyInfo(),
'numbers': KeyInfo(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numbers does not seem to exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-02-06 at 15 00 26 in ip vrf set there is such an entry

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you are using the set command it is there for choosing on which items you want to change attributes. This is for editing entries. Some of those options here are not actual attributes. The same for firewall rules even when using the add command - you will have a place-before parameter which is not a parameter of such a firewall rule but only for internal processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. I've made the change.

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Below a first comment from my side. Please note that you need to add a changelog fragment, but it might be easier to wait a bit until it's clear how this PR will look before adding it :)

plugins/module_utils/_api_data.py Show resolved Hide resolved
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (542a362) 82.97% compared to head (05d64c6) 82.97%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #259   +/-   ##
=======================================
  Coverage   82.97%   82.97%           
=======================================
  Files          32       32           
  Lines        4046     4046           
  Branches      871      871           
=======================================
  Hits         3357     3357           
  Misses        506      506           
  Partials      183      183           
Flag Coverage Δ
integration 66.86% <ø> (ø)
sanity 22.10% <ø> (ø)
units 82.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ialshaev
Copy link

ialshaev commented Feb 6, 2024

@felixfontein is it possible to have both versions for vrf path? So we can decide what path to chose depending on RouterOS version.
Thank you in advance!

@felixfontein
Copy link
Collaborator

@ialshaev yes, simply keep the old path and add a new one. Using versioning you should be able to say that the old one only works before version x.y, and the new one only with version x.y and newer.

@liquorice-head
Copy link
Contributor Author

Added versioning. Pls review

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks almost good now, see my comment below! Please don't forget the changelog fragment :)

@@ -136,6 +136,7 @@
- ip proxy
- ip route
- ip route vrf
- ip vrf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be moved to the right position (lexicographically sorted), i.e. after ip upnp interfaces. Same in the other file.

@liquorice-head
Copy link
Contributor Author

Done. Please review

Copy link
Contributor

@derdeagle derdeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@felixfontein felixfontein merged commit 10fbc56 into ansible-collections:main Feb 17, 2024
45 checks passed
@felixfontein
Copy link
Collaborator

@liquorice-head thanks for implementing this!
@derdeagle thanks for reviewing this!

@derdeagle
Copy link
Contributor

Always a pleasure ;)

samburney pushed a commit to samburney/community.routeros that referenced this pull request Mar 30, 2024
* 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]>
samburney pushed a commit to samburney/community.routeros that referenced this pull request Mar 30, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants