<86>Jul 25 08:11:12 userdel[3041828]: delete user 'rooter' <86>Jul 25 08:11:12 userdel[3041828]: removed group 'rooter' owned by 'rooter' <86>Jul 25 08:11:12 userdel[3041828]: removed shadow group 'rooter' owned by 'rooter' <86>Jul 25 08:11:12 groupadd[3041839]: group added to /etc/group: name=rooter, GID=2675 <86>Jul 25 08:11:12 groupadd[3041839]: group added to /etc/gshadow: name=rooter <86>Jul 25 08:11:12 groupadd[3041839]: new group: name=rooter, GID=2675 <86>Jul 25 08:11:12 useradd[3041851]: new user: name=rooter, UID=2675, GID=2675, home=/root, shell=/bin/bash, from=none <86>Jul 25 08:11:12 userdel[3041873]: delete user 'builder' <86>Jul 25 08:11:12 userdel[3041873]: removed group 'builder' owned by 'builder' <86>Jul 25 08:11:12 userdel[3041873]: removed shadow group 'builder' owned by 'builder' <86>Jul 25 08:11:12 groupadd[3041891]: group added to /etc/group: name=builder, GID=2676 <86>Jul 25 08:11:12 groupadd[3041891]: group added to /etc/gshadow: name=builder <86>Jul 25 08:11:12 groupadd[3041891]: new group: name=builder, GID=2676 <86>Jul 25 08:11:12 useradd[3041909]: new user: name=builder, UID=2676, GID=2676, home=/usr/src, shell=/bin/bash, from=none <13>Jul 25 08:11:14 rpmi: libgdbm6-1.26-alt1 sisyphus+418729.200.2.1 1779276077 installed <13>Jul 25 08:11:14 rpmi: libgdbm_compat4-1.26-alt1 sisyphus+418729.200.2.1 1779276077 installed <13>Jul 25 08:11:14 rpmi: libsqlite3-3.50.4-alt1 sisyphus+391668.100.1.1 1754321138 installed <13>Jul 25 08:11:14 rpmi: libmpdec3-2.5.1-alt3 sisyphus+314490.500.5.1 1675432033 installed <13>Jul 25 08:11:14 rpmi: libexpat-2.7.4-alt1 sisyphus+407132.100.1.1 1770196717 installed <13>Jul 25 08:11:14 rpmi: openssl-config-3.5.0-alt1 sisyphus+399237.100.1.1 1762346864 installed <13>Jul 25 08:11:14 rpmi: libp11-kit-1:0.26.2-alt3.g0eedd4d sisyphus+424637.100.1.1 1783530782 installed <13>Jul 25 08:11:14 rpmi: libtasn1-4.21.0-alt2 sisyphus+420751.100.1.1 1781163748 installed <13>Jul 25 08:11:14 rpmi: rpm-macros-alternatives-0.5.3-alt1 sisyphus+371878.100.1.1 1737988822 installed <13>Jul 25 08:11:14 rpmi: alternatives-0.5.3-alt1 sisyphus+371878.100.1.1 1737988822 installed <13>Jul 25 08:11:14 rpmi: ca-certificates-2026.04.22-alt1 sisyphus+415942.100.6.1 1777316293 installed <13>Jul 25 08:11:14 rpmi: ca-trust-0.2.0-alt1 sisyphus+344843.100.1.1 1712743326 installed <13>Jul 25 08:11:14 rpmi: p11-kit-trust-1:0.26.2-alt3.g0eedd4d sisyphus+424637.100.1.1 1783530782 installed <13>Jul 25 08:11:14 rpmi: libcrypto3-3.5.7-alt1 sisyphus+425332.100.3.1 1784733668 installed <13>Jul 25 08:11:14 rpmi: libssl3-3.5.7-alt1 sisyphus+425332.100.3.1 1784733668 installed <13>Jul 25 08:11:14 rpmi: python3-modules-sqlite3-3.14.6-alt1 sisyphus+423624.100.33.1 1784227742 installed <13>Jul 25 08:11:14 rpmi: python3-3.14.6-alt1 sisyphus+423624.100.33.1 1784227742 installed <13>Jul 25 08:11:15 rpmi: python3-base-3.14.6-alt1 sisyphus+423624.100.33.1 1784227742 installed <13>Jul 25 08:11:15 rpmi: python3-module-py3dephell-0.3.1-alt1 sisyphus+365261.200.1.1 1734463433 installed <13>Jul 25 08:11:15 rpmi: tests-for-installed-python3-pkgs-0.1.29-alt1 sisyphus+398029.2500.12.1 1762716341 installed <13>Jul 25 08:11:15 rpmi: rpm-build-python3-0.1.29-alt1 sisyphus+398029.2500.12.1 1762716341 installed <13>Jul 25 08:11:16 rpmi: python3-module-packaging-26.2-alt1 sisyphus+416502.100.2.1 1777385153 installed <13>Jul 25 08:11:16 rpmi: python3-module-platformdirs-4.10.0-alt1 sisyphus+419460.100.1.1 1779982322 installed <13>Jul 25 08:11:16 rpmi: python3-module-system-seed-wheels-0.0.2-alt1 sisyphus+384227.200.3.1 1747487299 installed <13>Jul 25 08:11:16 rpmi: python3-module-more-itertools-11.1.0-alt1 sisyphus+419223.100.2.1 1779891386 installed <13>Jul 25 08:11:16 rpmi: python3-module-jaraco.functools-4.6.0-alt1 sisyphus+425293.100.1.2 1784631981 installed <13>Jul 25 08:11:16 rpmi: python3-module-shellingham-1.5.4-alt1 sisyphus+332574.100.1.1 1698135363 installed <13>Jul 25 08:11:16 rpmi: python3-module-filelock-3.25.2-alt1.1 sisyphus+413497.1200.2.1 1774829675 installed <13>Jul 25 08:11:16 rpmi: python3-module-fastjsonschema-2.21.2-alt1 sisyphus+393815.100.1.1 1756817231 installed <13>Jul 25 08:11:16 rpmi: python3-module-urllib3-2:2.7.0-alt2 sisyphus+423624.121100.34.1 1784353520 installed <13>Jul 25 08:11:16 rpmi: python3-module-idna-3.18-alt1 sisyphus+420750.100.1.1 1781166339 installed <13>Jul 25 08:11:16 rpmi: python3-module-propcache-0.5.2-alt1 sisyphus+423624.3300.33.1 1784229893 installed <13>Jul 25 08:11:16 rpmi: python3-module-multidict-6.7.1-alt1 sisyphus+423624.3200.33.1 1784229862 installed <13>Jul 25 08:11:16 rpmi: python3-module-typing_extensions-4.15.0-alt2 sisyphus+399838.100.1.1 1762946472 installed <13>Jul 25 08:11:16 rpmi: python3-module-frozenlist-1.8.0-alt1 sisyphus+423624.3000.33.1 1784229800 installed <13>Jul 25 08:11:16 rpmi: python3-module-Pygments-2.20.0-alt1 sisyphus+413985.100.1.1 1775208360 installed <13>Jul 25 08:11:16 rpmi: python3-module-aiosignal-1.4.0-alt1 sisyphus+389519.40.2.1 1752483607 installed <13>Jul 25 08:11:16 rpmi: python3-module-yarl-1.24.2-alt1 sisyphus+423624.3500.33.1 1784230065 installed <13>Jul 25 08:11:16 rpmi: python3-module-python-discovery-1.4.4-alt1 sisyphus+424706.100.1.1 1783598324 installed <13>Jul 25 08:11:16 rpmi: python3-module-pip-wheel-26.1.2-alt1 sisyphus+419707.100.2.1 1780313939 installed <13>Jul 25 08:11:16 rpmi: python3-module-setuptools-wheel-1:83.0.0-alt1 sisyphus+424341.100.2.1 1783427124 installed <13>Jul 25 08:11:16 rpmi: python3-module-system-seed-wheels-wheels-0.0.2-alt1 sisyphus+384227.200.3.1 1747487299 installed <13>Jul 25 08:11:16 rpmi: python3-module-findpython-0.7.1-alt1 sisyphus+415217.400.1.1 1776350955 installed <13>Jul 25 08:11:16 rpmi: python3-module-wheel-0.47.0-alt1 sisyphus+416101.100.1.1 1776938753 installed <13>Jul 25 08:11:16 rpmi: python3-module-tomlkit-0.14.0-alt1 sisyphus+407344.100.1.1 1770368823 installed <13>Jul 25 08:11:16 rpmi: python3-module-tomli-2.4.1-alt1.1 sisyphus+413490.300.2.1 1774831804 installed <13>Jul 25 08:11:16 rpmi: python3-module-poetry-alt-namespace-0.0.1-alt1 sisyphus+306728.100.1.1 1663083685 installed <13>Jul 25 08:11:16 rpmi: python3-module-pluggy-1.6.0-alt1.1 sisyphus+413474.300.2.1 1774829688 installed <13>Jul 25 08:11:16 rpmi: python3-module-pkginfo-1.12.1.2-alt2.1 sisyphus+413484.200.1.2 1774825432 installed <13>Jul 25 08:11:16 rpmi: python3-module-pbs-installer-2026.04.07-alt1 sisyphus+415217.600.1.1 1776351039 installed <13>Jul 25 08:11:16 rpmi: python3-module-six-1.17.0-alt1.1 sisyphus+373470.100.1.1 1738920023 installed <13>Jul 25 08:11:16 rpmi: python3-module-textfsm-1.1.3-alt1 sisyphus+334164.600.4.1 1700071691 installed <13>Jul 25 08:11:16 rpmi: python3-module-ruamel-yaml-0.18.5-alt1.1 sisyphus+376369.14600.10.1 1746630536 installed <13>Jul 25 08:11:17 rpmi: python3-module-lark-1.3.1-alt2 sisyphus+413685.100.1.1 1774947082 installed <13>Jul 25 08:11:17 rpmi: python3-module-poetry-core-2.4.1-alt1 sisyphus+419127.100.2.1 1779717398 installed <13>Jul 25 08:11:17 rpmi: python3-module-uc-micro-py-2.0.0-alt1 sisyphus+411114.100.1.1 1773327270 installed <13>Jul 25 08:11:17 rpmi: python3-module-linkify-it-py-2.1.0-alt1.1 sisyphus+413476.100.1.1 1774817789 installed <13>Jul 25 08:11:17 rpmi: python3-module-mdurl-0.1.2-alt1 sisyphus+318894.1000.3.1 1682420700 installed <13>Jul 25 08:11:17 rpmi: python3-module-markdown-it-4.0.0-alt1 sisyphus+394327.100.1.1 1757330325 installed <13>Jul 25 08:11:17 rpmi: python3-module-rich-15.0.0-alt1 sisyphus+415092.100.2.1 1776162196 installed <13>Jul 25 08:11:17 rpmi: python3-module-jaraco.context-6.1.2-alt1 sisyphus+412384.100.1.1 1774283927 installed <13>Jul 25 08:11:17 rpmi: python3-module-installer-1.0.1-alt1 sisyphus+418210.100.1.1 1778834707 installed <13>Jul 25 08:11:17 rpmi: python3-module-iniconfig-2.3.0-alt1 sisyphus+397749.100.2.1 1761040670 installed <13>Jul 25 08:11:17 rpmi: python3-module-fastimport-0.9.16-alt1 sisyphus+399246.100.1.1 1762354708 installed <13>Jul 25 08:11:17 rpmi: python3-module-dns-1:2.8.0-alt1 sisyphus+410244.100.2.1 1772799795 installed <13>Jul 25 08:11:17 rpmi: python3-module-distlib-0.4.3-alt1 sisyphus+421408.100.1.1 1781515263 installed <13>Jul 25 08:11:17 rpmi: python3-module-virtualenv-21.6.1-alt1 sisyphus+425273.100.2.2 1784633155 installed <13>Jul 25 08:11:17 rpmi: python3-module-cleo-2.2.1-alt1 sisyphus+362876.200.1.1 1731956909 installed <13>Jul 25 08:11:17 rpmi: python3-module-pycparser-2.23-alt1 sisyphus+410417.100.1.1 1772989663 installed <13>Jul 25 08:11:17 rpmi: python3-module-cffi-2.1.0-alt1 sisyphus+423624.540.33.1 1784228272 installed <13>Jul 25 08:11:17 rpmi: python3-module-cryptography-49.0.0-alt1 sisyphus+423624.1000.33.1 1784228350 installed <13>Jul 25 08:11:17 rpmi: python3-module-openssl-26.3.0-alt1 sisyphus+422651.200.1.1 1782380583 installed <13>Jul 25 08:11:17 rpmi: python3-module-charset-normalizer-3.4.9-alt1 sisyphus+424623.100.1.1 1783521675 installed <13>Jul 25 08:11:17 rpmi: python3-module-requests-2.34.2-alt1 sisyphus+418161.200.3.1 1779090568 installed <13>Jul 25 08:11:17 rpmi: python3-module-requests_toolbelt-1.0.0-alt3 sisyphus+338996.100.1.1 1706201427 installed <13>Jul 25 08:11:17 rpmi: python3-module-msgpack-1.1.2-alt1 sisyphus+423624.2260.33.1 1784229029 installed <13>Jul 25 08:11:17 rpmi: python3-module-cachecontrol-0.14.4-alt1.1 sisyphus+407625.300.1.1 1770565054 installed <13>Jul 25 08:11:17 rpmi: python3-module-pyproject_hooks-1.2.0-alt1 sisyphus+386406.100.1.1 1749203250 installed <13>Jul 25 08:11:17 rpmi: python3-module-build-1.5.1-alt1 sisyphus+424770.100.1.1 1783674248 installed <13>Jul 25 08:11:17 rpmi: python3-module-bcrypt-5.0.0-alt1 sisyphus+423624.5400.33.1 1784230881 installed <13>Jul 25 08:11:17 rpmi: python3-module-annotated_doc-0.0.4-alt1 sisyphus+401429.100.1.1 1764433640 installed <13>Jul 25 08:11:17 rpmi: python3-module-typer-0.27.0-alt1 sisyphus+426477.440.2.1 1784895769 installed <13>Jul 25 08:11:17 rpmi: python3-module-typer-slim-0.27.0-alt1 sisyphus+426477.440.2.1 1784895769 installed <13>Jul 25 08:11:17 rpmi: python3-module-jaraco.text-4.2.0-alt1 sisyphus+408107.100.3.1 1771429608 installed <13>Jul 25 08:11:17 rpmi: python3-module-pkg-resources-1:80.10.2-alt2.1 sisyphus+413485.1000.2.3 1774838477 installed <13>Jul 25 08:11:17 rpmi: python3-module-attrs-26.1.0-alt1 sisyphus+414432.100.1.1 1775561563 installed <13>Jul 25 08:11:17 rpmi: python3-module-aiohappyeyeballs-2.7.1-alt1 sisyphus+426561.100.1.1 1784892115 installed <13>Jul 25 08:11:17 rpmi: libsodium26-1.0.22-alt1 sisyphus+415782.100.2.1 1777093649 installed <13>Jul 25 08:11:17 rpmi: python3-module-pynacl-1.6.2-alt1 sisyphus+407150.100.2.1 1770214913 installed <13>Jul 25 08:11:17 rpmi: python3-module-paramiko-4.0.0-alt1.1 sisyphus+413471.100.1.1 1774817498 installed <13>Jul 25 08:11:17 rpmi: python3-module-scp-0.15.0-alt1 sisyphus+349076.100.1.1 1716560276 installed <13>Jul 25 08:11:17 rpmi: libpython3-3.14.6-alt1 sisyphus+423624.100.33.1 1784227742 installed <13>Jul 25 08:11:18 rpmi: python3-dev-3.14.6-alt1 sisyphus+423624.100.33.1 1784227742 installed <13>Jul 25 08:11:18 rpmi: libllhttp-9.4.2-alt1 sisyphus+421860.100.1.1 1781867203 installed <13>Jul 25 08:11:18 rpmi: python3-module-aiohttp-3.14.1-alt2 sisyphus+423624.4700.33.1 1784230460 installed <13>Jul 25 08:11:18 rpmi: python3-module-dulwich-1.2.12-alt1 sisyphus+425297.200.2.1 1784717431 installed <13>Jul 25 08:11:18 rpmi: libusb-1.0.29-alt1 sisyphus+390802.100.1.1 1753485381 installed <13>Jul 25 08:11:18 rpmi: libhidapi-0.15.0-alt1 sisyphus+384789.100.1.1 1747810467 installed <13>Jul 25 08:11:18 rpmi: python3-module-cython-hidapi-0.15.0-alt1 sisyphus+423624.4500.33.1 1784230363 installed <13>Jul 25 08:11:18 rpmi: python3-module-serial-3.5-alt3 sisyphus+360600.100.2.1 1729786231 installed <13>Jul 25 08:11:18 rpmi: python3-module-netmiko-4.6.0-alt1 sisyphus+391602.100.1.1 1754198914 installed <13>Jul 25 08:11:18 rpmi: python3-module-poetry-2.4.1-alt1 sisyphus+418102.100.1.1 1778752274 installed <13>Jul 25 08:11:18 rpmi: python3-module-setuptools-1:83.0.0-alt1 sisyphus+424341.100.2.1 1783427124 installed <13>Jul 25 08:11:18 rpmi: python3-module-ttp-0.9.5-alt2 sisyphus+334469.100.2.1 1700146901 installed <13>Jul 25 08:11:18 rpmi: python3-module-pytest-9.0.3-alt1 sisyphus+414567.100.1.1 1775647126 installed <13>Jul 25 08:11:18 rpmi: python3-module-cerberus-1.3.8-alt1 sisyphus+406242.100.1.1 1769411599 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-ttp_templates-0.3.6-alt1.nosrc.rpm (w1.gzdio) <13>Jul 25 08:11:19 rpmi: python3-module-pyproject-installer-0.6.0-alt1 sisyphus+424779.100.1.1 1783678406 installed Installing python3-module-ttp_templates-0.3.6-alt1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpmb-tmp.7iScSl + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf ttp_templates-0.3.6 + echo 'Source #0 (ttp_templates-0.3.6.tar):' Source #0 (ttp_templates-0.3.6.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/ttp_templates-0.3.6.tar + cd ttp_templates-0.3.6 + /bin/chmod -c -Rf u+rwX,go-w . + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpmb-tmp.cWU8hv + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd ttp_templates-0.3.6 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + /usr/bin/python3 -m pyproject_installer -v build INFO : pyproject_installer.build_cmd._build : Building wheel INFO : pyproject_installer.build_cmd._build : Source tree: /usr/src/RPM/BUILD/ttp_templates-0.3.6 INFO : pyproject_installer.build_cmd._build : Output dir: /usr/src/RPM/BUILD/ttp_templates-0.3.6/dist DEBUG : pyproject_installer.lib.build_backend : Validating source path DEBUG : pyproject_installer.lib.build_backend : Checking for PEP517 spec DEBUG : pyproject_installer.lib.build_backend : Parsing configuration file: /usr/src/RPM/BUILD/ttp_templates-0.3.6/pyproject.toml INFO : backend_caller.py : Calling hook build_wheel in subprocess INFO : backend_caller.py : Build backend: poetry.core.masonry.api INFO : backend_caller.py : Hook args: ['/usr/src/RPM/BUILD/ttp_templates-0.3.6/dist'] INFO : backend_caller.py : Hook kwargs: {'config_settings': None} WARNING : poetry.core.factory : The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. INFO : poetry.core.masonry.builders.wheel : Building wheel DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/__init__.py DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/A10.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/Cisco_IOS.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/Cisco_NXOS.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/Huawei.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/arista_eos.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/cisco_xr.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/fortinet.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ip_data/readme.md DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_isis_data/cisco_xr.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_isis_data/juniper.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_isis_data/readme.md DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_l2_data/Cisco_IOS.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_l2_data/Cisco_NXOS.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_l2_data/Huawei.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_l2_data/cisco_xr.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_l2_data/juniper.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_l2_data/readme.md DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ospf_data/Cisco_IOS.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ospf_data/Huawei.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ospf_data/cisco_xr.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/N2G/cli_ospf_data/readme.md DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netbox/parse_arista_eos_config.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netbox/parse_cisco_nxos_config.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netbox/parse_cisco_xr_config.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netbox/parse_juniper_junos_config.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netbox/parse_opengear_config.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.ios.arp.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.ios.cfg.bgp.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.ios.cfg.interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.ios.cfg.ip.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.ios.cfg.nat.static.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.iosxr.arp.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.iosxr.cfg.interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/cisco.iosxr.cfg.ip.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/huawei.vrp.cfg.interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/Netmiko/huawei.vrp.cfg.ip.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/ttp_templates_tests/cisco_ios_interfaces_cfg_per_ip.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/misc/ttp_templates_tests/netmiko_cisco_ios_interfaces.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/arista_eos_show_hostname.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_ip_arp.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_ip_ospf_database_external.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_ip_ospf_database_router.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_ip_ospf_database_summary.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_isdn_status.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_running_config_pipe_include_source_static.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_running_config_pipe_section_interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_ios_show_running_configuration_pipe_section_bgp.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_xr_show_arp_vrf_all.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_xr_show_isis_database_verbose.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_xr_show_ospf_database_external.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_xr_show_ospf_database_router.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_xr_show_ospf_database_summary.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/cisco_xr_show_running_config_interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/huawei_display_current_configuration_interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/huawei_display_ospf_lsdb_router.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/juniper_show_isis_database_verbose_pipe_no_more.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/platform/test_platform_show_run_pipe_sec_interface.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/ttp_templates.py DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/ttp_vars.py DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/yang/ietf-interfaces_cisco_ios.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/yang/openconfig-lldp_cisco_ios.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/yang/openconfig-lldp_cisco_nxos.txt DEBUG : poetry.core.masonry.builders.builder : Adding: /usr/src/RPM/BUILD/ttp_templates-0.3.6/ttp_templates/yang/openconfig-lldp_cisco_xr.txt INFO : poetry.core.masonry.builders.wheel : Built ttp_templates-0.3.6-py3-none-any.whl INFO : pyproject_installer.build_cmd._build : Built wheel: ttp_templates-0.3.6-py3-none-any.whl + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpmb-tmp.cUXMEQ + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-ttp_templates-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-ttp_templates-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/usr/bin:/bin:/usr/local/bin:/usr/games + cd ttp_templates-0.3.6 + /usr/bin/python3 -m pyproject_installer -v install --destdir=/usr/src/tmp/python3-module-ttp_templates-buildroot INFO : pyproject_installer.install_cmd._install : Installing wheel INFO : pyproject_installer.install_cmd._install : Wheel directory: /usr/src/RPM/BUILD/ttp_templates-0.3.6/dist INFO : pyproject_installer.install_cmd._install : Wheel filename: ttp_templates-0.3.6-py3-none-any.whl INFO : pyproject_installer.install_cmd._install : Destination: /usr/src/tmp/python3-module-ttp_templates-buildroot DEBUG : pyproject_installer.lib.wheel : Parsing wheel filename DEBUG : pyproject_installer.lib.wheel : Validating wheel file DEBUG : pyproject_installer.lib.wheel : Validating wheel spec version DEBUG : pyproject_installer.lib.wheel : Parsing wheel spec metadata DEBUG : pyproject_installer.lib.wheel : Validating RECORD INFO : pyproject_installer.install_cmd._install : Wheel installation root: /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: ttp_templates-0.3.6.dist-info/WHEEL DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: ttp_templates-0.3.6.dist-info/licenses/LICENSE DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: ttp_templates-0.3.6.dist-info/RECORD INFO : pyproject_installer.install_cmd._install : Extracting wheel INFO : pyproject_installer.install_cmd._install : Wheel was installed + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-ttp_templates-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-ttp_templates-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-ttp_templates-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-ttp_templates-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-ttp_templates-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-ttp_templates-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Splitting links to aliased files under /{,s}bin in /usr/src/tmp/python3-module-ttp_templates-buildroot Bytecompiling python3 modules in /usr/src/tmp/python3-module-ttp_templates-buildroot using /usr/bin/python3 compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/__init__.py compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/ttp_templates.py compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/ttp_vars.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-ttp_templates-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/__init__.py compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/ttp_templates.py compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/ttp_vars.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-ttp_templates-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/__init__.py compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/ttp_templates.py compile /usr/src/tmp/python3-module-ttp_templates-buildroot/usr/lib/python3/site-packages/ttp_templates/ttp_vars.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/ttp_templates/__pycache__/__init__.cpython-314.opt-1.pyc' => './usr/lib/python3/site-packages/ttp_templates/__pycache__/__init__.cpython-314.pyc' './usr/lib/python3/site-packages/ttp_templates/__pycache__/__init__.cpython-314.opt-2.pyc' => './usr/lib/python3/site-packages/ttp_templates/__pycache__/__init__.cpython-314.opt-1.pyc' './usr/lib/python3/site-packages/ttp_templates/__pycache__/ttp_templates.cpython-314.opt-1.pyc' => './usr/lib/python3/site-packages/ttp_templates/__pycache__/ttp_templates.cpython-314.pyc' './usr/lib/python3/site-packages/ttp_templates/__pycache__/ttp_vars.cpython-314.opt-1.pyc' => './usr/lib/python3/site-packages/ttp_templates/__pycache__/ttp_vars.cpython-314.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpmb-tmp.pdHm9j + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd ttp_templates-0.3.6 + cp -r ttp_templates/misc/Netmiko ttp_templates/misc/netmiko + pushd test ~/RPM/BUILD/ttp_templates-0.3.6/test ~/RPM/BUILD/ttp_templates-0.3.6 + python3 -m pytest -k 'not (yangson or test_yang_ietf_interfaces)' ============================= test session starts ============================== platform linux -- Python 3.14.6, pytest-9.0.3, pluggy-1.6.0 rootdir: /usr/src/RPM/BUILD/ttp_templates-0.3.6 configfile: pyproject.toml collected 39 items / 1 deselected / 38 selected test_misc_netmiko_templates.py FFFFFFFFFF [ 26%] test_n2g_templates.py FFFFFF [ 42%] test_platform_arista_eos.py F [ 44%] test_platform_cisco_ios.py FFFFF [ 57%] test_platform_cisco_xr.py F [ 60%] test_platform_huawei.py F [ 63%] test_platform_juniper.py F [ 65%] test_ttp_templates_methods.py ...FFFF... [ 92%] test_yang_openconfig_lldp.py FFF [100%] =================================== FAILURES =================================== ____________________ test_cisco_ios_arp_original_intf_names ____________________ def test_cisco_ios_arp_original_intf_names(): > res = connection_cisco_ios.run_ttp( "ttp://misc/netmiko/cisco.ios.arp.txt", res_kwargs={"structure": "flat_list"} ) test_misc_netmiko_templates.py:236: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________ test_cisco_ios_cfg_ip_original_intf_names ___________________ def test_cisco_ios_cfg_ip_original_intf_names(): > res = connection_cisco_ios.run_ttp( "ttp://misc/netmiko/cisco.ios.cfg.ip.txt", res_kwargs={"structure": "flat_list"} ) test_misc_netmiko_templates.py:272: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ____________________ test_cisco_ios_cfg_ip_short_intf_names ____________________ def test_cisco_ios_cfg_ip_short_intf_names(): > res = connection_cisco_ios.run_ttp( "ttp://misc/netmiko/cisco.ios.cfg.ip.txt", res_kwargs={"structure": "flat_list"}, vars=ttp_vars.all_vars, ) test_misc_netmiko_templates.py:343: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ____________________ test_cisco_ios_xr_arp_short_intf_names ____________________ def test_cisco_ios_xr_arp_short_intf_names(): > res = connection_cisco_ios_xr.run_ttp( "ttp://misc/netmiko/cisco.iosxr.arp.txt", res_kwargs={"structure": "flat_list"}, vars={"short_interface_names": ttp_vars.short_interface_names}, ) test_misc_netmiko_templates.py:416: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________ test_cisco_ios_xr_arp_original_intf_names ___________________ def test_cisco_ios_xr_arp_original_intf_names(): > res = connection_cisco_ios_xr.run_ttp( "ttp://misc/netmiko/cisco.iosxr.arp.txt", res_kwargs={"structure": "flat_list"} ) test_misc_netmiko_templates.py:462: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________ test_huawei_vrp_cfg_ip_original_intf_names __________________ def test_huawei_vrp_cfg_ip_original_intf_names(): > res = connection_huawei_vrp.run_ttp( "ttp://misc/netmiko/huawei.vrp.cfg.ip.txt", res_kwargs={"structure": "flat_list"} ) test_misc_netmiko_templates.py:506: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ___________________ test_huawei_vrp_cfg_ip_short_intf_names ____________________ def test_huawei_vrp_cfg_ip_short_intf_names(): > res = connection_huawei_vrp.run_ttp( "ttp://misc/netmiko/huawei.vrp.cfg.ip.txt", res_kwargs={"structure": "flat_list"}, vars=ttp_vars.all_vars ) test_misc_netmiko_templates.py:554: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _________________ test_cisco_iosxr_cfg_ip_original_intf_names __________________ def test_cisco_iosxr_cfg_ip_original_intf_names(): > res = connection_cisco_ios_xr.run_ttp( "ttp://misc/netmiko/cisco.iosxr.cfg.ip.txt", res_kwargs={"structure": "flat_list"} ) test_misc_netmiko_templates.py:604: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ____________________________ test_cisco_ios_cfg_bgp ____________________________ def test_cisco_ios_cfg_bgp(): > res = connection_cisco_ios.run_ttp( "ttp://misc/netmiko/cisco.ios.cfg.bgp.txt", # res_kwargs={"structure": "flat_list"} ) test_misc_netmiko_templates.py:660: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ________________________ test_cisco_ios_cfg_nat_static _________________________ def test_cisco_ios_cfg_nat_static(): > res = connection_cisco_ios.run_ttp("ttp://misc/netmiko/cisco.ios.cfg.nat.static.txt") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_misc_netmiko_templates.py:711: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/netmiko/base_connection.py:2554: in run_ttp return run_ttp_template( /usr/lib/python3/site-packages/netmiko/utilities.py:498: in run_ttp_template parser = ttp(template=template, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ________________________ test_N2G_ospf_lsdb_Cisco_IOSXR ________________________ def test_N2G_ospf_lsdb_Cisco_IOSXR(): with open("./mock_data/cisco_xr_show_ip_ospf_database_router_external_summary_router-1.txt", "r") as f: data1 = f.read() with open("./mock_data/cisco_xr_show_ip_ospf_database_router_external_summary_router-2.txt", "r") as f: data2 = f.read() template = get_template(path="misc/N2G/cli_ospf_data/cisco_xr.txt") # print(template) > parser = ttp(template=template) ^^^^^^^^^^^^^^^^^^^^^^ test_n2g_templates.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _________________________ test_N2G_ospf_lsdb_Cisco_IOS _________________________ def test_N2G_ospf_lsdb_Cisco_IOS(): with open("./mock_data/cisco_ios_show_ip_ospf_database_router_external_summary_IOL4_ABR.txt", "r") as f: data = f.read() template = get_template(path="misc/N2G/cli_ospf_data/Cisco_IOS.txt") # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_n2g_templates.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________________ test_N2G_ospf_lsdb_huawei ___________________________ def test_N2G_ospf_lsdb_huawei(): with open("./mock_data/huawei_display_ospf_lsdb_router.txt", "r") as f: data = f.read() template = get_template(path="misc/N2G/cli_ospf_data/Huawei.txt") # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_n2g_templates.py:366: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________________ test_N2G_isis_lsdb_juniper __________________________ def test_N2G_isis_lsdb_juniper(): with open("./mock_data/juniper_show_isis_database_verbose_pipe_no_more.txt", "r") as f: data = f.read() template = get_template(path="misc/N2G/cli_isis_data/juniper.txt") print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_n2g_templates.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ----------------------------- Captured stdout call ----------------------------- Template to parse Juniper JunOS "show isis database extensive | no-more" output. commands = [ "show isis database extensive | no-more", ] platform = ["juniper", "juniper_junos"] _________________________ test_N2G_cli_l2_data_juniper _________________________ def test_N2G_cli_l2_data_juniper(): with open("./mock_data/test_N2G_cli_l2_data_juniper.txt", "r") as f: data = f.read() template = get_template(path="misc/N2G/cli_l2_data/juniper.txt") print(template) > parser = ttp(data=data, template=template, vars={"IfsNormalize": all_vars["short_interface_names"], "physical_ports": all_vars["physical_ports"]}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_n2g_templates.py:427: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ----------------------------- Captured stdout call ----------------------------- _______________________ test_N2G_cli_ip_data_arista_eos ________________________ def test_N2G_cli_ip_data_arista_eos(): with open("./mock_data/test_N2G_cli_ip_data_arista_eos.txt", "r") as f: data = f.read() template = get_template(path="misc/N2G/cli_ip_data/arista_eos.txt") # print(template) > parser = ttp(vars={"IfsNormalize": all_vars["short_interface_names"], "physical_ports": all_vars["physical_ports"]}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_n2g_templates.py:531: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ______________________________ test_show_hostname ______________________________ def test_show_hostname(): with open( "./mock_data/arista_eos_show_hostname.txt", "r" ) as f: data = f.read() template = get_template( platform="arista_eos", command="show hostname" ) pprint.pprint(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_arista_eos.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ----------------------------- Captured stdout call ----------------------------- ('\n' 'Template to parse Arista EOS "show hostname" command output\n' '\n' '\n' '\n' 'Hostname: {{ hostname }}\n' 'FQDN: {{ fqdn }}\n' '') _______________________ test_cisco_ios_show_isdn_status ________________________ def test_cisco_ios_show_isdn_status(): with open( "./mock_data/cisco_ios_show_isdn_status.txt", "r" ) as f: data = f.read() template = get_template( platform="cisco_ios", command="show isdn status" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_cisco_ios.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _________________ test_cisco_ios_show_ip_ospf_database_router __________________ def test_cisco_ios_show_ip_ospf_database_router(): with open( "./mock_data/cisco_ios_show_ip_ospf_database_router_IOL4_ABR.txt", "r" ) as f: data = f.read() template = get_template( platform="cisco_ios", command="show ip ospf database router" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_cisco_ios.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ________________ test_cisco_ios_show_ip_ospf_database_external _________________ def test_cisco_ios_show_ip_ospf_database_external(): with open( "./mock_data/cisco_ios_show_ip_ospf_database_external_IOL4_ABR.txt", "r" ) as f: data = f.read() template = get_template( platform="cisco_ios", command="show ip ospf database external" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_cisco_ios.py:271: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _________________ test_cisco_ios_show_ip_ospf_database_summary _________________ def test_cisco_ios_show_ip_ospf_database_summary(): with open( "./mock_data/cisco_ios_show_ip_ospf_database_summary_IOL4_ABR.txt", "r" ) as f: data = f.read() template = get_template( platform="cisco_ios", command="show ip ospf database summary" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_cisco_ios.py:350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ___ test_cisco_ios_cisco_ios_show_running_config_pipe_include_source_static ____ def test_cisco_ios_cisco_ios_show_running_config_pipe_include_source_static(): data = """ ip nat inside source static 10.10.10.10 3.3.3.3 extendable ip nat inside source static tcp 192.168.1.10 443 3.3.4.4 443 vrf VRF1000 extendable ip nat inside source static 192.168.2.10 3.3.4.5 vrf VRF1002 extendable ip nat inside source static tcp 192.168.3.10 3389 3.3.5.6 13389 extendable ip nat inside source static 20.20.20.20 6.6.6.6 extendable ip nat inside source static tcp 30.30.30.30 443 interface TenGigabitEthernet0/0/0 1443 """ template = get_template( platform="cisco_ios", command="show running-config | include source static" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_cisco_ios.py:433: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _________________ test_cisco_ios_show_ip_ospf_database_router __________________ def test_cisco_ios_show_ip_ospf_database_router(): with open( "./mock_data/cisco_xr_show_isis_database_verbose.txt", "r" ) as f: data = f.read() template = get_template( platform="cisco_xr", command="show isis database verbose" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_cisco_xr.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _____________________ test_huwei_display_ospf_lsdb_router ______________________ def test_huwei_display_ospf_lsdb_router(): with open("./mock_data/huawei_display_ospf_lsdb_router.txt", "r") as f: data = f.read() template = get_template(platform="huawei", command="display ospf lsdb router") # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_huawei.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _________ test_juniper_juniper_show_isis_database_verbose_pipe_no_more _________ def test_juniper_juniper_show_isis_database_verbose_pipe_no_more(): with open( "./mock_data/juniper_show_isis_database_verbose_pipe_no_more.txt", "r" ) as f: data = f.read() template = get_template( platform="juniper", command="show isis database verbose | no-more" ) # print(template) > parser = ttp(data=data, template=template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_platform_juniper.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________________ test_parse_output_platform __________________________ def test_parse_output_platform(): data = """ interface GigabitEthernet1/3.251 description Customer #32148 encapsulation dot1q 251 ip address 172.16.33.10 255.255.255.128 shutdown ! interface GigabitEthernet1/3.251 description Customer #32148 encapsulation dot1q 251 ip address 172.16.33.10 255.255.255.128 shutdown """ > result = parse_output( data=data, platform="Test Platform", command="show run | sec interface" ) test_ttp_templates_methods.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ttp_templates/ttp_templates.py:102: in parse_output parser = ttp(data=data, template=template, vars=template_vars) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ____________________________ test_parse_output_misc ____________________________ def test_parse_output_misc(): data = """ r1# show run | sec interfaces interface GigabitEthernet1 vrf forwarding MGMT ip address 10.223.89.55 255.255.255.0 negotiation auto no mop enabled interface GigabitEthernet1 vrf forwarding MGMT ip address 10.223.89.56 255.255.255.0 negotiation auto no mop enabled no mop sysid """ > result = parse_output( data=data, misc="ttp_templates_tests/cisco_ios_interfaces_cfg_per_ip.txt" ) test_ttp_templates_methods.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ttp_templates/ttp_templates.py:102: in parse_output parser = ttp(data=data, template=template, vars=template_vars) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError __________________________ test_parse_output_ttp_path __________________________ def test_parse_output_ttp_path(): data = """ interface GigabitEthernet1/3.251 description Customer #32148 encapsulation dot1q 251 ip address 172.16.33.10 255.255.255.128 shutdown ! interface GigabitEthernet1/3.251 description Customer #32148 encapsulation dot1q 251 ip address 172.16.33.10 255.255.255.128 shutdown """ > result = parse_output( data=data, path="ttp://platform/test_platform_show_run_pipe_sec_interface.txt" ) test_ttp_templates_methods.py:137: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ttp_templates/ttp_templates.py:102: in parse_output parser = ttp(data=data, template=template, vars=template_vars) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ____________________________ test_parse_output_path ____________________________ def test_parse_output_path(): data = """ interface GigabitEthernet1/3.251 description Customer #32148 encapsulation dot1q 251 ip address 172.16.33.10 255.255.255.128 shutdown ! interface GigabitEthernet1/3.251 description Customer #32148 encapsulation dot1q 251 ip address 172.16.33.10 255.255.255.128 shutdown """ > result = parse_output( data=data, path="platform/test_platform_show_run_pipe_sec_interface.txt" ) test_ttp_templates_methods.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ttp_templates/ttp_templates.py:102: in parse_output parser = ttp(data=data, template=template, vars=template_vars) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ________________________ test_openconfig_lldp_cisco_ios ________________________ def test_openconfig_lldp_cisco_ios(): data1 = """ switch1# show lldp nei details ------------------------------------------------ Local Intf: Te2/1/23 Chassis id: 1111.2222.3333 Port id: Te1/2 Port Description: TenGigabitEthernet1/2 System Name: r1.lab.local System Description: Cisco IOS Software, Catalyst 1234 L3 Switch Software (cat1234e-ENTSERVICESK9-M), Version 1534.1(1)SG, RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Sun 15-Apr-12 02:35 by p Time remaining: 92 seconds System Capabilities: B,R Enabled Capabilities: B,R Management Addresses: IP: 1.1.1.1 Auto Negotiation - supported, enabled Physical media capabilities: Other/unknown Media Attachment Unit type: 35 Vlan ID: - not advertised ------------------------------------------------ Local Intf: Te1/1/9 Chassis id: 4444.5555.6666 Port id: Gi1/1 Port Description: GigabitEthernet1/1 System Name: r5.lab.local System Description: Cisco IOS Software, C4321 Software (C4321-IPBASEK9-M), Version 143.0(2)SE7, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Thu 23-Oct-14 13:43 by prod_rel_team Time remaining: 103 seconds System Capabilities: B,R Enabled Capabilities: B Management Addresses: IP: 2.2.2.5 Auto Negotiation - not supported Physical media capabilities: 1000baseX(FD) Media Attachment Unit type: 24 Vlan ID: - not advertised """ data2 = """ switch333# show lldp nei details ------------------------------------------------ Local Intf: Te2/1/121 Chassis id: 7777.aaaa.bbbb Port id: Te1/2 Port Description: TenGigabitEthernet1/2 System Name: sw31.lab.local System Description: Cisco IOS Software, Catalyst 569 L3 Switch Software (cat569e-ENTSERVICESK9-M), Version 125.1(1)SG, RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Sun 15-Apr-12 02:35 by p Time remaining: 92 seconds System Capabilities: B,R Enabled Capabilities: B,R Management Addresses: IP: 31.1.1.1 Auto Negotiation - supported, enabled Physical media capabilities: Other/unknown Media Attachment Unit type: 35 Vlan ID: - not advertised ------------------------------------------------ Local Intf: Te1/1/9 Chassis id: 8888.bbbb.aaaa Port id: Gi1/1 Port Description: GigabitEthernet1/1 System Name: rcore-1234 System Description: Cisco IOS Software, C567E Software (C567E-IPBASEK9-M), Version 178.0(2)SE7, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Thu 23-Oct-14 13:43 by prod_rel_team Time remaining: 103 seconds System Capabilities: B,R Enabled Capabilities: B Management Addresses: IP: 123.4.4.44 Auto Negotiation - not supported Physical media capabilities: 1000baseLX(FD) Media Attachment Unit type: 24 Vlan ID: - not advertised """ template = get_template(yang="openconfig-lldp", platform="cisco_ios") # print(template) > parser = ttp(template=template, vars={"validate_with_yangson": False}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_yang_openconfig_lldp.py:113: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError ______________________ test_openconfig_lldp_cisco_ios_xr _______________________ def test_openconfig_lldp_cisco_ios_xr(): data1 = """ xr-route-1# show lldp nei det ------------------------------------------------ Local Interface: TenGigE0/0/0/0 Parent Interface: Bundle-Ether5 Chassis id: 1234.1234.1234 Port id: GigabitEthernet2/1/2 Port Description: some direct fibre patching System Name: core-route-1 System Description: Huawei Versatile Routing Platform Software VRP (R) software, Version 251.1 (CX632 V12345678) Copyright (C) 2000-2099 Huawei Technologies Co., Ltd. CX61-X29 Time remaining: 106 seconds Hold Time: 120 seconds System Capabilities: B,R Enabled Capabilities: B,R Management Addresses: IPv4 address: 1.1.1.11 Peer MAC Address: 66:33:88:65:11:22 ------------------------------------------------ Local Interface: HundredGigE0/0/2/0 Parent Interface: Bundle-Ether1 Chassis id: 4321.4321.4321 Port id: HundredGigE0/0/2/0 Port Description: to edge router 1 System Name: edge-route-1 System Description: 3.4.2, NCS-1234 Time remaining: 100 seconds Hold Time: 120 seconds System Capabilities: R Enabled Capabilities: R Management Addresses: IPv4 address: 2.2.2.2 Peer MAC Address: 66:33:88:65:11:11 """ data2 = """ xr-route-0# show lldp nei det ------------------------------------------------ Local Interface: TenGigE0/0/0/1 Parent Interface: Bundle-Ether5 Chassis id: 1234.1234.1234 Port id: GigabitEthernet2/1/2 Port Description: some direct fibre patching System Name: core-route-21 System Description: Huawei Versatile Routing Platform Software VRP (R) software, Version 251.1 (CX632 V12345678) Copyright (C) 2000-2099 Huawei Technologies Co., Ltd. CX61-X29 Time remaining: 106 seconds Hold Time: 120 seconds System Capabilities: B,R Enabled Capabilities: B,R Management Addresses: IPv4 address: 4.4.4.4 Peer MAC Address: 66:33:88:65:11:33 ------------------------------------------------ Local Interface: HundredGigE0/0/2/1 Parent Interface: Bundle-Ether3 Chassis id: 4321.4321.4321 Port id: HundredGigE0/0/2/1 Port Description: to edge router 1 System Name: edge-route-1 System Description: 3.4.2, NCS-1234 Time remaining: 100 seconds Hold Time: 120 seconds System Capabilities: R Enabled Capabilities: R Management Addresses: IPv4 address: 3.3.3.3 Peer MAC Address: 66:33:88:65:11:44 """ template = get_template(yang="openconfig-lldp", platform="cisco_xr") # print(template) > parser = ttp(template=template) ^^^^^^^^^^^^^^^^^^^^^^ test_yang_openconfig_lldp.py:367: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError _______________________ test_openconfig_lldp_cisco_nxos ________________________ def test_openconfig_lldp_cisco_nxos(): data1 = """ switch-nxos-core-1# show lldp eni det Chassis id: 1234.1234.1234 Port id: Eth1/1 Local Port id: mgmt0 Port Description: switch-1:mgmt0 oob System Name: switch-1 System Description: Cisco Nexus Operating System (NX-OS) Software 2.1(1)U1(1) TAC support: http://www.cisco.com/tac Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved. Time remaining: 108 seconds System Capabilities: B, R Enabled Capabilities: B, R Management Address: 1.1.1.1 Management Address IPV6: not advertised Vlan ID: 111 Chassis id: 4321.4321.4321 Port id: 1234.4444.3333 Local Port id: Eth1/21 Port Description: null System Name: null System Description: null Time remaining: 117 seconds System Capabilities: not advertised Enabled Capabilities: not advertised Management Address: not advertised Management Address IPV6: not advertised Vlan ID: not advertised """ data2 = """ switch24-edge-1# show lldp nei det Chassis id: 5555.5555.5555 Port id: Eth1/23 Local Port id: Eth5/3 Port Description: abc-switch-1 some port some description System Name: abc-switch-1 System Description: Cisco NX-OS(tm) n1100, Software (n7100-s6-dk9), Version 21.32(1), RELEASE SOFTWARE Copyright (c) 2002-2017 by Cisco Systems, Inc. Compiled 6/36/2099 01:00 :00 Time remaining: 118 seconds System Capabilities: B, R Enabled Capabilities: B, R Management Address: 2.2.2.2 Vlan ID: not advertised Chassis id: 6666.6666.6666 Port id: Ethernet1/25/4 Local Port id: Eth1/234 Port Description: system42 interface 1234 System Name: system42 System Description: Cisco Nexus Operating System (NX-OS) Software 123.1(4)I4(4) TAC support: http://www.cisco.com/tac Copyright (c) 2002-2091, Cisco Systems, Inc. All rights reserved. Time remaining: 112 seconds System Capabilities: B, R Enabled Capabilities: B, R Management Address: 25.25.25.25 Management Address IPV6: 1234.1234.1234 Vlan ID: not advertised """ template = get_template(yang="openconfig-lldp", platform="cisco_nxos") # print(template) > parser = ttp(template=template, vars={"validate_with_yangson": False}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test_yang_openconfig_lldp.py:573: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/ttp/ttp.py:240: in __init__ self._ttp_ = lazy_import_functions() ^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def lazy_import_functions(): """function to collect a list of all files/directories within ttp module, parse .py files using ast and extract information about all functions to cache them within _ttp_ dictionary """ _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, } log.info("ttp.lazy_import_functions: starting functions lazy import") # try to load previously pickled/cached _ttp_ dictionary path_to_cache = os.getenv("TTPCACHEFOLDER", os.path.dirname(__file__)) cache_file = os.path.join(path_to_cache, "ttp_dict_cache.pickle") try: if os.path.isfile(cache_file): with open(cache_file, "rb") as f: _ttp_ = pickle.load(f) # use unpickled _ttp_ dictionary if it of the same python version if ( _ttp_["python_major_version"] == version_info.major and _ttp_.get("__version__") == __version__ ): log.info( "ttp.lazy_import_functions: loaded _ttp_ dictionary from ttp_dict_cache.pickle" ) return _ttp_ # rebuilt _ttp_ dictionary as it is of different version else: _ttp_ = { "macro": {}, "python_major_version": version_info.major, "global_vars": {}, "template_obj": {}, "vars": {}, "__version__": __version__, } except Exception as e: log.warning( "ttp.lazy_import_functions: failed load ttp_dict_cache.pickle, loading functions directly, error '{}'".format( e ) ) # load functions from files instead exclude = "_py3.py" if _ttp_["python_major_version"] == 2 else "_py2.py" exclude_modules = ["ttp.py"] # load and parse files log.info("ttp.lazy_import_functions: loading files for ast parsing") for item in os.walk(os.path.dirname(__file__)): root, dirs, files = item for f in files: if not ( f.endswith(".py") and not f.startswith("_") and not f.endswith(exclude) and f not in exclude_modules ): continue try: module_file = open("{}/{}".format(root, f), mode="r", encoding="utf-8") except: # in some versions of python open() does not support encoding module_file = open("{}/{}".format(root, f), mode="r") node = ast.parse(module_file.read()) assignments = [n for n in node.body if isinstance(n, ast.Assign)] functions = [n.name for n in node.body if isinstance(n, ast.FunctionDef)] functions = [f for f in functions if (not f.startswith("_"))] # get _name_map_ _name_map_ = {} for assignment in assignments: # stop if _name_map_ already found if _name_map_: break for target in assignment.targets: if target.id == "_name_map_": _name_map_.update( { > key.s: assignment.value.values[index].s ^^^^^ for index, key in enumerate(assignment.value.keys) } ) E AttributeError: 'Constant' object has no attribute 's' /usr/lib/python3/site-packages/ttp/ttp.py:152: AttributeError =========================== short test summary info ============================ FAILED test_misc_netmiko_templates.py::test_cisco_ios_arp_original_intf_names FAILED test_misc_netmiko_templates.py::test_cisco_ios_cfg_ip_original_intf_names FAILED test_misc_netmiko_templates.py::test_cisco_ios_cfg_ip_short_intf_names FAILED test_misc_netmiko_templates.py::test_cisco_ios_xr_arp_short_intf_names FAILED test_misc_netmiko_templates.py::test_cisco_ios_xr_arp_original_intf_names FAILED test_misc_netmiko_templates.py::test_huawei_vrp_cfg_ip_original_intf_names FAILED test_misc_netmiko_templates.py::test_huawei_vrp_cfg_ip_short_intf_names FAILED test_misc_netmiko_templates.py::test_cisco_iosxr_cfg_ip_original_intf_names FAILED test_misc_netmiko_templates.py::test_cisco_ios_cfg_bgp - AttributeErro... FAILED test_misc_netmiko_templates.py::test_cisco_ios_cfg_nat_static - Attrib... FAILED test_n2g_templates.py::test_N2G_ospf_lsdb_Cisco_IOSXR - AttributeError... FAILED test_n2g_templates.py::test_N2G_ospf_lsdb_Cisco_IOS - AttributeError: ... FAILED test_n2g_templates.py::test_N2G_ospf_lsdb_huawei - AttributeError: 'Co... FAILED test_n2g_templates.py::test_N2G_isis_lsdb_juniper - AttributeError: 'C... FAILED test_n2g_templates.py::test_N2G_cli_l2_data_juniper - AttributeError: ... FAILED test_n2g_templates.py::test_N2G_cli_ip_data_arista_eos - AttributeErro... FAILED test_platform_arista_eos.py::test_show_hostname - AttributeError: 'Con... FAILED test_platform_cisco_ios.py::test_cisco_ios_show_isdn_status - Attribut... FAILED test_platform_cisco_ios.py::test_cisco_ios_show_ip_ospf_database_router FAILED test_platform_cisco_ios.py::test_cisco_ios_show_ip_ospf_database_external FAILED test_platform_cisco_ios.py::test_cisco_ios_show_ip_ospf_database_summary FAILED test_platform_cisco_ios.py::test_cisco_ios_cisco_ios_show_running_config_pipe_include_source_static FAILED test_platform_cisco_xr.py::test_cisco_ios_show_ip_ospf_database_router FAILED test_platform_huawei.py::test_huwei_display_ospf_lsdb_router - Attribu... FAILED test_platform_juniper.py::test_juniper_juniper_show_isis_database_verbose_pipe_no_more FAILED test_ttp_templates_methods.py::test_parse_output_platform - AttributeE... FAILED test_ttp_templates_methods.py::test_parse_output_misc - AttributeError... FAILED test_ttp_templates_methods.py::test_parse_output_ttp_path - AttributeE... FAILED test_ttp_templates_methods.py::test_parse_output_path - AttributeError... FAILED test_yang_openconfig_lldp.py::test_openconfig_lldp_cisco_ios - Attribu... FAILED test_yang_openconfig_lldp.py::test_openconfig_lldp_cisco_ios_xr - Attr... FAILED test_yang_openconfig_lldp.py::test_openconfig_lldp_cisco_nxos - Attrib... ================== 32 failed, 6 passed, 1 deselected in 1.62s ================== error: Bad exit status from /usr/src/tmp/rpmb-tmp.pdHm9j (%check) RPM build errors: Bad exit status from /usr/src/tmp/rpmb-tmp.pdHm9j (%check) Command exited with non-zero status 1 2.64user 0.19system 0:02.81elapsed 100%CPU (0avgtext+0avgdata 53540maxresident)k 0inputs+0outputs (0major+103975minor)pagefaults 0swaps hsh-rebuild: rebuild of `python3-module-ttp_templates-0.3.6-alt1.src.rpm' failed. Command exited with non-zero status 1 3.94user 0.91system 0:11.87elapsed 40%CPU (0avgtext+0avgdata 148072maxresident)k 16328inputs+0outputs (0major+335901minor)pagefaults 0swaps