Skip to content

Commit

Permalink
chore: slacken pylint pin, update test data to work w/ ntc-templates …
Browse files Browse the repository at this point in the history
…updates!
  • Loading branch information
carlmontanari committed Oct 15, 2023
1 parent 572d3cd commit b2b2738
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nox==2023.4.22
pycodestyle>=2.8.0,<3.0.0
pydocstyle>=6.1.1,<7.0.0
pylama>=8.4.0,<9.0.0
pylint==2.17.7
pylint>=3.0.0,<4.0.0
pytest-cov>=3.0.0,<5.0.0
pytest>=7.0.0,<8.0.0
toml>=0.10.2,<1.0.0
4 changes: 2 additions & 2 deletions tests/unit/functions/test_print_structured_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
[
(
True,
"\x1b[1m\x1b[36msend_commands*******************************************************************\n\x1b[1m\x1b[34m* sea-ios-1 ** changed : False *************************************************\n\x1b[1m\x1b[32mvvvv send_commands ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\n[ { 'config_register': '0x2102',\n 'hardware': ['CSR1000V'],\n 'hostname': 'csr1000v',\n 'mac': [],\n 'release': 'fc2',\n 'reload_reason': 'reload',\n 'restarted': '',\n 'rommon': 'IOS-XE',\n 'running_image': 'packages.conf',\n 'serial': ['9FKLJWM5EB0'],\n 'software_image': 'X86_64_LINUX_IOSD-UNIVERSALK9-M',\n 'uptime': '2 hours, 43 minutes',\n 'uptime_days': '',\n 'uptime_hours': '2',\n 'uptime_minutes': '43',\n 'uptime_weeks': '',\n 'uptime_years': '',\n 'version': '16.4.1'}]\n\x1b[1m\x1b[32m---- send_commands ** changed : False ------------------------------------------ INFO\n[ { 'distance': '',\n 'mask': '24',\n 'metric': '',\n 'network': '10.0.0.0',\n 'nexthop_if': 'GigabitEthernet1',\n 'nexthop_ip': '',\n 'nexthop_vrf': '',\n 'protocol': 'C',\n 'type': '',\n 'uptime': '',\n 'vrf': ''},\n { 'distance': '',\n 'mask': '32',\n 'metric': '',\n 'network': '10.0.0.15',\n 'nexthop_if': 'GigabitEthernet1',\n 'nexthop_ip': '',\n 'nexthop_vrf': '',\n 'protocol': 'L',\n 'type': '',\n 'uptime': '',\n 'vrf': ''}]\n\x1b[1m\x1b[32m^^^^ END send_commands ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
"\x1b[1m\x1b[36msend_commands*******************************************************************\n\x1b[1m\x1b[34m* sea-ios-1 ** changed : False *************************************************\n\x1b[1m\x1b[32mvvvv send_commands ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\n[ { 'config_register': '0x2102',\n 'hardware': ['CSR1000V'],\n 'hostname': 'csr1000v',\n 'mac_address': [],\n 'release': 'fc2',\n 'reload_reason': 'reload',\n 'restarted': '',\n 'rommon': 'IOS-XE',\n 'running_image': 'packages.conf',\n 'serial': ['9FKLJWM5EB0'],\n 'software_image': 'X86_64_LINUX_IOSD-UNIVERSALK9-M',\n 'uptime': '2 hours, 43 minutes',\n 'uptime_days': '',\n 'uptime_hours': '2',\n 'uptime_minutes': '43',\n 'uptime_weeks': '',\n 'uptime_years': '',\n 'version': '16.4.1'}]\n\x1b[1m\x1b[32m---- send_commands ** changed : False ------------------------------------------ INFO\n[ { 'distance': '',\n 'metric': '',\n 'network': '10.0.0.0',\n 'nexthop_if': 'GigabitEthernet1',\n 'nexthop_ip': '',\n 'nexthop_vrf': '',\n 'prefix_length': '24',\n 'protocol': 'C',\n 'type': '',\n 'uptime': '',\n 'vrf': ''},\n { 'distance': '',\n 'metric': '',\n 'network': '10.0.0.15',\n 'nexthop_if': 'GigabitEthernet1',\n 'nexthop_ip': '',\n 'nexthop_vrf': '',\n 'prefix_length': '32',\n 'protocol': 'L',\n 'type': '',\n 'uptime': '',\n 'vrf': ''}]\n\x1b[1m\x1b[32m^^^^ END send_commands ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
),
(
False,
Expand Down Expand Up @@ -184,7 +184,7 @@ def test_print_structured_result_fallback(capsys):
captured = capsys.readouterr()
assert (
captured.out
== """\x1b[1m\x1b[36msend_commands*******************************************************************\n\x1b[1m\x1b[34m* sea-ios-1 ** changed : False *************************************************\n\x1b[1m\x1b[32mvvvv send_commands ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\nCisco IOS XE Software, Version 16.04.01\nCisco IOS Software [Everest], CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.4.1, RELEASE SOFTWARE (fc2)\nTechnical Support: http://www.cisco.com/techsupport\nCopyright (c) 1986-2016 by Cisco Systems, Inc.\nCompiled Sun 27-Nov-16 13:02 by mcpre\n\n\nCisco IOS-XE software, Copyright (c) 2005-2016 by cisco Systems, Inc.\nAll rights reserved. Certain components of Cisco IOS-XE software are\nlicensed under the GNU General Public License ("GPL") Version 2.0. The\nsoftware code licensed under GPL Version 2.0 is free software that comes\nwith ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such\nGPL code under the terms of GPL Version 2.0. For more details, see the\ndocumentation or "License Notice" file accompanying the IOS-XE software,\nor the applicable URL provided on the flyer accompanying the IOS-XE\nsoftware.\n\n\nROM: IOS-XE ROMMON\n\ncsr1000v uptime is 2 hours, 43 minutes\nUptime for this control processor is 2 hours, 45 minutes\nSystem returned to ROM by reload\nSystem image file is "bootflash:packages.conf"\nLast reload reason: reload\n\n\n\nThis product contains cryptographic features and is subject to United\nStates and local country laws governing import, export, transfer and\nuse. Delivery of Cisco cryptographic products does not imply\nthird-party authority to import, export, distribute or use encryption.\nImporters, exporters, distributors and users are responsible for\ncompliance with U.S. and local country laws. By using this product you\nagree to comply with applicable laws and regulations. If you are unable\nto comply with U.S. and local laws, return this product immediately.\n\nA summary of U.S. laws governing Cisco cryptographic products may be found at:\nhttp://www.cisco.com/wwl/export/crypto/tool/stqrg.html\n\nIf you require further assistance please contact us by sending email to\n[email protected].\n\nLicense Level: ax\nLicense Type: Default. No valid license found.\nNext reload license Level: ax\n\ncisco CSR1000V (VXE) processor (revision VXE) with 2052375K/3075K bytes of memory.\nProcessor board ID 9FKLJWM5EB0\n10 Gigabit Ethernet interfaces\n32768K bytes of non-volatile configuration memory.\n3985132K bytes of physical memory.\n7774207K bytes of virtual hard disk at bootflash:.\n0K bytes of at webui:.\n\nConfiguration register is 0x2102\n\ncsr1000v#\n\x1b[1m\x1b[32m---- send_commands ** changed : False ------------------------------------------ INFO\n[ { \'distance\': \'\',\n \'mask\': \'24\',\n \'metric\': \'\',\n \'network\': \'10.0.0.0\',\n \'nexthop_if\': \'GigabitEthernet1\',\n \'nexthop_ip\': \'\',\n \'nexthop_vrf\': \'\',\n \'protocol\': \'C\',\n \'type\': \'\',\n \'uptime\': \'\',\n \'vrf\': \'\'},\n { \'distance\': \'\',\n \'mask\': \'32\',\n \'metric\': \'\',\n \'network\': \'10.0.0.15\',\n \'nexthop_if\': \'GigabitEthernet1\',\n \'nexthop_ip\': \'\',\n \'nexthop_vrf\': \'\',\n \'protocol\': \'L\',\n \'type\': \'\',\n \'uptime\': \'\',\n \'vrf\': \'\'}]\n\x1b[1m\x1b[32m^^^^ END send_commands ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"""
== """\x1b[1m\x1b[36msend_commands*******************************************************************\n\x1b[1m\x1b[34m* sea-ios-1 ** changed : False *************************************************\n\x1b[1m\x1b[32mvvvv send_commands ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\nCisco IOS XE Software, Version 16.04.01\nCisco IOS Software [Everest], CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.4.1, RELEASE SOFTWARE (fc2)\nTechnical Support: http://www.cisco.com/techsupport\nCopyright (c) 1986-2016 by Cisco Systems, Inc.\nCompiled Sun 27-Nov-16 13:02 by mcpre\n\n\nCisco IOS-XE software, Copyright (c) 2005-2016 by cisco Systems, Inc.\nAll rights reserved. Certain components of Cisco IOS-XE software are\nlicensed under the GNU General Public License ("GPL") Version 2.0. The\nsoftware code licensed under GPL Version 2.0 is free software that comes\nwith ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such\nGPL code under the terms of GPL Version 2.0. For more details, see the\ndocumentation or "License Notice" file accompanying the IOS-XE software,\nor the applicable URL provided on the flyer accompanying the IOS-XE\nsoftware.\n\n\nROM: IOS-XE ROMMON\n\ncsr1000v uptime is 2 hours, 43 minutes\nUptime for this control processor is 2 hours, 45 minutes\nSystem returned to ROM by reload\nSystem image file is "bootflash:packages.conf"\nLast reload reason: reload\n\n\n\nThis product contains cryptographic features and is subject to United\nStates and local country laws governing import, export, transfer and\nuse. Delivery of Cisco cryptographic products does not imply\nthird-party authority to import, export, distribute or use encryption.\nImporters, exporters, distributors and users are responsible for\ncompliance with U.S. and local country laws. By using this product you\nagree to comply with applicable laws and regulations. If you are unable\nto comply with U.S. and local laws, return this product immediately.\n\nA summary of U.S. laws governing Cisco cryptographic products may be found at:\nhttp://www.cisco.com/wwl/export/crypto/tool/stqrg.html\n\nIf you require further assistance please contact us by sending email to\n[email protected].\n\nLicense Level: ax\nLicense Type: Default. No valid license found.\nNext reload license Level: ax\n\ncisco CSR1000V (VXE) processor (revision VXE) with 2052375K/3075K bytes of memory.\nProcessor board ID 9FKLJWM5EB0\n10 Gigabit Ethernet interfaces\n32768K bytes of non-volatile configuration memory.\n3985132K bytes of physical memory.\n7774207K bytes of virtual hard disk at bootflash:.\n0K bytes of at webui:.\n\nConfiguration register is 0x2102\n\ncsr1000v#\n\x1b[1m\x1b[32m---- send_commands ** changed : False ------------------------------------------ INFO\n[ { \'distance\': \'\',\n \'metric\': \'\',\n \'network\': \'10.0.0.0\',\n \'nexthop_if\': \'GigabitEthernet1\',\n \'nexthop_ip\': \'\',\n \'nexthop_vrf\': \'\',\n \'prefix_length\': \'24\',\n \'protocol\': \'C\',\n \'type\': \'\',\n \'uptime\': \'\',\n \'vrf\': \'\'},\n { \'distance\': \'\',\n \'metric\': \'\',\n \'network\': \'10.0.0.15\',\n \'nexthop_if\': \'GigabitEthernet1\',\n \'nexthop_ip\': \'\',\n \'nexthop_vrf\': \'\',\n \'prefix_length\': \'32\',\n \'protocol\': \'L\',\n \'type\': \'\',\n \'uptime\': \'\',\n \'vrf\': \'\'}]\n\x1b[1m\x1b[32m^^^^ END send_commands ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"""
)


Expand Down

0 comments on commit b2b2738

Please sign in to comment.