community.general/lib/ansible/module_utils/network
RobW3LGA bb50fc3889 construct_deep_url() (#53475)
* Updates aci.py with the ability to add ACI objects to any depth

Changes start at line 411 (construct_deep_url() and supporting functions). One minor change to line 633 (the original construct_url()) to provide for testability:  ...join(sorted(self.child_classes)) vs ...join(self.child_classes)

I am also attaching two test files. One characterizing the existing construct_url() and the matching test set for construct_deep_url() to support my efforts and proof of parity

* Two PyTest files to support construct_deep_url

These two files provide testing parity, one characterizing the original construct_url() function and the other proofing construct_deep_url(). The ...deep_url.py test file goes five layers deep to provide better validation for the function

* Correcting previous upload to incorrect folder

These two files provide testing parity, one characterizing the original construct_url() function and the other proofing construct_deep_url(). The ...deep_url.py test file goes five layers deep to provide better validation for the function

* Deleting for file name change per Matt Clay

* Deleting for file name change per Matt Clay

* Correcting file names per Matt Clay

@mattclay Thanks again for your continued guidance and patience. Please cancel the previous (incorrect) request

* Wrong location for test file

* Wrong location for test file

* First attempt to comply with suggestions

lib/ansible/module_utils/network/aci/aci.py:517:0: SyntaxWarning: "is not" with a literal. Did you mean "!="?
lib/ansible/module_utils/network/aci/aci.py:534:0: SyntaxWarning: "is not" with a literal. Did you mean "!="?
lib/ansible/module_utils/network/aci/aci.py:558:161: E501 line too long (210 > 160 characters)

* First attempt to comply with suggestions

test/units/module_utils/network/aci/test_aci_construct_url.py:1:14: SyntaxError: import pytest
test/units/module_utils/network/aci/test_aci_deep_url.py:1:14: SyntaxError: import pytest
test/units/module_utils/network/aci/test_aci_construct_url.py:0:0: use "\n" for line endings instead of "\r\n"
test/units/module_utils/network/aci/test_aci_deep_url.py:0:0: use "\n" for line endings instead of "\r\n"
Shortened test function names (less descriptive)

* Second attempt to comply with suggestions

* Second attempt to comply with suggestions

* Third attempt to comply with suggestions

* Third attempt to comply with suggestions

* Pro Tip: Convert from 'CRLF' to 'LF' in VSCode

It's on the status bar to the right

* Added setup() support for tests

* Continued corrections to support testing

* Added two mocks to support testing

I could not find where to place fakes/mocks, so please let me know if the current location is incorrect

* Adding tmpdir property to mock_basic.py

* Added last blank line to mock_basic.py

To pass sanity test

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py
2019-05-23 00:46:43 +02:00
..
a10 Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
aci construct_deep_url() (#53475) 2019-05-23 00:46:43 +02:00
aireos Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
aos Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
aruba Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
asa asa: Not all modules will have 'passwords' and 'context' keys (#54783) 2019-04-03 21:42:34 +05:30
avi Updated utils to remove Avi SDK dependency and Avi 18.2.2 version update (#54894) 2019-05-17 13:12:06 -04:00
bigswitch Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
checkpoint Add autopublish and autoinstallpolicy behaviour to Checkpoint devices (#50862) 2019-01-15 11:03:48 +01:00
cloudengine fix bugs for ce (#54750) 2019-04-17 12:51:58 +05:30
cnos Lenovo cnos user module (#53763) 2019-03-27 19:22:05 +05:30
common Issue55222 (#55223) 2019-05-14 18:58:43 +05:30
dellos6 Fix_dellos6_minor_issues (#52981) 2019-03-15 13:53:30 +05:30
dellos9 Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
dellos10 Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
edgeos Add missing ConnectionError imports (#45879) 2018-09-20 12:01:01 +10:00
edgeswitch new network module: edgeswitch_vlan (#48041) 2018-12-17 11:30:17 +05:30
enos Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
eos eos_config: Fix test issues (#56180) 2019-05-09 18:02:24 +05:30
exos Exos httpapi (#54405) 2019-03-27 14:44:04 +01:00
f5 removes redundant functions (#53989) 2019-03-20 14:44:41 +00:00
fortimanager Fortinet FortiManager Module_Utils MINOR Update (#52756) 2019-03-04 10:56:06 +05:30
fortios Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
frr frr: New module for BGP configuration management (#51281) 2019-03-04 15:02:56 +05:30
ftd Remove redundant defined variable (#55122) 2019-04-20 11:34:11 +05:30
ingate standardize TLS connection properties (#54315) 2019-03-28 00:19:28 -05:00
ios Revert nxos, ios, iosxr return_timestamps (#56206) 2019-05-08 20:49:29 +05:30
iosxr Revert nxos, ios, iosxr return_timestamps (#56206) 2019-05-08 20:49:29 +05:30
ironware Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
junos Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
meraki Meraki - Add check for auth_key parameter (#56199) 2019-05-15 11:45:07 -04:00
netconf Fixes Netconf_config single parameter bug (#56138) 2019-05-06 17:30:49 -04:00
netscaler Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
netvisor Pluribus Networks network cli terminal and cliconf plugins (#53735) 2019-03-15 13:51:50 +05:30
nos new nos_command module (#43056) 2018-08-10 13:50:02 -07:00
nso NSO modules now work as expected with NSO 5.X (#54766) 2019-04-03 20:56:35 +01:00
nxos Fix addition of newline for eos & nxos (#56227) 2019-05-08 12:28:04 -04:00
onyx Get Capabilities Support (#49880) 2018-12-14 09:45:31 +05:30
ordnance Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
panos Add fw via panorama connectivity to panos connection (#52954) 2019-03-25 19:48:45 +05:30
restconf Restconf HTTPAPI plugin and modules (#49476) 2019-02-04 09:28:26 -05:00
routeros Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
skydive PR to include support for Skydive Node and Edge modules with Ansible (#53112) 2019-03-13 16:22:31 +05:30
slxos Extreme Networks SLXOS Config Module (#38607) 2018-04-20 08:52:20 +01:00
sros Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
voss New voss_config module (#47533) 2018-11-01 14:07:41 +05:30
vyos Move _handle_no_log_values() out of basic.py (#48628) 2019-03-04 17:02:44 -05:00
__init__.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30