-
Notifications
You must be signed in to change notification settings - Fork 46
Release 3.8.0 #423
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
Merged
Release 3.8.0 #423
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding a fabric property accessor that will be required by future commits for issue #352
Fix f-string-without-interpolation error.
…-property dcnm_fabric: Add per_vrf_loopback_auto_provision accessor property. Adding a fabric property accessor that will be required by future commits for issue #352
* dcnm_vrf: Update log messages and comments This is part 1 of multiple PRs to address issue #352. The contents of this PR do not affect functionality. They consist of: 1. Update/Add logging messages to help understand the code flow. 2. Update some comments. 3. Update two unit tests due to difference is logged message. * Appease pylint pylint is complaining about a comment. Reformatting the comment so that it doesn't resemble: # pylint: disable=
These changes are in preparation for fixes related to issue #352 1. In dict_values_differ() we previously treated None, "none" and "" as different values. This change treats these as the same value. 2. Throughout the module, the var all_vrfs was a string, and string manipulation was used to append/remove commas as needed. To simplify, we've changed all_vrfs to a list, and use ','.join() to add required commas when converting to the comma-separated list that NDFC requires. 3. Ran through linters which caused a few lines to be reformated :-( Apologies that number 1 and 2 above are not related. I tried using Stacked Branches and it didn't work the way I thought it would. Still, hopefully, this is shorter than my previous PRs!
* Initial PC Member Support * Matt and Pete fixes and more profiles * Refactor code and add more policy types * Fix github actions * Enable logging * Fix linter issues * Fix logging issues for github actions * Fix same int diff switch issue * Add integration tests * Fix actions failures * Fix actions failures * Review comments * Update docs
1. plugins/modules/dcnm.vrf - send_to_controller() Add a log_response parameter which controls whether the controller response will be added to the ansible response. - get_have() - simplify conditional attach_state = False if attach["lanAttachState"] == "NA" else True Changed to: attach_state = not attach["isLanAttached"] == "NA" - release_resources_by_id() Fix pylint error (id_list was being redefined in the for loop, so renamed to item). - failure(): disable pylint check for protected-access 2. tests/integration/targets/dcnm_vrf/tests/dcnm/merged.yaml There are no functional changes here. We've only done the following: - Remove single-quotes from all asserts - Remove jinja2 templating around variables in asserts (these generate warnings and are not needed). - Removing the single-quotes broke asserts of the following form: - "test phrase" in var To fix this, added set fact for "test phrase" like so: - name: set fact set_fact: TEST_PHRASE: "test phrase" - assert: that: - TEST_PHRASE in var 3. plugins/__init__.py - Added to appease pylint
1. plugins/modules/dcnm_vrf.py push_diff_delete() was sending diff_detach instead of diff_delete.
dcnm_vrf: Issue #352 : more preparatory changes # Summary This PR for `dcnm_vrf` includes the following: 1. A fix for the VRF delete diff not ever being sent (instead, the detach diff was sent). 2. Modifies method `send_to_controller()` to add a parameter `log_response` that controls whether the controller response is added to the Ansible playbook result output. This allows us to suppress results that would not be of interest to the user. 3. Simplifies a conditional in `get_have()` 4. Fixes a pylint error in `release_resources_by_id()` 5. Cleans up the merged integration test 6. Adds an `__init__.py` file to appease pylint ## Detail 1. plugins/modules/dcnm.vrf - `push_diff_delete()` This method was sending `self.diff_detach` instead of `self.diff_delete`. - `send_to_controller()` Add a `log_response` parameter which controls whether the controller response will be added to the Ansible response. - `get_have()` - simplify the following conditional ```python attach_state = False if attach["lanAttachState"] == "NA" else True ``` Changed to: ```python attach_state = not attach["isLanAttached"] == "NA" ``` - `release_resources_by_id()` Fix pylint error (`id_list` was being redefined in the for loop, so renamed to `item`). - `failure()` disable pylint check for protected-access 2. tests/integration/targets/dcnm_vrf/tests/dcnm/merged.yaml There are no functional changes here. We've only done the following: - Remove single-quotes from all asserts - Remove jinja2 templating around variables in asserts (these generate warnings and are not needed). - Removing the single-quotes broke asserts of the following form: - "test phrase" in var To fix this, added set fact for "test phrase" like so: ```yaml - name: set fact set_fact: TEST_PHRASE: "test phrase" - assert: that: - TEST_PHRASE in var ``` 6. plugins/__init__.py - Added to appease pylint
In an earlier commit, the following line in get_want() was changed to simplify the logic, but the key being used (lanAttachState) was also changed to (isLanAttached), which broke proper determination of lanAttachState and caused the replace-state integration test to fail. Original line (pre-problematic-commit): attach_state = False if attach["lanAttachState"] == "NA" else True Problematic commit: attach_state = not attach["isLanAttached"] == "NA" Fixed line: attach_state = not attach["lanAttachState"] == "NA"
…unk. (#392) * Update dcnm_interface.py Add support for native vlan with: * trunk * trunk port-channel * trunk virtual port-channel By default native is empty. * fix whitespace issue * Update dcnm_intf_eth_configs.json add native vlan * Update dcnm_intf_eth_payloads.json add native vlan * Update dcnm_intf_pc_configs.json update native_vlan * Update dcnm_intf_pc_payloads.json update native_vlan * Update dcnm_intf_vpc_configs.json add native_vlan * Update dcnm_intf_vpc_payloads.json update native vlan * Update dcnm_intf_multi_intf_configs.json add native vlan * Update dcnm_intf_multi_intf_payloads.json add native vlan * Update dcnm_intf_vpc_configs.json * Update docs and integration tests * Add test playbook for dcnm_interface module --------- Co-authored-by: mwiebe <mwiebe@cisco.com>
* Update dcnm_interface.py Add support Dot1q tunnel host * Update dcnm_interface.py remove whitespace fix yaml on example * Update docs * Refactor and add DOT1Q PC Support * Update docs for PC dot1q --------- Co-authored-by: mwiebe <mwiebe@cisco.com>
* dcnm_network: Fix for issue 395 1. plugins/modules/dcnm_network.py - Run through linters (sorry, this resulting in a large diff) - get_fabric_multicast_group_address() - new method - validate_input() - leverage get_fabric_multicast_group_address() * dcnm_network: remove two invalid unit tests 1. tests/unit/modules/dcnm/fixtures/dcnm_network.json - Ran through a JSON prettier. There are no other changes to this file, so don't spend time reviewing it. 2, test/unit/modules/dcnm/test_dcnm_network.py Commented out two test cases that are now failing. These are no longer valid cases. * dcnm_network: Update integration tests - Removed most single-quotes from around the asserts (a couple are still needed). - Sorted the asserts for better readability and easier maintenance. - Changed the interface name vars as follows ansible_sw1_int1 -> interface_1a ansible_sw1_int2 -> interface_1b ansible_sw1_int5 -> interface_1c ansible_sw1_int6-> interface_1d ansible_sw2_int1 -> interface_2a ansible_sw2_int2 -> interface_2b ansible_sw2_int5 -> interface_2c ansible_sw2_int6 -> interface_2d * Address review comments 1. plugins/modules/dcnm_network.py - get_fabric_multicast_group_address() Convert replication_mode to lowercase for comparison. 2. tests/unit/modules/dcnm/test_dcnm_network.py - Add comments explaining why we disabled two unit tests. * Reformat to 160 char line length 1. plugins/modules/dcnm_network.py - Ran black -l 160 to reformat back to longer line length. Hopefully this reduces the diffs. 2. Update tox.ini with new 160 character line length for black. * Add support for Native vlan with Trunk, Port-Channel Trunk and vPC Trunk. (#392) * Update dcnm_interface.py Add support for native vlan with: * trunk * trunk port-channel * trunk virtual port-channel By default native is empty. * fix whitespace issue * Update dcnm_intf_eth_configs.json add native vlan * Update dcnm_intf_eth_payloads.json add native vlan * Update dcnm_intf_pc_configs.json update native_vlan * Update dcnm_intf_pc_payloads.json update native_vlan * Update dcnm_intf_vpc_configs.json add native_vlan * Update dcnm_intf_vpc_payloads.json update native vlan * Update dcnm_intf_multi_intf_configs.json add native vlan * Update dcnm_intf_multi_intf_payloads.json add native vlan * Update dcnm_intf_vpc_configs.json * Update docs and integration tests * Add test playbook for dcnm_interface module --------- Co-authored-by: mwiebe <mwiebe@cisco.com> * Remove redundant doc entries --------- Co-authored-by: Charly Coueffe <75327499+ccoueffe@users.noreply.github.com> Co-authored-by: mwiebe <mwiebe@cisco.com>
Update CI badge to reflect status of `develop` branch only
* Fix policy delete for freeform deploy false * Unit Test Fix * Update integration tests * Fix integration test * Add test playbook for dcnm_policy module
Update galaxy.yml to indicate develop branch is a DEV version of the code.
* Update dcnm_interface.py add code for merge and delete breakout interface * Update dcnm_interface.py fix Trailing whitespace * Update dcnm_interface.py fix pip8 * Update dcnm_interface.py fix pep8 * Update dcnm_interface.py fix line under-indented * Update dcnm_interface.py * Update dcnm_interface.py * Update dcnm_interface.py check if cfg["type"] exits * Fix example * Fix docs * Update Docs * Fix Docs * Update dcnm_interface.py update breakout overridden * Update dcnm_interface.py fix over-indented * update breakout part --------- Co-authored-by: mwiebe <mwiebe@cisco.com>
* add duplex for eth and po interface in access and trunk * Update dcnm_interface.py fix trailing whitespace * Update dcnm_intf_eth_configs.json add sanity for duplex * Update dcnm_intf_eth_payloads.json add sanity for duplex * Update dcnm_intf_multi_intf_configs.json add sanity duplex * Update dcnm_intf_multi_intf_payloads.json add sanity duplex * Update dcnm_intf_pc_configs.json add sanity duplex * Update dcnm_intf_pc_payloads.json add sanity duplex --------- Co-authored-by: Mike Wiebe <mwiebe@cisco.com>
* add vpc orphan port for eth and po trunk and access * Update dcnm_intf_eth_configs.json add sanity orphan * Update dcnm_intf_eth_payloads.json add sanity orphan * Update dcnm_intf_pc_configs.json add sanity orphan * Update dcnm_intf_pc_payloads.json add sanity orphan * Update dcnm_intf_multi_intf_configs.json add sanity orphan * Update dcnm_intf_multi_intf_payloads.json add sanity orphan --------- Co-authored-by: Mike Wiebe <mwiebe@cisco.com>
* add route_tag for subinterface * fix pep issue and add sanity tests * add route_tag in the documentation * Update dcnm_intf_multi_intf_configs.json * Update dcnm_intf_multi_intf_payloads.json * Update dcnm_intf_subint_payloads.json * Update dcnm_intf_multi_intf_configs.json
Update key list to be remove if not in have
Fix error when want_net_data is None and want_net_data.get() fails.
Drop `-dev` extension for release
mtarking
approved these changes
Jun 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.