diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 642de80..7262a87 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -12,10 +12,10 @@ jobs: with: path: ansible_collections/mellanox/onyx - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.6 + python-version: 3.8 - name: Install ansible-base (devel) run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check @@ -24,7 +24,7 @@ jobs: run: ansible-galaxy collection install ansible.netcommon -p ../../ - name: Run sanity tests - run: ansible-test sanity --docker -v --color --python 3.6 + run: ansible-test sanity --docker -v --color --python 3.8 units: runs-on: ubuntu-latest @@ -34,10 +34,10 @@ jobs: with: path: ansible_collections/mellanox/onyx - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.6 + python-version: 3.8 - name: Install ansible-base (devel) run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check @@ -46,7 +46,7 @@ jobs: run: ansible-galaxy collection install ansible.netcommon -p ../../ - name: Run unit tests - run: ansible-test units --docker -v --color --python 3.6 --coverage + run: ansible-test units --docker -v --color --python 3.8 --coverage - name: Generate coverage report. run: ansible-test coverage xml -v --requirements --group-by command --group-by version diff --git a/changelogs/fragments/0-copy_ignore_txt.yml b/changelogs/fragments/0-copy_ignore_txt.yml new file mode 100644 index 0000000..ec804d2 --- /dev/null +++ b/changelogs/fragments/0-copy_ignore_txt.yml @@ -0,0 +1,3 @@ +--- +trivial: + - Copy ignore.txt. diff --git a/plugins/cliconf/onyx.py b/plugins/cliconf/onyx.py index b5a66b1..0e7df54 100644 --- a/plugins/cliconf/onyx.py +++ b/plugins/cliconf/onyx.py @@ -59,7 +59,7 @@ def get_device_info(self): return device_info @enable_mode - def get_config(self, source='running', format='text', flags=None): + def get_config(self, source='running', flags=None, format='text'): if source not in ('running',): return self.invalid_params("fetching configuration from %s is not supported" % source) cmd = 'show running-config' diff --git a/plugins/modules/onyx_wjh.py b/plugins/modules/onyx_wjh.py index bf97884..3db5d20 100644 --- a/plugins/modules/onyx_wjh.py +++ b/plugins/modules/onyx_wjh.py @@ -178,8 +178,7 @@ def wjh_group_status(self, current_config, group_value, suffix=''): current_enabled = False if group_value == 'all': # no disabled group so all would be false - current_enabled = not all([ - (group + suffix) in current_config for group in self.WJH_GROUPS]) + current_enabled = not all((group + suffix) in current_config for group in self.WJH_GROUPS) else: # if no current-value its enabled current_enabled = current_config[group_value + suffix] if((group_value + suffix) in current_config) else True diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt new file mode 100644 index 0000000..cd17349 --- /dev/null +++ b/tests/sanity/ignore-2.13.txt @@ -0,0 +1,105 @@ +plugins/modules/onyx_bgp.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_bgp.py validate-modules:doc-missing-type +plugins/modules/onyx_bgp.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_buffer_pool.py validate-modules:doc-missing-type +plugins/modules/onyx_buffer_pool.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_command.py validate-modules:doc-missing-type +plugins/modules/onyx_command.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_config.py validate-modules:doc-missing-type +plugins/modules/onyx_config.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_facts.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_igmp.py validate-modules:doc-missing-type +plugins/modules/onyx_igmp.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_igmp_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_igmp_vlan.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_igmp_vlan.py validate-modules:doc-missing-type +plugins/modules/onyx_igmp_vlan.py validate-modules:doc-required-mismatch +plugins/modules/onyx_igmp_vlan.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_igmp_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_interface.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_interface.py validate-modules:doc-required-mismatch +plugins/modules/onyx_interface.py validate-modules:missing-suboption-docs +plugins/modules/onyx_interface.py validate-modules:nonexistent-parameter-documented +plugins/modules/onyx_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_interface.py validate-modules:undocumented-parameter +plugins/modules/onyx_l2_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_l2_interface.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_l2_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_l2_interface.py validate-modules:doc-required-mismatch +plugins/modules/onyx_l2_interface.py validate-modules:missing-suboption-docs +plugins/modules/onyx_l2_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_l2_interface.py validate-modules:undocumented-parameter +plugins/modules/onyx_l3_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_l3_interface.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_l3_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_l3_interface.py validate-modules:doc-required-mismatch +plugins/modules/onyx_l3_interface.py validate-modules:missing-suboption-docs +plugins/modules/onyx_l3_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_l3_interface.py validate-modules:undocumented-parameter +plugins/modules/onyx_linkagg.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_linkagg.py validate-modules:doc-default-does-not-match-spec +plugins/modules/onyx_linkagg.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_linkagg.py validate-modules:doc-missing-type +plugins/modules/onyx_linkagg.py validate-modules:doc-required-mismatch +plugins/modules/onyx_linkagg.py validate-modules:missing-suboption-docs +plugins/modules/onyx_linkagg.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_linkagg.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_linkagg.py validate-modules:undocumented-parameter +plugins/modules/onyx_lldp.py validate-modules:doc-missing-type +plugins/modules/onyx_lldp_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_lldp_interface.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_lldp_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_lldp_interface.py validate-modules:doc-required-mismatch +plugins/modules/onyx_lldp_interface.py validate-modules:missing-suboption-docs +plugins/modules/onyx_lldp_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_lldp_interface.py validate-modules:undocumented-parameter +plugins/modules/onyx_magp.py validate-modules:doc-missing-type +plugins/modules/onyx_magp.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_mlag_ipl.py validate-modules:doc-missing-type +plugins/modules/onyx_mlag_vip.py validate-modules:doc-default-does-not-match-spec +plugins/modules/onyx_mlag_vip.py validate-modules:doc-missing-type +plugins/modules/onyx_mlag_vip.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_ntp.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_ntp_servers_peers.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_ospf.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_ospf.py validate-modules:doc-missing-type +plugins/modules/onyx_ospf.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_pfc_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_pfc_interface.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_pfc_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_pfc_interface.py validate-modules:doc-required-mismatch +plugins/modules/onyx_pfc_interface.py validate-modules:missing-suboption-docs +plugins/modules/onyx_pfc_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_pfc_interface.py validate-modules:undocumented-parameter +plugins/modules/onyx_protocol.py validate-modules:doc-missing-type +plugins/modules/onyx_ptp_global.py validate-modules:doc-missing-type +plugins/modules/onyx_ptp_global.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_ptp_interface.py validate-modules:doc-missing-type +plugins/modules/onyx_ptp_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_qos.py validate-modules:doc-missing-type +plugins/modules/onyx_qos.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_qos.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_snmp.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_snmp_hosts.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_snmp_users.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_syslog_remote.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_traffic_class.py validate-modules:doc-missing-type +plugins/modules/onyx_traffic_class.py validate-modules:parameter-list-no-elements +plugins/modules/onyx_traffic_class.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_vlan.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/onyx_vlan.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_vlan.py validate-modules:doc-missing-type +plugins/modules/onyx_vlan.py validate-modules:doc-required-mismatch +plugins/modules/onyx_vlan.py validate-modules:missing-suboption-docs +plugins/modules/onyx_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_vlan.py validate-modules:undocumented-parameter +plugins/modules/onyx_vxlan.py validate-modules:doc-elements-mismatch +plugins/modules/onyx_vxlan.py validate-modules:doc-required-mismatch +plugins/modules/onyx_vxlan.py validate-modules:missing-suboption-docs +plugins/modules/onyx_vxlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/onyx_vxlan.py validate-modules:undocumented-parameter