diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7661ca6..1f7653f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,20 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 + rev: v4.3.0 hooks: - id: check-merge-conflict - - id: check-symlinks - id: debug-statements - id: end-of-file-fixer - id: no-commit-to-branch - args: [--branch, main] - id: trailing-whitespace + - repo: https://github.com/psf/black - rev: 19.3b0 + rev: 22.6.0 hooks: - id: black - args: [-l, "79"] + - repo: https://github.com/ansible-network/collection_prep - rev: 0.9.4 + rev: 1.0.0 hooks: - id: update-docs diff --git a/changelogs/fragments/fix-precommit-issues.yml b/changelogs/fragments/fix-precommit-issues.yml new file mode 100644 index 0000000..c78c23a --- /dev/null +++ b/changelogs/fragments/fix-precommit-issues.yml @@ -0,0 +1,4 @@ +--- +trivial: + - Bump pre-commit `black` version to match that used by `tox` + - Fix existing errors that pre-commit checks against by running `pre-commit run --all-files` diff --git a/test-requirements.txt b/test-requirements.txt index 8359fc5..f20ec70 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,9 @@ -black==22.3.0 ; python_version > '3.5' +black==22.6.0 +coverage==4.5.4 +git+https://github.com/ansible-community/pytest-ansible-units.git flake8 -mock -pexpect pytest-xdist yamllint -coverage==4.5.4 -git+https://github.com/ansible-community/pytest-ansible-units.git + +mock +pexpect diff --git a/tests/integration/target-prefixes.network b/tests/integration/target-prefixes.network index 0c45eba..2d0f40c 100644 --- a/tests/integration/target-prefixes.network +++ b/tests/integration/target-prefixes.network @@ -1 +1 @@ -vyos \ No newline at end of file +vyos diff --git a/tests/integration/targets/vyos_config/tests/cli/config.cfg b/tests/integration/targets/vyos_config/tests/cli/config.cfg index 36c98f1..b63703e 100644 --- a/tests/integration/targets/vyos_config/tests/cli/config.cfg +++ b/tests/integration/targets/vyos_config/tests/cli/config.cfg @@ -1,3 +1,2 @@ set service lldp set protocols static - diff --git a/tests/integration/targets/vyos_firewall_interfaces/1 b/tests/integration/targets/vyos_firewall_interfaces/1 index 70ae90f..628ada5 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/1 +++ b/tests/integration/targets/vyos_firewall_interfaces/1 @@ -1,120 +1,120 @@ --- merged: before: [] commands: - "set interfaces ethernet eth1 firewall in name 'INBOUND'" - "set interfaces ethernet eth1 firewall out name 'OUTBOUND'" - - "set interfaces ethernet eth1 firewall local name 'LOCAL'" + - "set interfaces ethernet eth1 firewall local name 'LOCAL'" - "set interfaces ethernet eth1 firewall local ipv6-name 'V6-LOCAL'" - "set interfaces ethernet eth3 firewall in name 'INBOUND'" - "set interfaces ethernet eth3 firewall out name 'OUTBOUND'" - - "set interfaces ethernet eth3 firewall local name 'LOCAL'" + - "set interfaces ethernet eth3 firewall local name 'LOCAL'" - "set interfaces ethernet eth3 firewall local ipv6-name 'V6-LOCAL'" after: - name: 'eth1' access_rules: - afi: 'ipv4' rules: - name: 'INBOUND' direction: 'in' - name: 'OUBOUND' direction: 'out' - afi: 'ipv6' rules: - name: 'V6-LOCAL' direction: 'local' populate: - name: 'eth1' access_rules: - afi: 'ipv4' rules: - name: 'INBOUND' direction: 'in' - name: 'OUBOUND' direction: 'out' - afi: 'ipv6' rules: - name: 'LOCAL' direction: 'local' replaced: commands: - "delete service lldp interface eth2 location" - "set service lldp interface eth2 'disable'" - "set service lldp interface eth2 location civic-based country-code 'US'" - "set service lldp interface eth2 location civic-based ca-type 0 ca-value 'ENGLISH'" - "delete service lldp interface eth1 location" - "set service lldp interface eth1 'disable'" - "set service lldp interface eth1 location coordinate-based latitude '33.524449N'" - "set service lldp interface eth1 location coordinate-based altitude '2200'" - "set service lldp interface eth1 location coordinate-based datum 'WGS84'" - "set service lldp interface eth1 location coordinate-based longitude '222.267255W'" after: - name: 'eth2' enable: false location: civic_based: country_code: 'US' ca_info: - ca_type: 0 ca_value: 'ENGLISH' - name: 'eth1' enable: false location: coordinate_based: altitude: 2200 datum: 'WGS84' longitude: '222.267255W' latitude: '33.524449N' populate_intf: - name: 'eth2' enable: false location: civic_based: country_code: 'US' ca_info: - ca_type: 0 ca_value: 'ENGLISH' overridden: commands: - "delete service lldp interface eth2 location" - "delete service lldp interface eth2 'disable'" - "set service lldp interface eth2 location elin '0000000911'" after: - name: 'eth2' location: elin: 0000000911 deleted: commands: - "delete service lldp interface eth1" - "delete service lldp interface eth2" after: [] round_trip: after: - name: 'eth1' location: civic_based: country_code: 'US' ca_info: - ca_type: 0 ca_value: 'ENGLISH' - name: 'eth2' location: coordinate_based: altitude: 2200 datum: 'WGS84' longitude: '222.267255W' latitude: '33.524449N' diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_parsed_config.cfg index 54696e8..48f286e 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_parsed_config.cfg +++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/_parsed_config.cfg @@ -1,10 +1,9 @@ set interfaces ethernet eth1 firewall in name 'INBOUND' set interfaces ethernet eth1 firewall out name 'OUTBOUND' set interfaces ethernet eth1 firewall local name 'LOCAL' set interfaces ethernet eth1 firewall local ipv6-name 'V6-LOCAL' set interfaces ethernet eth2 firewall in name 'INBOUND' set interfaces ethernet eth2 firewall out name 'OUTBOUND' set interfaces ethernet eth2 firewall local name 'LOCAL' set interfaces ethernet eth2 firewall local ipv6-name 'V6-LOCAL' set interfaces ethernet eth0 - diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_l3_interfaces/tests/cli/_parsed_config.cfg index ef070a7..9232a0a 100644 --- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/_parsed_config.cfg +++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/_parsed_config.cfg @@ -1,9 +1,7 @@ set interfaces ethernet eth1 address '192.0.2.10/24' set interfaces ethernet eth1 address '2001:db8::10/32' set interfaces ethernet eth1 hw-id '08:00:27:da:67:43' set interfaces ethernet eth2 address '198.51.100.10/24' set interfaces ethernet eth2 hw-id '08:00:27:d8:70:b0' set interfaces ethernet eth2 vif 101 address '198.51.100.130/25' set interfaces ethernet eth2 vif 101 address '2001:db8::20/32' - - diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg index ea3bfce..1a275bd 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg +++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg @@ -1,8 +1,8 @@ set interfaces bonding bond0 hash-policy 'layer2' set interfaces bonding bond0 mode 'active-backup' set interfaces bonding bond0 primary 'eth1' set interfaces bonding bond1 hash-policy 'layer2+3' set interfaces bonding bond1 mode 'active-backup' set interfaces bonding bond1 primary 'eth2' set interfaces ethernet eth1 bond-group 'bond0' -set interfaces ethernet eth2 bond-group 'bond1' \ No newline at end of file +set interfaces ethernet eth2 bond-group 'bond1' diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_parsed_config.cfg index 40c96c4..737449c 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_parsed_config.cfg +++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/_parsed_config.cfg @@ -1,6 +1,6 @@ set service lldp interface eth1 location civic-based ca-type 0 ca-value 'ENGLISH' set service lldp interface eth1 location civic-based country-code 'US' set service lldp interface eth2 location coordinate-based altitude '2200' set service lldp interface eth2 location coordinate-based datum 'WGS84' set service lldp interface eth2 location coordinate-based latitude '33.524449N' -set service lldp interface eth2 location coordinate-based longitude '222.267255W' \ No newline at end of file +set service lldp interface eth2 location coordinate-based longitude '222.267255W' diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg index 54696e8..48f286e 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg @@ -1,10 +1,9 @@ set interfaces ethernet eth1 firewall in name 'INBOUND' set interfaces ethernet eth1 firewall out name 'OUTBOUND' set interfaces ethernet eth1 firewall local name 'LOCAL' set interfaces ethernet eth1 firewall local ipv6-name 'V6-LOCAL' set interfaces ethernet eth2 firewall in name 'INBOUND' set interfaces ethernet eth2 firewall out name 'OUTBOUND' set interfaces ethernet eth2 firewall local name 'LOCAL' set interfaces ethernet eth2 firewall local ipv6-name 'V6-LOCAL' set interfaces ethernet eth0 - diff --git a/tests/integration/targets/vyos_prefix_lists/tests/cli/_parsed.cfg b/tests/integration/targets/vyos_prefix_lists/tests/cli/_parsed.cfg index 25744b3..0e508b3 100644 --- a/tests/integration/targets/vyos_prefix_lists/tests/cli/_parsed.cfg +++ b/tests/integration/targets/vyos_prefix_lists/tests/cli/_parsed.cfg @@ -1,18 +1,18 @@ set policy prefix-list AnsibleIPv4PrefixList description 'PL configured by ansible' set policy prefix-list AnsibleIPv4PrefixList rule 2 action 'permit' set policy prefix-list AnsibleIPv4PrefixList rule 2 description 'Rule 2 given by ansible' set policy prefix-list AnsibleIPv4PrefixList rule 2 le '32' set policy prefix-list AnsibleIPv4PrefixList rule 2 prefix '92.168.10.0/26' set policy prefix-list AnsibleIPv4PrefixList rule 3 action 'deny' set policy prefix-list AnsibleIPv4PrefixList rule 3 description 'Rule 3' set policy prefix-list AnsibleIPv4PrefixList rule 3 ge '26' set policy prefix-list AnsibleIPv4PrefixList rule 3 prefix '72.168.2.0/24' set policy prefix-list6 AllowIPv6Prefix description 'Configured by ansible for allowing IPv6 networks' set policy prefix-list6 AllowIPv6Prefix rule 5 action 'permit' set policy prefix-list6 AllowIPv6Prefix rule 5 description 'Permit rule' set policy prefix-list6 AllowIPv6Prefix rule 5 le '37' set policy prefix-list6 AllowIPv6Prefix rule 5 prefix '2001:db8:8000::/35' set policy prefix-list6 DenyIPv6Prefix description 'Configured by ansible for disallowing IPv6 networks' set policy prefix-list6 DenyIPv6Prefix rule 8 action 'deny' set policy prefix-list6 DenyIPv6Prefix rule 8 le '37' -set policy prefix-list6 DenyIPv6Prefix rule 8 prefix '2001:db8:2000::/35' \ No newline at end of file +set policy prefix-list6 DenyIPv6Prefix rule 8 prefix '2001:db8:2000::/35' diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/_parsed.cfg b/tests/integration/targets/vyos_route_maps/tests/cli/_parsed.cfg index a4aa4d3..affbd28 100644 --- a/tests/integration/targets/vyos_route_maps/tests/cli/_parsed.cfg +++ b/tests/integration/targets/vyos_route_maps/tests/cli/_parsed.cfg @@ -1,13 +1,13 @@ set policy route-map test1 rule 1 description test set policy route-map test1 rule 1 action permit set policy route-map test1 rule 1 continue 2 set policy route-map test3 rule 1 action permit set policy route-map test3 rule 1 set local-preference 4 set policy route-map test3 rule 1 set metric 5 set policy route-map test3 rule 1 set metric-type type-1 set policy route-map test3 rule 1 set origin egp set policy route-map test3 rule 1 set originator-id 192.0.2.34 set policy route-map test3 rule 1 set tag 5 set policy route-map test3 rule 1 set weight 4 set policy route-map test3 rule 1 match metric 1 -set policy route-map test3 rule 1 match peer 192.0.2.32 \ No newline at end of file +set policy route-map test3 rule 1 match peer 192.0.2.32 diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index d753480..496cf86 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1,12 +1,12 @@ plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip plugins/modules/vyos_route_maps.py import-2.6!skip plugins/modules/vyos_prefix_lists.py import-2.6!skip plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip plugins/modules/vyos_logging_global.py import-2.6!skip plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip \ No newline at end of file +plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index d753480..496cf86 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -1,12 +1,12 @@ plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip plugins/modules/vyos_route_maps.py import-2.6!skip plugins/modules/vyos_prefix_lists.py import-2.6!skip plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip plugins/modules/vyos_logging_global.py import-2.6!skip plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip \ No newline at end of file +plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 83e9150..59d08b5 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -1,26 +1,26 @@ plugins/modules/vyos_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/modules/vyos_l3_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_l3_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/modules/vyos_linkagg.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_linkagg.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/modules/vyos_static_route.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_static_route.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/modules/vyos_lldp.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_lldp.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/modules/vyos_lldp_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_lldp_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/modules/vyos_logging.py validate-modules:deprecation-mismatch # 2.9 expects METADATA plugins/modules/vyos_logging.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip plugins/modules/vyos_route_maps.py import-2.6!skip plugins/modules/vyos_prefix_lists.py import-2.6!skip plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip plugins/modules/vyos_logging_global.py import-2.6!skip plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip \ No newline at end of file +plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tests/unit/modules/network/vyos/fixtures/show_version b/tests/unit/modules/network/vyos/fixtures/show_version index a015d55..e546a14 100644 --- a/tests/unit/modules/network/vyos/fixtures/show_version +++ b/tests/unit/modules/network/vyos/fixtures/show_version @@ -1,14 +1,13 @@ Version: VyOS 1.1.7 Description: VyOS 1.1.7 (helium) Copyright: 2016 VyOS maintainers and contributors Built by: maintainers@vyos.net Built on: Wed Feb 17 09:57:31 UTC 2016 Build ID: 1602170957-4459750 System type: x86 64-bit Boot via: image Hypervisor: VMware HW model: VMware Virtual Platform HW S/N: VMware-42 3c 26 25 44 c5 0a 91-cf 2c 97 2b fe 9b 25 be HW UUID: 423C2625-44C5-0A91-CF2C-972BFE9B25BE Uptime: 01:08:20 up 52 days, 2:13, 1 user, load average: 0.00, 0.01, 0.05 - diff --git a/tests/unit/modules/network/vyos/fixtures/vyos_lldp_neighbor_config.cfg b/tests/unit/modules/network/vyos/fixtures/vyos_lldp_neighbor_config.cfg index 267958c..48e7c97 100644 --- a/tests/unit/modules/network/vyos/fixtures/vyos_lldp_neighbor_config.cfg +++ b/tests/unit/modules/network/vyos/fixtures/vyos_lldp_neighbor_config.cfg @@ -1,68 +1,68 @@ ------------------------------------------------------------------------------- LLDP neighbors: ------------------------------------------------------------------------------- Interface: eth1, via: LLDP, RID: 1, Time: 0 day, 00:30:34 - Chassis: + Chassis: ChassisID: mac 08:00:27:7c:85:05 SysName: vyos SysDescr: Vyatta Router running on VyOS 1.1.8 (helium) MgmtIP: 192.168.56.101 Capability: Bridge, off Capability: Router, on Capability: Wlan, off - Port: + Port: PortID: mac 08:00:27:04:85:99 PortDescr: eth0 PMD autoneg: supported: yes, enabled: yes Adv: 10Base-T, HD: yes, FD: yes Adv: 100Base-T, HD: yes, FD: yes Adv: 1000Base-T, HD: no, FD: yes MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode - LLDP-MED: + LLDP-MED: Device Type: Network Connectivity Device Capability: Capabilities Capability: Policy Capability: Location Capability: MDI/PSE Capability: MDI/PD Capability: Inventory - Inventory: + Inventory: Hardware Revision: 1.2 Software Revision: 3.13.11-1-586-vyos Firmware Revision: VirtualBox Serial Number: 0 Manufacturer: innotek GmbH Model: VirtualBox ------------------------------------------------------------------------------- Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:32:50 - Chassis: + Chassis: ChassisID: mac 08:00:27:7c:85:05 SysName: vyos SysDescr: Vyatta Router running on VyOS 1.1.8 (helium) MgmtIP: 192.168.56.101 Capability: Bridge, off Capability: Router, on Capability: Wlan, off - Port: + Port: PortID: mac 08:00:27:18:e6:f2 PortDescr: eth1 PMD autoneg: supported: yes, enabled: yes Adv: 10Base-T, HD: yes, FD: yes Adv: 100Base-T, HD: yes, FD: yes Adv: 1000Base-T, HD: no, FD: yes MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode - LLDP-MED: + LLDP-MED: Device Type: Network Connectivity Device Capability: Capabilities Capability: Policy Capability: Location Capability: MDI/PSE Capability: MDI/PD Capability: Inventory - Inventory: + Inventory: Hardware Revision: 1.2 Software Revision: 3.13.11-1-586-vyos Firmware Revision: VirtualBox Serial Number: 0 Manufacturer: innotek GmbH Model: VirtualBox diff --git a/tests/unit/modules/network/vyos/fixtures/vyos_ospfv3_config.cfg b/tests/unit/modules/network/vyos/fixtures/vyos_ospfv3_config.cfg index 060b9b3..8fe2809 100644 --- a/tests/unit/modules/network/vyos/fixtures/vyos_ospfv3_config.cfg +++ b/tests/unit/modules/network/vyos/fixtures/vyos_ospfv3_config.cfg @@ -1,6 +1,6 @@ set protocols ospfv3 area 12 export-list 'export1' set protocols ospfv3 area 12 import-list 'import1' set protocols ospfv3 area 12 range '2001:db11::/32' set protocols ospfv3 area 12 range '2001:db22::/32' set protocols ospfv3 area 12 range '2001:db33::/32' -set protocols ospfv3 area 13 range '2001:db44::/32' \ No newline at end of file +set protocols ospfv3 area 13 range '2001:db44::/32' diff --git a/tests/unit/modules/network/vyos/fixtures/vyos_route_maps_config.cfg b/tests/unit/modules/network/vyos/fixtures/vyos_route_maps_config.cfg index c7fd9ef..d115026 100644 --- a/tests/unit/modules/network/vyos/fixtures/vyos_route_maps_config.cfg +++ b/tests/unit/modules/network/vyos/fixtures/vyos_route_maps_config.cfg @@ -1,18 +1,18 @@ set policy route-map test3 rule 1 action 'permit' set policy route-map test3 rule 1 match interface 'eth2' set policy route-map test3 rule 1 match ipv6 nexthop 'fdda:5cc1:23:4::1f' set policy route-map test3 rule 1 match metric '1' set policy route-map test3 rule 1 match peer '1.1.1.2' set policy route-map test3 rule 1 match rpki 'invalid' set policy route-map test3 rule 1 set bgp-extcommunity-rt '22:11' set policy route-map test3 rule 1 set community 'internet' set policy route-map test3 rule 1 set ipv6-next-hop global 'fdda:5cc1:23:4::1f' set policy route-map test3 rule 1 set ip-next-hop '10.20.10.20' set policy route-map test3 rule 1 set local-preference '4' set policy route-map test3 rule 1 set metric '5' set policy route-map test3 rule 1 set metric-type 'type-1' set policy route-map test3 rule 1 set origin 'egp' set policy route-map test3 rule 1 set originator-id '10.0.2.3' set policy route-map test3 rule 1 set src '10.0.2.15' set policy route-map test3 rule 1 set tag '5' -set policy route-map test3 rule 1 set weight '4' \ No newline at end of file +set policy route-map test3 rule 1 set weight '4' diff --git a/tox.ini b/tox.ini index 49e9b1d..6bd8489 100644 --- a/tox.ini +++ b/tox.ini @@ -1,32 +1,32 @@ [tox] minversion = 1.4.2 envlist = linters skipsdist = True [testenv] deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:black] install_command = pip install {opts} {packages} commands = - black -v -l79 {toxinidir} + black --exclude '\.git|\.mypy_cache|\.tox|tests/output' {toxinidir} [testenv:linters] install_command = pip install {opts} {packages} commands = - black -v -l79 --diff --check {toxinidir} + black --exclude '\.git|\.mypy_cache|\.tox|tests/output' --check {toxinidir} flake8 {posargs} yamllint -s . [testenv:venv] commands = {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. show-source = True ignore = E123,E125,E402,W503,W504 max-line-length = 160 builtins = _ exclude = .git,.tox,tests/unit/compat/