diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:18:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:18:41 +0000 |
commit | b643c52cf29ce5bbab738b43290af3556efa1ca9 (patch) | |
tree | 21d5c53d7a9b696627a255777cefdf6f78968824 /ansible_collections/community/ciscosmb | |
parent | Releasing progress-linux version 9.5.1+dfsg-1~progress7.99u1. (diff) | |
download | ansible-b643c52cf29ce5bbab738b43290af3556efa1ca9.tar.xz ansible-b643c52cf29ce5bbab738b43290af3556efa1ca9.zip |
Merging upstream version 10.0.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/ciscosmb')
12 files changed, 191 insertions, 118 deletions
diff --git a/ansible_collections/community/ciscosmb/.github/workflows/CI.yml b/ansible_collections/community/ciscosmb/.github/workflows/CI.yml index 6d07a3edc..73c71b48e 100644 --- a/ansible_collections/community/ciscosmb/.github/workflows/CI.yml +++ b/ansible_collections/community/ciscosmb/.github/workflows/CI.yml @@ -33,40 +33,31 @@ jobs: # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html sanity: - name: Sanity (Ansible ${{ matrix.ansible }}) + name: Sanity tests + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: + # Ansible Support Matrix + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix ansible: - # It's important that Sanity is tested against all stable-X.Y branches - # Testing against `devel` may fail as new tests are added. - # An alternative to `devel` is the `milestone` branch with - # gets synchronized with `devel` every few weeks and therefore - # tends to be a more stable target. Be aware that it is not updated - # around creation of a new stable branch, this might cause a problem - # that two different versions of ansible-test use the same sanity test - # ignore.txt file. - # - stable-2.9 # Only if your collection supports Ansible 2.9 - - stable-2.10 # Only if your collection supports ansible-base 2.10 - - stable-2.11 - - stable-2.12 - - stable-2.13 - stable-2.14 + - stable-2.15 + - stable-2.16 - devel - # - milestone - runs-on: ubuntu-latest + python: + - 3.11 + os: + - ubuntu-22.04 steps: - # Run sanity tests inside a Docker container. - # The docker container has all the pinned dependencies that are - # required and all Python versions Ansible supports. - - name: Perform sanity testing + - name: Sanity testing uses: ansible-community/ansible-test-gh-action@release/v1 with: ansible-core-version: ${{ matrix.ansible }} + target-python-version: ${{ matrix.python }} testing-type: sanity - # OPTIONAL If your sanity tests require code - # from other collections, install them like this test-deps: >- - git+https://github.com/ansible-collections/ansible.netcommon.git + ansible.netcommon ### # Unit tests (OPTIONAL) @@ -74,44 +65,52 @@ jobs: # https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html units: - runs-on: ubuntu-latest - name: Units (Ansible ${{ matrix.ansible }}+py${{ matrix.python }}) + name: Unit tests (${{ matrix.ansible }}+py${{ matrix.python }}) + runs-on: ${{ matrix.os }} strategy: - # As soon as the first unit test fails, cancel the others to free up the CI queue fail-fast: false matrix: + # Ansible Support matrix + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix ansible: - # - stable-2.9 # Only if your collection supports Ansible 2.9 - - stable-2.10 # Only if your collection supports ansible-base 2.10 - - stable-2.11 - - stable-2.12 - - stable-2.13 - stable-2.14 + - stable-2.15 + - stable-2.16 - devel - # - milestone python: + # - "2.7" no support for old Python + - "3.5" - "3.6" - "3.7" - "3.8" - "3.9" - "3.10" + - "3.11" + - "3.12" + os: + - ubuntu-22.04 exclude: # no support - - ansible: stable-2.10 - python: "3.10" - - ansible: stable-2.11 - python: "3.10" + - ansible: stable-2.14 + python: "3.12" + - ansible: stable-2.15 + python: "3.12" + - ansible: stable-2.16 + python: "3.5" + - ansible: devel + python: "3.5" + - ansible: devel + python: "3.6" + - ansible: devel + python: "3.7" + steps: - - name: >- - Perform unit testing against - Ansible version ${{ matrix.ansible }} + - name: Unit testing uses: ansible-community/ansible-test-gh-action@release/v1 with: ansible-core-version: ${{ matrix.ansible }} target-python-version: ${{ matrix.python }} testing-type: units - # OPTIONAL If your unit tests require code - # from other collections, install them like this test-deps: >- ansible.netcommon ansible.utils diff --git a/ansible_collections/community/ciscosmb/.github/workflows/FastCI.yml b/ansible_collections/community/ciscosmb/.github/workflows/FastCI.yml index ab8b17874..867757d51 100644 --- a/ansible_collections/community/ciscosmb/.github/workflows/FastCI.yml +++ b/ansible_collections/community/ciscosmb/.github/workflows/FastCI.yml @@ -28,72 +28,52 @@ jobs: # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html sanity: - name: Fast Sanity (Ansible ${{ matrix.ansible }}) + name: Sanity tests + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: + # Ansible Support matrix + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix ansible: - # It's important that Sanity is tested against all stable-X.Y branches - # Testing against `devel` may fail as new tests are added. - # An alternative to `devel` is the `milestone` branch with - # gets synchronized with `devel` every few weeks and therefore - # tends to be a more stable target. Be aware that it is not updated - # around creation of a new stable branch, this might cause a problem - # that two different versions of ansible-test use the same sanity test - # ignore.txt file. - # - stable-2.9 # Only if your collection supports Ansible 2.9 - # - stable-2.10 # Only if your collection supports ansible-base 2.10 - # - stable-2.11 - # - stable-2.12 - - stable-2.13 - # - stable-2.14 - # - devel - # - milestone - runs-on: ubuntu-latest + - stable-2.14 + python: + - 3.11 + os: + - ubuntu-22.04 + steps: - # Run sanity tests inside a Docker container. - # The docker container has all the pinned dependencies that are - # required and all Python versions Ansible supports. - - name: Perform sanity testing + - name: Sanity testing uses: ansible-community/ansible-test-gh-action@release/v1 with: ansible-core-version: ${{ matrix.ansible }} + target-python-version: ${{ matrix.python }} testing-type: sanity - # OPTIONAL If your sanity tests require code - # from other collections, install them like this test-deps: >- - git+https://github.com/ansible-collections/ansible.netcommon.git - -### -# Unit tests (OPTIONAL) -# -# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html + ansible.netcommon - units: - runs-on: ubuntu-latest - name: Fast Units (Ansible ${{ matrix.ansible }}+py${{ matrix.python }}) + unit: + name: Unit tests + runs-on: ${{ matrix.os }} strategy: - # As soon as the first unit test fails, cancel the others to free up the CI queue fail-fast: false matrix: + # Ansible Support matrix + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix ansible: - # - stable-2.9 # Only if your collection supports Ansible 2.9 - # - stable-2.10 # Only if your collection supports ansible-base 2.10 - # - stable-2.11 - # - stable-2.12 - - stable-2.13 - # - stable-2.14 - # - devel - # - milestone + - stable-2.14 + python: + - 3.11 + os: + - ubuntu-22.04 + steps: - - name: >- - Perform unit testing against - Ansible version ${{ matrix.ansible }} + - name: Unit testing uses: ansible-community/ansible-test-gh-action@release/v1 with: ansible-core-version: ${{ matrix.ansible }} + target-python-version: ${{ matrix.python }} testing-type: units - # OPTIONAL If your unit tests require code - # from other collections, install them like this test-deps: >- ansible.netcommon ansible.utils diff --git a/ansible_collections/community/ciscosmb/CHANGELOG.rst b/ansible_collections/community/ciscosmb/CHANGELOG.rst index fb3bc6cc0..1f16349ea 100644 --- a/ansible_collections/community/ciscosmb/CHANGELOG.rst +++ b/ansible_collections/community/ciscosmb/CHANGELOG.rst @@ -4,6 +4,54 @@ CiscoSMB Ansible module Release Notes .. contents:: Topics +v1.0.9 +====== + +Release Summary +--------------- + +Primarily revert release. Previous release (1.0.8) fixed typo in attribute name, but it was breaking change. +This release brought the typo back (bandwith) and just added the new attribute with correct name "bandwidth" as a copy of the mistypped attribute. + +Attribude "bandwith" will be removed in next minor release. + +Minor Changes +------------- + +- added additional attribute - add interface 'bandwidth' attribute +- reverted attribute change - keep interface 'bandwith' attribute + +Bugfixes +-------- + +- typo in changelog fragment template +- typo in test script + +v1.0.8 +====== + +Release Summary +--------------- + +Release Date: 2024-04-09 + + Minor bugfixes, updated CI + +Minor Changes +------------- + +- docs - addeed info about SG-250 support and testing + +Breaking Changes / Porting Guide +-------------------------------- + +- in facts of interface 'bandwith' changed to 'bandwidth' + +Bugfixes +-------- + +- issue +- solved issue v1.0.7 ====== @@ -15,7 +63,6 @@ Release Date: 2023-10-30 Fix issue on CSB-350 #69 Clarify configuration doc #66 #64 - Bugfixes -------- @@ -30,7 +77,6 @@ Release Summary Code cleaning, better documentation - Minor Changes ------------- @@ -68,7 +114,6 @@ Release Summary Release Date: 2021-09-13 - Bugfixes -------- @@ -83,7 +128,6 @@ Release Summary Release Date: 2019-10-31 Minor changes in documentation, adding Python 3.6 as a supported version - Minor Changes ------------- diff --git a/ansible_collections/community/ciscosmb/FILES.json b/ansible_collections/community/ciscosmb/FILES.json index cc62fa878..6c096d426 100644 --- a/ansible_collections/community/ciscosmb/FILES.json +++ b/ansible_collections/community/ciscosmb/FILES.json @@ -25,14 +25,14 @@ "name": ".github/workflows/CI.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c9a8a6506530fe75912e7c5a4f088ea5faf7ffa2f423425b2805f4b0961a5f37", + "chksum_sha256": "123b77a907e54d2342804810653b910173ff576f19f27d113822aab39c53667f", "format": 1 }, { "name": ".github/workflows/FastCI.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "94a5e1a4be780b591cee49ad059ce07e8e89de89453daf0d3fd6bc3d9e5fd5d5", + "chksum_sha256": "3f8607ef0946ef96025c3f7cd6977db800e150594b77340617247defcdeb7bfb", "format": 1 }, { @@ -53,14 +53,14 @@ "name": "changelogs/fragments/.keep", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4a458bd648a360c285839f2e2ad6994993c035eb278b64bde2c08a3665a84e4c", + "chksum_sha256": "a02e74b2342d643d4eb450f87cc2f2c7f608be6061321555b1d71ecdf90e3938", "format": 1 }, { "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a3610efbe7df3df55e25d674d38c6f9681680cc6807e3af36cac886440c6346c", + "chksum_sha256": "caa1a1be21ebfefcf82b3bb041e7b0489c684dfb189c6023c55ed69096e03803", "format": 1 }, { @@ -158,7 +158,7 @@ "name": "plugins/modules/facts.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "06cbfc8b6ee23c25089ac592d9d21ce0a086dd9c080852cf50f14833e90ce210", + "chksum_sha256": "710465293235ea44b25f55d81f083086549adabb87cc83b3e535f2275222d5bd", "format": 1 }, { @@ -172,7 +172,7 @@ "name": "plugins/terminal/ciscosmb.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "58fdbc076d66763501c686e9f2394f8c9db2b104469d50feae65bee55634eb68", + "chksum_sha256": "1f92f1abb0c83531a3de62936d337a401b8adac1c8356879f7a2c55de19d4fff", "format": 1 }, { @@ -214,7 +214,7 @@ "name": "tests/unit/compat/mock.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0af958450cf6de3fbafe94b1111eae8ba5a8dbe1d785ffbb9df81f26e4946d99", + "chksum_sha256": "7ebc6613b5c5f9e6d3726bec3406a5d670ca04ef69f7eb21c5ee83ef94ef5445", "format": 1 }, { @@ -627,7 +627,7 @@ "name": "tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b9ff43b3f0e29480f539528c72abfe7a2d2fa80e4affa834245e78d73a04947a", + "chksum_sha256": "de8e5dc48a066d75be282819a947f132edaf27462f5572ff1fceede749346be4", "format": 1 }, { @@ -704,7 +704,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "482e1b4cebbd09bb0d8f7b0876ddffd6477af428618f284e1180a583401a8cbb", + "chksum_sha256": "64accbe17f9d81d7bcb88b4c90f58d2536e9fc8defa7bd19d878b71bc865c4d2", "format": 1 }, { @@ -732,7 +732,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "40d7260f4d76c77e48a364647b75e113ce91d0e18ad67b13207e14cec08718e1", + "chksum_sha256": "8b7d0c6c412dd63b33cb45e4fe981241150fa1a6d48516e75f91783831022b19", "format": 1 }, { diff --git a/ansible_collections/community/ciscosmb/MANIFEST.json b/ansible_collections/community/ciscosmb/MANIFEST.json index 2a98111d7..220aa5caf 100644 --- a/ansible_collections/community/ciscosmb/MANIFEST.json +++ b/ansible_collections/community/ciscosmb/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "ciscosmb", - "version": "1.0.7", + "version": "1.0.9", "authors": [ "Petr Kl\u00edma <qaxi@seznam.cz>" ], @@ -35,7 +35,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "922f00a582a76f8d668444f41338cfc356b64945bfe4149e7a12ac1e838c03b4", + "chksum_sha256": "0184b4a8b12bb7fd53db5eba127a744f66f90bdf37070164de7b6825a4b0f3d6", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/ciscosmb/README.md b/ansible_collections/community/ciscosmb/README.md index 0ddae236a..4382b1d65 100644 --- a/ansible_collections/community/ciscosmb/README.md +++ b/ansible_collections/community/ciscosmb/README.md @@ -1,6 +1,8 @@ # Ansible Cisco Small Bussiness Switches (SMB) module -Ansible Galaxy module for Cisco SMB switches - SG300, SG500, SG350, SG550, CBS350 +Thorough project check - [![CI](https://github.com/ansible-collections/community.ciscosmb/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ansible-collections/community.ciscosmb/actions/workflows/CI.yml) + +Ansible Galaxy module for Cisco SMB switches - SG250, SG300, SG500, SG350, SG550, CBS350 ## Install @@ -11,6 +13,7 @@ ansible-galaxy collection install community.ciscosmb ## Usage examples Tested on devices: +* SG250-10P * SG350-10-K9 * SG350-28-K9 * SG500-52-K9 @@ -58,6 +61,8 @@ Tested on Python versions: * 3.8 * 3.9 * 3.10 +* 3.11 +* 3.12 ### Running examples @@ -140,7 +145,7 @@ vim galaxy.yml # edit changelog fragments (template in changelogs/fragments/.keep) cp changelogs/fragments/.keep changelogs/fragments/release-x.y.z.yml -vim changelogs/fragments/fragment.yml +vim changelogs/fragments/release-x.y.z.yml # change and generate CHANGELOG.rst antsibull-changelog lint -v diff --git a/ansible_collections/community/ciscosmb/changelogs/changelog.yaml b/ansible_collections/community/ciscosmb/changelogs/changelog.yaml index 41e81a1b7..490b8c7e6 100644 --- a/ansible_collections/community/ciscosmb/changelogs/changelog.yaml +++ b/ansible_collections/community/ciscosmb/changelogs/changelog.yaml @@ -191,3 +191,41 @@ releases: - issue69.yml - release-1.0.7.yml release_date: '2023-10-30' + 1.0.8: + changes: + breaking_changes: + - in facts of interface 'bandwith' changed to 'bandwidth' + bugfixes: + - issue + - solved issue + minor_changes: + - docs - addeed info about SG-250 support and testing + release_summary: "Release Date: 2024-04-09\n\n Minor bugfixes, updated CI\n" + fragments: + - CI.yml + - add-SG250.yml + - bandwidth.yml + - on_become.yml + - release-1.0.8.yml + release_date: '2024-04-09' + 1.0.9: + changes: + bugfixes: + - typo in changelog fragment template + - typo in test script + minor_changes: + - added additional attribute - add interface 'bandwidth' attribute + - reverted attribute change - keep interface 'bandwith' attribute + release_summary: 'Primarily revert release. Previous release (1.0.8) fixed typo + in attribute name, but it was breaking change. + + This release brought the typo back (bandwith) and just added the new attribute + with correct name "bandwidth" as a copy of the mistypped attribute. + + + Attribude "bandwith" will be removed in next minor release. + + ' + fragments: + - 75-versioning_violation.yml + release_date: '2024-05-03' diff --git a/ansible_collections/community/ciscosmb/changelogs/fragments/.keep b/ansible_collections/community/ciscosmb/changelogs/fragments/.keep index 7b3ecc4f0..c61804f01 100644 --- a/ansible_collections/community/ciscosmb/changelogs/fragments/.keep +++ b/ansible_collections/community/ciscosmb/changelogs/fragments/.keep @@ -1,4 +1,4 @@ -# fragment.xml +# fragment.yml release_summary: | Release Date: 2019-10-31 `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>` diff --git a/ansible_collections/community/ciscosmb/plugins/modules/facts.py b/ansible_collections/community/ciscosmb/plugins/modules/facts.py index 23cd9820a..a8744ef3c 100644 --- a/ansible_collections/community/ciscosmb/plugins/modules/facts.py +++ b/ansible_collections/community/ciscosmb/plugins/modules/facts.py @@ -423,9 +423,11 @@ class Interfaces(FactsBase): interface["mode"] = i[8].lower() if i[6] == "Up": - interface["bandwith"] = int(i[3]) * 1000 # to get speed in kb + interface["bandwidth"] = int(i[3]) * 1000 # to get speed in kb + interface["bandwith"] = interface["bandwidth"] else: - interface["bandwith"] = None + interface["bandwidth"] = None + interface["bandwith"] = interface["bandwidth"] for key in interface: if interface[key] == "--": @@ -449,9 +451,11 @@ class Interfaces(FactsBase): interface["control"] = i[5].lower() if i[6] == "Up": - interface["bandwith"] = int(i[3]) * 1000 # to get speed in kb + interface["bandwidth"] = int(i[3]) * 1000 # to get speed in kb + interface["bandwith"] = interface["bandwidth"] else: - interface["bandwith"] = None + interface["bandwidth"] = None + interface["bandwith"] = interface["bandwidth"] for key in interface: if interface[key] == "--": @@ -624,6 +628,7 @@ class Interfaces(FactsBase): self.facts["interfaces"][interface]["admin_state"] = "up" self.facts["interfaces"][interface]["description"] = None self.facts["interfaces"][interface]["state"] = "up" + self.facts["interfaces"][interface]["bandwidth"] = None self.facts["interfaces"][interface]["bandwith"] = None self.facts["interfaces"][interface]["duplex"] = None self.facts["interfaces"][interface]["negotiation"] = None diff --git a/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py b/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py index e8aa46d9b..6bb4d8a89 100644 --- a/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py +++ b/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py @@ -80,9 +80,6 @@ class TerminalModule(TerminalBase): ) def on_become(self, passwd=None): - if self._get_prompt().endswith(b"#"): - return - cmd = {u"command": u"enable"} if passwd: # Note: python-3.5 cannot combine u"" and r"" together. Thus make diff --git a/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py b/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py index 0972cd2e8..5d25fbe16 100644 --- a/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py +++ b/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py @@ -64,8 +64,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4): # newline that our naive format() added data_as_list[-1] = data_as_list[-1][:-1] - for line in data_as_list: - yield line + yield data_as_list def mock_open(mock=None, read_data=''): """ @@ -93,8 +92,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4): if handle.readline.return_value is not None: while True: yield handle.readline.return_value - for line in _data: - yield line + yield _data global file_spec if file_spec is None: diff --git a/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py b/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py index 98a185dd7..107c365ca 100644 --- a/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py +++ b/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py @@ -116,6 +116,13 @@ class TestCiscoSMBFactsModule(TestCiscoSMBModule): len(result['ansible_facts']['ansible_net_neighbors']), 9 ) + interfaces = result['ansible_facts']['ansible_net_interfaces'] + ge42 = interfaces['GigabitEthernet1/42'] + + self.assertEqual(ge42['bandwidth'], 1000000) + + self.assertEqual(ge42['bandwidth'], ge42['bandwith']) + # def test_ciscosmb_facts_routing(self): # set_module_args(dict(gather_subset='routing')) # result = self.execute_module() |