summaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)Author
2025-03-03T6829 (area interfaces in OSPFv3 1.3-1.5) re-init (#399)HEADmainomnom62
* T6829 re-init * re-init T6829 ospfv3 area interface for 1.3- * changelog * changelog fix * Doc is updated * adding 1.4+ support * ospfv3 area interfaces for 1.4+ * fixed ospfv3 facts and added area interface unit test for 1.4 * ospfv3 clean-up * doc updates
2025-03-03T6834 static_route module to support interface_route (#398)omnom62
* t6834 init * facts fixes, WIP * T6834 - facts updates * static_routes 1.3- config, facts, args and sanit and unit tests * changelog * changelog updates * static_routes 1.4+ * static_routes v1.4 unit tests * comment removed
2025-03-02T7012 ospf_interfaces integration tests (#387)omnom62
* T7012 init strucuture for ospf_interfaces integration tests * ospf_interfaces unit and integration tests fixes for 1.3- * fixes to v1.4 ospf_interfaces parsers * T7012 integration tests and 1.4+ support for ospf_interfaces
2025-02-13T7002 fw global integration fix (#379)omnom62
* T7002 fw_global integration tests fix init * adding 1.3 structure * v1.3- integration tests for fw_global * fixed integration tests for 1.3 and fw_global * D.R.Y. for firewall_global integration tests * changelog * config-trap is fixed for 1.4 * fw_global log mod fixed * firewall_gobal 1.4 integration and unit tests fixes * firewall_gobal unit tests fix * T7002 firewall_global integration tests fixed * clean-up work things * some updates from PR review * populate_commands for fw_global * D.R.Y fw_global integration tests * linter fw_global * linter * fragments for T7002 updated * linter
2025-02-07T7010: fix: integration tests add unit tests (#386)Gaige B Paulsen
fix: integration tests add unit tests
2025-02-07T7011: fix: lldp global integration (#385)Gaige B Paulsen
* T7011: fix: lldp global integration * T7011: Fix lldp interfaces integration
2025-01-27T7006: update to fix interface tests (#374)Gaige B Paulsen
* T7008: update to fix interface tests * T7006: fix: tests for interfaces * T7006: further work on interfaces * test: attempt to fix codecov on branch * test: unwind cli_config loops for 1.4 * fix: vif handling in replace,override,delete * fix: vif handling and docs
2025-01-25T6817 & T6825 & T7004 updates - fw_rules override and replaced fixes (#368)omnom62
* T6817 updates * updates / additions to unit tests and code for fw_rules (t6817) * code and use cases for override fw_rules * ovr idem unit test for fw rules v14 in WIP * Fixed replace add_rule func to remove unmatching confug - t6825 * first cut of unit tests for t6825 and t6817 - dfaft * Fixed replaced unit tests and code for inbound/outbound interface attributes * use network_cli's remove_empties * fixed disabled=True and a few unit tests in v1.3 * add_log func for firewall_rules updated * firewall_rules log attribute processing for v1.4 and idemp * + In overriden : - Added func to compare r_sets - Added code to isolate r_set changes to only targeted - Fixed parsers for packet_length_exclude - started to troubleshoot filter processing * completed fixes and unit tests for firewall_rules as in T6817 and T6825 * T7004 integration tests init fix * 'state' attrib processing fix * deleted and merged integration tests fixed for 1.3- and 1.4+ * fixed deleted, parsed, replaced integration tests for 1.3- and 1.4+ * fixed _remove_config, merged integration tests * added comments to unit tests * more v1.3- unit tests moved to 1.4+ unit test suite * 1.3/1.4 unit test suite synced * overridden integration test fixed * fixed replaced idempotency * moved data to vars (integration tests) * updated parsed (integration tests) * D.R.Y. for integration tests for firewall_rules plugin * vanilla data set for integration tests to support 1.5
2025-01-02T6988: fix: remove role/level, fix tests (#371)Gaige B Paulsen
* T6988: fix: remove role/level, fix tests * feature: add support for SSH keys * tests: add integration tests for public_keys * feat: add encrypted password support * tests: add unit for encrypted * tests: fix wrapping in YAML * tests: fix smoke tests
2024-12-30T6982: update SNMP module for 1.3+ (#369)Gaige B Paulsen
* fix: get SNMP integration tests running * fix: remove no_log from docs because it fails sanity * tests: fix unit tests and no_log args * tests: fix error in hostname integration test
2024-12-20VyOS v1.4 support for BGP (T6892 & T6888 & T6822) (#367)omnom62
* VyOS v1.4 support for BGP (T6892) * WIP: chnages to scanners and facts for BGP on v1.4 * scanners and facts modification to support as_numberless commands * remove optional regex groups * VyOS v1.4 BGP system-as functionality * bgp_af linter * bgp_global mods and testing * bgp_global v.1.4 support * linter fixes * bgp_global and bgp_af fixed 1.3 test cases * unit tests for bgp modules for both versions * obsolete stranzas removed from bgp_global for both versions * some typos removed * bgp_global rst updates * t6829 related draft changes * Draft changes to unit tests fot original set and t6888 updates * changelog * D.R.Y for bgp_global and testmodule names * linter fixes * fixtures for bgp_af options testts * stranzas options processing * T6888 bgp option test func and cases * clean-up draft code and update to rm_templates * v14 system-as change supported in conf and tests * T6822 BGP global passive bugfix * clean-up * T6829: update integration tests * T6829: fix integration tests for global * T6829: fix integration tests for bgp_global * T6829: fix for 1.4 AF integration tests * T6829: fix unit tests after removing obsolete items * T6829: fix sanity test failures * T6829: fix documentation * Lint and comments are addressed * rtt.yaml and fix to integration tests * updated fragments for bgp_global * lint fixes --------- Co-authored-by: Gaige B. Paulsen <gaige@cluetrust.com>
2024-12-17T6894: Fix failing NTP network-integration Tests (#366)Gaige B Paulsen
* tests: ntp: parsed * tests: ntp tests working with 1.3 * T6894 : test: update 1.4 tests for compatibility * fix: path replacement, docs, unit tests for 1.3-1.5 * T6894: fix: 1.4+ requires valid hostnames * fix: update tests to handle deletion * T6894: separate changelog * fix: final test fixes
2024-11-19T6832: VyOS v1.4+ chronyd conf support (#357)omnom62
* VyOS v1.4+ chronyd conf support * template typo fix * Making replace tool more robust by distinctive placeholder * allow-clients workaround * test for ntp_global and v1.4 * sanity and change log * sanity fix * updates to tests (dynamic >.pool) and docs * doc update 'system' > 'service'
2024-11-18Add feature for bonding/vlan interface in the firewall_interfaces (#246)maxime
* - Add feature for bonding interface in the firewall_interfaces - Add feature for vlan interface in the firewall_interfaces * fix a bug when invoking replaced in the module firewall_rules. * - Add feature for bonding interface in the firewall_interfaces - Add feature for vlan interface in the firewall_interfaces * test: add tests * fix: support for interface types * docs: fixed for 1.4 deprecation --------- Co-authored-by: Maxime.L <maxime@nfrance.com> Co-authored-by: Gaige B. Paulsen <gaige@cluetrust.com> Co-authored-by: Gaige B Paulsen <gaige@cluetrust.net>
2024-11-18T6882: fix: firewall global-options (#359)Gaige B Paulsen
* T6882: fix: firewall global-options Updated a couple of RST files due to pre-commit * T6882: chore: update changelog * T6882: chore: update changelog * T6882: test: update tests to cover change
2024-11-10T6815:Fix compatibility with 1.3-1.5 of VyOS (Step 1) (#352)Gaige B Paulsen
* omnibus update for 1.3-1.4 (with some support for 1.5) (see contents in release fragments) --------- Co-authored-by: Om Nom <omnom62@outlook.com>
2024-06-25`vyos.vyos` is no longer deprecated! 🎉 (#348)Nilashish Chakraborty
* Remove deprecation notice for vyos.vyos Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Add changelog Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * chore: auto fixes from pre-commit.com hooks --------- Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-06Fix prefix-lists Integration tests (#338)Vinay M
* Fix prefix-lists Integration tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove autoversion * fix galaxy.yml * sanity fix * sanity ignore * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix ignore file --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-27Update Unit Tests (#297)Kate Case
* Remove Python < 3.6 wrappers * Update imports
2023-02-08[pre-commit.ci] pre-commit autoupdate (#291)pre-commit-ci[bot]
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-07[command] run at least once when retries is 0 (#292)Kate Case
* [command] run at least once when retries is 0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-25Add prettier and isort to pre-commit. (#270)Kate Case
* Add prettier and isort to pre-commit. * Bump line-length to 100 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-13Remove deprecated modules and provider (#277)Kate Case
* Remove deprecated modules and provider * Remove tests for removed modules * Remove references to vyos_argument_spec
2022-09-02Fix `pre-commit` Issues (#223)Shawn Wilsher
* Fix `pre-commit` Issues This change fixes `.pre-commit-config.yaml` so that `main` no longer has errors on it. To accomplish that, two things had to be done: * Update the version of `black` that `pre-commit` uses to match what `tox` uses. * Run `pre-commit run --all-files` and commit the results Co-authored-by: Kate Case <this.is@katherineca.se>
2022-08-22Fix arguments-renamed errors (#268)Kate Case
2022-05-23Add support for icmpv6 type-name in firewall_rules (#258)GomathiselviS
Add support for icmpv6 type-name in firewall_rules Signed-off-by: GomathiselviS gomathiselvi@gmail.com SUMMARY Fixes #257 ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Sagar Paul <sagpaul@redhat.com>
2022-03-01Change parameter 'disabled' to 'disable' in test_vyos_firewall_rules.py (#240)GomathiselviS
Change parameter 'disabled' to 'disable' in test_vyos_firewall_rules.py SUMMARY Fixes #239 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: Sagar Paul <sagpaul@redhat.com> Reviewed-by: GomathiselviS <None> Reviewed-by: Rohit Thakur <rohitthakur2590@outlook.com> Reviewed-by: None <None>
2022-02-25firewall_rules: Fix incorrect behavior when IPv4 and IPv6 rule sets have the ↵Andrew Gunnerson
same name (#236) firewall_rules: Fix incorrect behavior when IPv4 and IPv6 rule sets have the same name SUMMARY VyOS supports IPv4 and IPv6 rule sets having the same name, but there are a couple places in the Ansible module that don't handle this situation. The fact gathering for ansible_network_resources.firewall_rules has been updated to look for name <name> or ipv6-name <name> instead of just <name>. The vyos_firewall_rules module has been updated to take the afi into consideration when comparing the have and want states. V4-EGRESS and V6-EGRESS have been renamed to just EGRESS in the tests. The existing tests seem to be complete enough to test this same-name situation. (V4-INGRESS and V6-INGRESS were not renamed.) ISSUE TYPE Bugfix Pull Request COMPONENT NAME vyos_facts and vyos_firewall_rules ADDITIONAL INFORMATION An example of a configuration that was originally causing an issue: (Click to expand): name wan-lan { default-action drop rule 1 { action accept state { established enable related enable } } rule 2 { action drop log enable state { invalid enable } } } ipv6-name wan-lan { default-action drop rule 1 { action accept state { established enable related enable } } rule 2 { action drop log enable state { invalid enable } } rule 10 { action accept protocol icmpv6 } } With this configuration, ansible_network_resources.firewall_rules would show the icmpv6 rule under both ipv4 and ipv6: (Click to expand): [ { "afi": "ipv4", "rule_sets": [ { "default_action": "drop", "name": "wan-lan", "rules": [ { "action": "accept", "number": 1, "state": { "established": true, "related": true } }, { "action": "drop", "number": 2, "state": { "invalid": true } }, { "action": "accept", "number": 10, "protocol": "icmpv6" } ] }, ] }, { "afi": "ipv6", "rule_sets": [ { "default_action": "drop", "name": "wan-lan", "rules": [ { "action": "accept", "number": 1, "state": { "established": true, "related": true } }, { "action": "drop", "number": 2, "state": { "invalid": true } }, { "action": "accept", "number": 10, "protocol": "icmpv6" } ] }, ] } ] A similar issue would happen when using vyos_firewall_rules as well, where it would attempt to change rules for the wrong afi. Reviewed-by: GomathiselviS <None> Reviewed-by: None <None>
2022-02-22vyos_firewall_rules: Add support for log enable on individual rules (#238)GomathiselviS
vyos_firewall_rules: Add support for log enable on individual rules SUMMARY ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Rohit Thakur <rohitthakur2590@outlook.com> Reviewed-by: None <None>
2022-02-17Add Vyos hostname resource module (#237)GomathiselviS
Add Vyos hostname resource module SUMMARY ISSUE TYPE New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: None <None>
2022-02-01Vyos snmp_server Resource Module (#227)GomathiselviS
Vyos snmp_server Resource Module SUMMARY Added vyos_snmp_server resource module ISSUE TYPE New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: Ashwini Mhatre <mashu97@gmail.com> Reviewed-by: None <None>
2022-01-19Enable configuring ntp server pool in ntp_global (#225)GomathiselviS
Enable configuring ntp server pool in ntp_global Signed-off-by: GomathiselviS gomathiselvi@gmail.com SUMMARY Fixes #221 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Shawn Wilsher <None> Reviewed-by: None <None>
2021-12-08tests: remove unintended .swp file (#218)David Moreau Simard
tests: remove unintended .swp file SUMMARY Depends-On: #220 .swp files are VI temporary files and it was likely not intended to be added to the repository. ISSUE TYPE Bugfix Pull Request COMPONENT NAME tests Reviewed-by: GomathiselviS <None> Reviewed-by: None <None>
2021-10-02Add vyos_ntp resource module (#175)YVarshitha
Add vyos_ntp resource module SUMMARY Resource module vyos_ntp ISSUE TYPE New Module Pull Request COMPONENT NAME vyos_ntp ADDITIONAL INFORMATION Reviewed-by: GomathiselviS <None> Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: None <None>
2021-09-20Add support for IPv6 `address_group` and `network_group` (#202)Shawn Wilsher
Add support for IPv6 `address_group` and `network_group` SUMMARY This adds support for ipv6 in network and address groups by adding an afi parameter, but defaulting it to ipv4 for backwards compatibility. Fixes #137. ISSUE TYPE Feature Pull Request COMPONENT NAME vyos_firewall_global Reviewed-by: GomathiselviS <None> Reviewed-by: Shawn Wilsher <None> Reviewed-by: None <None>
2021-09-20Fix `vyos.vyos.vyos_firewall_rules` `state: replaced` to match documentation ↵Shawn Wilsher
(#203) Fix `vyos.vyos.vyos_firewall_rules` `state: replaced` to match documentation SUMMARY vyos.vyos.vyos_firewall_rules should only try to change listed firewall rules, as documented, when the state is set to replaced. As currently implemented (prior to this PR), it better matches what overridden is meant to do. Fixes #201 ISSUE TYPE Bugfix Pull Request COMPONENT NAME vyos.vyos.vyos_firewall_rules ADDITIONAL INFORMATION Cleanup and document existing code for clarity Add a failing idempotent test Add a failing change test Fix failing tests Add change fragment Reviewed-by: GomathiselviS <None> Reviewed-by: Shawn Wilsher <None> Reviewed-by: None <None>
2021-08-27IPV6 ICMP type name in vyos.vyos.vyos_firewall_rules is not idempotent (#187)YVarshitha
IPV6 ICMP type name in vyos.vyos.vyos_firewall_rules is not idempotent SUMMARY fix issue: #170 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: GomathiselviS <None> Reviewed-by: None <None>
2021-08-26Fix pylint sanity issues (#204)GomathiselviS
Fix pylint sanity issues Signed-off-by: GomathiselviS gomathiselvi@gmail.com SUMMARY ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: None <None>
2021-07-24vyos logging_global resource module (#177)Sagar Paul
vyos logging_global resource module SUMMARY Logging resource module vyos_logging_global ISSUE TYPE New Module Pull Request COMPONENT NAME vyos_logging_global Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
2021-07-05VyOS Prefix Lists Resource Module Added (#178)Priyam Sahoo
VyOS Prefix Lists Resource Module Added SUMMARY PR for vyos_prefix_lists rm resolves: #99 ISSUE TYPE New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Rohit Thakur <rohitthakur2590@outlook.com> Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: Priyam Sahoo <None>
2021-06-22static route fixes (#165)Björn Hemfjäll
static route fixes Reviewed-by: https://github.com/apps/ansible-zuul
2021-06-14Fix keyerror in firewall_rules when state=overridden (#172)GomathiselviS
Fix keyerror in firewall_rules when state=overridden Reviewed-by: https://github.com/apps/ansible-zuul
2021-05-17linters fix (#160)GomathiselviS
Replace admin_distance with distance while generating static_routes nexthop command Reviewed-by: https://github.com/apps/ansible-zuul
2021-05-11Vyos route maps (#156)Ashwini Mhatre
Vyos route maps Reviewed-by: https://github.com/apps/ansible-zuul
2021-04-29[firewall_global] port-groups are not added (#143)Shawn Wilsher
[firewall_global] port-groups are not added Reviewed-by: https://github.com/apps/ansible-zuul
2021-04-28VyOS: available_network_resources implemented in vyos_facts (#148)Rohit Thakur
VyOS: available_network_resources implemented in vyos_facts Reviewed-by: https://github.com/apps/ansible-zuul
2021-03-31Get `ansible-test` further along (#142)Shawn Wilsher
Get `ansible-test` further along Reviewed-by: https://github.com/apps/ansible-zuul
2021-03-30Add support for wireguard interface (#135)GomathiselviS
Add support for wireguard interface Reviewed-by: https://github.com/apps/ansible-zuul
2021-03-27Add vyos_bgp_address_family resource module. (#132)GomathiselviS
Add vyos_bgp_address_family resource module. Reviewed-by: https://github.com/apps/ansible-zuul
2021-02-24Add vyos_bgp_global resource module (#125)GomathiselviS
Add vyos_bgp_global resource module Reviewed-by: https://github.com/apps/ansible-zuul