-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcnm_vrf: UT - fix null fabric name in vrf attachments (#365)
* Initial commit 1. module_utils/network/dcnm.py Add two new methods which are duplicate functionality to get_ip_sn_fabric_dict() get_ip_fabric_dict() get_sn_fabric_dict() get_ip_sn_fabric_dict() was not touched. The reason for the new defs is because patch (in test_dcnm_vrf.py setUp() did not like patching to a def that returns more than one value. But another reason is that it's cleaner for these utility defs to be as simple as possible. 2. test_dcnm_vrf.py - Add the mock for sn_fab - Modify load_fixtures() for all test cases that required having sn_fab dict mocked. - Define two new vars for fabric details (for a future commit) - fabric_details_mfd - fabric_details_vxlan 3. dcnm_vrf.json Add the following objects (fabric_details_* for a future commit) - mock_sn_fab - fabric_details_mfd - fabric_details_vxlan * Appease linters 1. test_dcnm_vrf.py Fix black whitespace on blank line. 2. dcnm_vrf.py Fix pylint unused-import 3. module_utils/network/dcnm/dcnm.py 1. Run through black 2. Fix pep8 expected 2 blank lines, found 1 * dcnm_vrf: Update fixture data Update fabric_details_* 1. tests/unit/modules/dcnm/fixtures/dcnm_vrf.json - Remove dcnm_fabric_orig - Update fabric_details_mfd with default MSD fabric - Update fabric_details_vxlan with default VXLAN/EVPN fabric * dcnm_vrf: Add mock_ip_fab to dcnm_vrf.json Adding for future use. * Improve docstrings * Fix docstrings module_utils/network/dcnm/dcnm.py Clean up the two recently-added method's docstrings. Fix typos and descriptions of return values. * Sanity-check inventory_data Maybe overly paranoid, but better to fail at earliest possible point, IMHO.
- Loading branch information
1 parent
cfac22b
commit b179ee4
Showing
4 changed files
with
709 additions
and
110 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.