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

Add feature for bonding/vlan interface in the firewall_interfaces #246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mlk-89
Copy link

@mlk-89 mlk-89 commented Mar 15, 2022

Add vlan interface in the firewall_interfaces
Add bonding interface in the firewall_interfaces

SUMMARY

When using name that contains a dot in the module vyos_firewall_interfaces , we consider this interface as a vlan interface, so this PR include modification on the facts gathering and config file.

Moreover, set the interface type as well when the name begins with bond.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/module_utils/network/vyos/config/firewall_interfaces/firewall_interfaces.py
plugins/module_utils/network/vyos/facts/firewall_interfaces/firewall_interfaces.py

ADDITIONAL INFORMATION

Fix this issue: #219

usage:
vyos.vyos.vyos_firewall_interfaces:
config:
- access_rules:
- afi: ipv4
rules:
- name: test1
direction: in
- name: test2
direction: local
name: eth1.10
- access_rules:
- afi: ipv4
rules:
- name: test1
direction: in
- name: test2
direction: local
name: bond0
- access_rules:
- afi: ipv4
rules:
- name: test1
direction: in
- name: test2
direction: local
name: bond0.113

- Add feature for vlan interface in the firewall_interfaces
@softwarefactory-project-zuul
Copy link

Unable to freeze job graph: Job network-ee-integration-tests-vyos depends on network-ee-build-container-image which was not run.

@mlk-89 mlk-89 changed the title - Add feature for bonding interface in the firewall_interfaces Add feature for bonding/vlan interface in the firewall_interfaces Mar 15, 2022
@GomathiselviS
Copy link
Contributor

@mlk-89 Thanks for working on this. Can you please add relevant test cases to test the fix and a change fragment to explain the fix briefly?

1 similar comment
@GomathiselviS
Copy link
Contributor

@mlk-89 Thanks for working on this. Can you please add relevant test cases to test the fix and a change fragment to explain the fix briefly?

@mlk-89
Copy link
Author

mlk-89 commented Mar 17, 2022

HI @GomathiselviS, yes sure I can write some tests, can you explain me how the testing environnment works?

Is there already a bonding interface that I can use? or should I create them from other tests?

@GomathiselviS
Copy link
Contributor

@mlk-89 You can add a test case to https://github.com/ansible-collections/vyos.vyos/blob/main/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py. The device connection is mocked in the unit tests. You can add a bonding interface config to https://github.com/ansible-collections/vyos.vyos/blob/main/tests/unit/modules/network/vyos/fixtures/vyos_firewall_interfaces_config.cfg and test. Please let me know if you have any queries.

@Qalthos Qalthos added the feature This issue/PR relates to a feature request. label Sep 2, 2022
@dmbaturin dmbaturin requested review from zdc and removed request for GomathiselviS August 12, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request.
Development

Successfully merging this pull request may close these issues.

3 participants