buildcontroller: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt docs-linkcheck: install_deps> python -I -m pip install -r docs/requirements.txt docs: install_deps> python -I -m pip install -r docs/requirements.txt checkbashisms: freeze> python -m pip freeze --all checkbashisms: pip==25.3,setuptools==80.9.0 checkbashisms: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./fixCIcentOS8reposMirrors.sh checkbashisms: commands[1] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sh -c 'command checkbashisms>/dev/null || sudo yum install -y devscripts-checkbashisms || sudo yum install -y devscripts-minimal || sudo yum install -y devscripts || sudo yum install -y https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Everything/x86_64/os/Packages/d/devscripts-checkbashisms-2.19.6-2.fc31.x86_64.rpm || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | yum install devscripts-minimal )" >&2 && exit 1)' checkbashisms: commands[2] /w/workspace/transportpce-tox-verify-transportpce-master/tests> find . -not -path '*/\.*' -name '*.sh' -exec checkbashisms -f '{}' + checkbashisms: OK ✔ in 3.38 seconds pre-commit: install_deps> python -I -m pip install pre-commit pre-commit: freeze> python -m pip freeze --all pre-commit: cfgv==3.5.0,distlib==0.4.0,filelock==3.20.3,identify==2.6.16,nodeenv==1.10.0,pip==25.3,platformdirs==4.5.1,pre_commit==4.5.1,PyYAML==6.0.3,setuptools==80.9.0,virtualenv==20.36.1 pre-commit: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./fixCIcentOS8reposMirrors.sh pre-commit: commands[1] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sh -c 'which cpan || sudo yum install -y perl-CPAN || (echo "cpan command not found - please install it (e.g. sudo apt-get install perl-modules | yum install perl-CPAN )" >&2 && exit 1)' /usr/bin/cpan pre-commit: commands[2] /w/workspace/transportpce-tox-verify-transportpce-master/tests> pre-commit run --all-files --show-diff-on-failure [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [WARNING] hook id `perltidy` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Initializing environment for https://github.com/perltidy/perltidy. buildcontroller: freeze> python -m pip freeze --all buildcontroller: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 buildcontroller: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_controller.sh java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64 java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64 java-1.21.0-openjdk-amd64 2111 /usr/lib/jvm/java-1.21.0-openjdk-amd64 21 [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... 21 ok, java is 21 or newer Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1) Maven home: /opt/maven Java version: 21.0.9, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-164-generic", arch: "amd64", family: "unix" [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/perltidy/perltidy. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... docs-linkcheck: freeze> python -m pip freeze --all docs-linkcheck: alabaster==1.0.0,attrs==25.4.0,babel==2.17.0,blockdiag==3.0.0,certifi==2026.1.4,charset-normalizer==3.4.4,contourpy==1.3.3,cycler==0.12.1,docutils==0.22.4,fonttools==4.61.1,funcparserlib==2.0.0a0,future==1.0.0,idna==3.11,imagesize==1.4.1,Jinja2==3.1.6,jsonschema==3.2.0,kiwisolver==1.4.9,lfdocs-conf==0.9.0,MarkupSafe==3.0.3,matplotlib==3.10.8,numpy==2.4.1,nwdiag==3.0.0,packaging==25.0,pillow==12.1.0,pip==25.3,Pygments==2.19.2,pyparsing==3.3.1,pyrsistent==0.20.0,python-dateutil==2.9.0.post0,PyYAML==6.0.3,requests==2.32.5,requests-file==1.5.1,roman-numerals==4.1.0,seqdiag==3.0.0,setuptools==80.9.0,six==1.17.0,snowballstemmer==3.0.1,Sphinx==9.0.4,sphinx-bootstrap-theme==0.8.1,sphinx-data-viewer==0.1.5,sphinx-tabs==3.4.7,sphinx_rtd_theme==3.1.0,sphinxcontrib-applehelp==2.0.0,sphinxcontrib-blockdiag==3.0.0,sphinxcontrib-devhelp==2.0.0,sphinxcontrib-htmlhelp==2.1.0,sphinxcontrib-jquery==4.1,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-needs==0.7.9,sphinxcontrib-nwdiag==2.0.0,sphinxcontrib-plantuml==0.31,sphinxcontrib-qthelp==2.0.0,sphinxcontrib-seqdiag==3.0.0,sphinxcontrib-serializinghtml==2.0.0,sphinxcontrib-swaggerdoc==0.1.7,urllib3==2.6.3,webcolors==25.10.0 docs-linkcheck: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sphinx-build -q -b linkcheck -d /w/workspace/transportpce-tox-verify-transportpce-master/.tox/docs-linkcheck/tmp/doctrees ../docs/ /w/workspace/transportpce-tox-verify-transportpce-master/docs/_build/linkcheck docs: freeze> python -m pip freeze --all docs: alabaster==1.0.0,attrs==25.4.0,babel==2.17.0,blockdiag==3.0.0,certifi==2026.1.4,charset-normalizer==3.4.4,contourpy==1.3.3,cycler==0.12.1,docutils==0.22.4,fonttools==4.61.1,funcparserlib==2.0.0a0,future==1.0.0,idna==3.11,imagesize==1.4.1,Jinja2==3.1.6,jsonschema==3.2.0,kiwisolver==1.4.9,lfdocs-conf==0.9.0,MarkupSafe==3.0.3,matplotlib==3.10.8,numpy==2.4.1,nwdiag==3.0.0,packaging==25.0,pillow==12.1.0,pip==25.3,Pygments==2.19.2,pyparsing==3.3.1,pyrsistent==0.20.0,python-dateutil==2.9.0.post0,PyYAML==6.0.3,requests==2.32.5,requests-file==1.5.1,roman-numerals==4.1.0,seqdiag==3.0.0,setuptools==80.9.0,six==1.17.0,snowballstemmer==3.0.1,Sphinx==9.0.4,sphinx-bootstrap-theme==0.8.1,sphinx-data-viewer==0.1.5,sphinx-tabs==3.4.7,sphinx_rtd_theme==3.1.0,sphinxcontrib-applehelp==2.0.0,sphinxcontrib-blockdiag==3.0.0,sphinxcontrib-devhelp==2.0.0,sphinxcontrib-htmlhelp==2.1.0,sphinxcontrib-jquery==4.1,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-needs==0.7.9,sphinxcontrib-nwdiag==2.0.0,sphinxcontrib-plantuml==0.31,sphinxcontrib-qthelp==2.0.0,sphinxcontrib-seqdiag==3.0.0,sphinxcontrib-serializinghtml==2.0.0,sphinxcontrib-swaggerdoc==0.1.7,urllib3==2.6.3,webcolors==25.10.0 docs: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sphinx-build -q -W --keep-going -b html -n -d /w/workspace/transportpce-tox-verify-transportpce-master/.tox/docs/tmp/doctrees ../docs/ /w/workspace/transportpce-tox-verify-transportpce-master/docs/_build/html docs: OK ✔ in 34.48 seconds pylint: install_deps> python -I -m pip install 'pylint>=2.6.0' trim trailing whitespace.................................................Passed Tabs remover.............................................................Passed docs-linkcheck: OK ✔ in 36.23 seconds pylint: freeze> python -m pip freeze --all autopep8.................................................................pylint: astroid==4.0.3,dill==0.4.0,isort==7.0.0,mccabe==0.7.0,pip==25.3,platformdirs==4.5.1,pylint==4.0.4,setuptools==80.9.0,tomlkit==0.14.0 pylint: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> find transportpce_tests/ -name '*.py' -exec pylint --fail-under=10 --max-line-length=120 --disable=missing-docstring,import-error --disable=fixme --disable=duplicate-code '--module-rgx=([a-z0-9_]+$)|([0-9.]{1,30}$)' '--method-rgx=(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$' '--variable-rgx=[a-zA-Z_][a-zA-Z0-9_]{1,30}$' '{}' + Passed perltidy.................................................................Passed pre-commit: commands[3] /w/workspace/transportpce-tox-verify-transportpce-master/tests> pre-commit run gitlint-ci --hook-stage manual [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [WARNING] hook id `perltidy` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Installing environment for https://github.com/jorisroovers/gitlint. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... gitlint..................................................................Passed ------------------------------------ Your code has been rated at 10.00/10 pre-commit: OK ✔ in 51.14 seconds pylint: OK ✔ in 30.69 seconds buildcontroller: OK ✔ in 1 minute 53.73 seconds build_karaf_tests221: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt build_karaf_tests190: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt build_karaf_tests121: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt build_karaf_tests71: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt build_karaf_tests71: freeze> python -m pip freeze --all build_karaf_tests221: freeze> python -m pip freeze --all build_karaf_tests121: freeze> python -m pip freeze --all build_karaf_tests190: freeze> python -m pip freeze --all build_karaf_tests71: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 build_karaf_tests71: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh build karaf in karaf71 with ./karaf71.env build_karaf_tests221: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 build_karaf_tests221: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh build karaf in karaf221 with ./karaf221.env build_karaf_tests121: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 build_karaf_tests121: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh build karaf in karaf121 with ./karaf121.env build_karaf_tests190: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 build_karaf_tests190: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh build karaf in karafoc with ./karafoc.env build_karaf_tests121: OK ✔ in 1 minute 4.46 seconds buildlighty: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.4:install (default-install) on project transportpce-karaf: Failed to install metadata org.opendaylight.transportpce:transportpce-karaf:13.0.0-SNAPSHOT/maven-metadata.xml: Could not read metadata /home/jenkins/.m2/repository/org/opendaylight/transportpce/transportpce-karaf/13.0.0-SNAPSHOT/maven-metadata-local.xml: input contained no data -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException build_karaf_tests71: OK ✔ in 1 minute 7.46 seconds build_karaf_tests221: OK ✔ in 1 minute 7.49 seconds build_karaf_tests190: OK ✔ in 1 minute 7.54 seconds sims: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt testsPCE: install_deps> python -I -m pip install gnpy4tpce==2.4.7 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt buildlighty: freeze> python -m pip freeze --all sims: freeze> python -m pip freeze --all buildlighty: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 buildlighty: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/lighty> ./build.sh sims: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 sims: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./install_lightynode.sh Using lighynode version 22.1.0.1 Installing lightynode device to ./lightynode/lightynode-openroadm-device directory sims: OK ✔ in 12.84 seconds buildlighty: OK ✔ in 35.74 seconds testsPCE: freeze> python -m pip freeze --all testsPCE: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,click==8.3.1,contourpy==1.3.3,cryptography==3.3.2,cycler==0.12.1,dict2xml==1.7.7,Flask==2.1.3,Flask-Injector==0.14.0,fonttools==4.61.1,gnpy4tpce==2.4.7,idna==3.11,iniconfig==2.3.0,injector==0.24.0,invoke==2.2.1,itsdangerous==2.2.0,Jinja2==3.1.6,kiwisolver==1.4.9,lxml==6.0.2,MarkupSafe==3.0.3,matplotlib==3.10.8,netconf-client==3.5.0,networkx==2.8.8,numpy==1.26.4,packaging==25.0,pandas==1.5.3,paramiko==4.0.0,pbr==5.11.1,pillow==12.1.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pyparsing==3.3.1,pytest==9.0.2,python-dateutil==2.9.0.post0,pytz==2025.2,requests==2.32.5,scipy==1.17.0,setuptools==50.3.2,six==1.17.0,urllib3==2.6.3,Werkzeug==2.0.3,xlrd==1.2.0 testsPCE: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh pce pytest -q transportpce_tests/pce/test01_pce.py .................... [100%] 20 passed in 111.76s (0:01:51) pytest -q transportpce_tests/pce/test02_pce_400G.py ............ [100%] 12 passed in 46.50s pytest -q transportpce_tests/pce/test03_gnpy.py ........ [100%] 8 passed in 37.96s pytest -q transportpce_tests/pce/test04_pce_bug_fix.py ... [100%] 3 passed in 36.08s testsPCE: OK ✔ in 4 minutes 46.83 seconds tests190: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt tests_tapi: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt tests121: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt tests190: freeze> python -m pip freeze --all tests121: freeze> python -m pip freeze --all tests_tapi: freeze> python -m pip freeze --all tests190: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 tests190: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh oc using environment variables from ./karafoc.env pytest -q transportpce_tests/oc/test01_portmapping.py tests121: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 tests121: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 1.2.1 using environment variables from ./karaf121.env pytest -q transportpce_tests/1.2.1/test01_portmapping.py tests_tapi: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 tests_tapi: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh tapi using environment variables from ./karaf221.env pytest -q transportpce_tests/tapi/test01_abstracted_topology.py ........... [100%] 10 passed in 76.92s (0:01:16) pytest -q transportpce_tests/oc/test02_topology.py ..................................... [100%] 21 passed in 125.49s (0:02:05) pytest -q transportpce_tests/1.2.1/test02_topo_portmapping.py ....................... [100%] 14 passed in 65.97s (0:01:05) pytest -q transportpce_tests/oc/test03_renderer.py ................... [100%] 6 passed in 60.22s (0:01:00) pytest -q transportpce_tests/1.2.1/test03_topology.py .F.....F....F.FF. [100%] =================================== FAILURES =================================== _ TestTransportPCERenderer.test_07_service_path_create_network_check_optical_channel _ self = def test_07_service_path_create_network_check_optical_channel(self): response = test_utils_oc.check_node_attribute2_request("XPDR-OC", "component", "cfp2-opt-1-1", "openconfig-terminal-device:optical-channel") self.assertEqual(response['status_code'], requests.codes.ok) optchannel = response['openconfig-terminal-device:optical-channel'] expected_optchannel = {'frequency': '194100000', 'target-output-power': '0.0', 'operational-mode': 4308 } self.assertDictEqual( dict(expected_optchannel, **optchannel['config']), optchannel['config']) for key, value in expected_optchannel.items(): self.assertIn(key, optchannel['state']) > self.assertEqual(optchannel['state'][key], value) E AssertionError: '192499999' != '194100000' E - 192499999 E + 194100000 transportpce_tests/oc/test03_renderer.py:128: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_07_service_path_create_network_check_optical_channel _ TestTransportPCERenderer.test_10_service_path_delete_network_check_optical_port _ self = def test_10_service_path_delete_network_check_optical_port(self): response = test_utils_oc.check_node_attribute3_request("XPDR-OC", "component", "line-cfp2-1", "port", "openconfig-transport-line-common:optical-port") self.assertEqual(response['status_code'], requests.codes.ok) > self.assertEqual(response['port']['config']['admin-state'], 'DISABLED') E AssertionError: 'ENABLED' != 'DISABLED' E - ENABLED E + DISABLED transportpce_tests/oc/test03_renderer.py:154: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_10_service_path_delete_network_check_optical_port _ TestTransportPCERenderer.test_15_service_path_create_client_check_interfaces _ self = def test_15_service_path_create_client_check_interfaces(self): for interfaceid in TestTransportPCERenderer.interface_id: response = test_utils_oc.check_interface_attribute_request("XPDR-OC", "interface", interfaceid) > self.assertEqual(response['interface'][0]['name'], interfaceid) ^^^^^^^^^^^^^^^^^^^^^^^^ E KeyError: 0 transportpce_tests/oc/test03_renderer.py:245: KeyError ----------------------------- Captured stdout call ----------------------------- execution of test_15_service_path_create_client_check_interfaces _ TestTransportPCERenderer.test_17_service_path_delete_client_check_optical_port _ self = def test_17_service_path_delete_client_check_optical_port(self): response = test_utils_oc.check_node_attribute3_request("XPDR-OC", "component", TestTransportPCERenderer.port_id[0], "port", "openconfig-transport-line-common:optical-port") self.assertEqual(response['status_code'], requests.codes.ok) > self.assertEqual(response['port']['config']['admin-state'], 'DISABLED') E AssertionError: 'ENABLED' != 'DISABLED' E - ENABLED E + DISABLED transportpce_tests/oc/test03_renderer.py:274: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_17_service_path_delete_client_check_optical_port _ TestTransportPCERenderer.test_18_service_path_delete_client_check_properties _ self = def test_18_service_path_delete_client_check_properties(self): response = test_utils_oc.check_node_attribute2_request("XPDR-OC", "component", "qsfp-opt-1-4", "openconfig-platform:properties") self.assertEqual(response['status_code'], requests.codes.ok) for prop in response['openconfig-platform:properties']['property']: self.assertEqual(prop['name'], 'tx-dis') > self.assertEqual(prop['config'], {'name': 'tx-dis', 'value': 'TRUE'}) E AssertionError: {'name': 'tx-dis', 'value': 'FALSE'} != {'name': 'tx-dis', 'value': 'TRUE'} E - {'name': 'tx-dis', 'value': 'FALSE'} E ? ^^^^ E E + {'name': 'tx-dis', 'value': 'TRUE'} E ? ^^^ transportpce_tests/oc/test03_renderer.py:284: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_18_service_path_delete_client_check_properties =========================== short test summary info ============================ FAILED transportpce_tests/oc/test03_renderer.py::TestTransportPCERenderer::test_07_service_path_create_network_check_optical_channel FAILED transportpce_tests/oc/test03_renderer.py::TestTransportPCERenderer::test_10_service_path_delete_network_check_optical_port FAILED transportpce_tests/oc/test03_renderer.py::TestTransportPCERenderer::test_15_service_path_create_client_check_interfaces FAILED transportpce_tests/oc/test03_renderer.py::TestTransportPCERenderer::test_17_service_path_delete_client_check_optical_port FAILED transportpce_tests/oc/test03_renderer.py::TestTransportPCERenderer::test_18_service_path_delete_client_check_properties 5 failed, 14 passed in 58.97s tests190: exit 1 (203.33 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh oc pid=7339 tests190: FAIL ✖ in 3 minutes 31.56 seconds tests71: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt .tests71: freeze> python -m pip freeze --all tests71: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 tests71: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 7.1 using environment variables from ./karaf71.env pytest -q transportpce_tests/7.1/test01_portmapping.py ............................ [100%] 12 passed in 54.35s pytest -q transportpce_tests/7.1/test02_otn_renderer.py ............................F.F.F.F.F.. [100%] 44 passed in 153.86s (0:02:33) pytest -q transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py FFF....FFFF...F.....F..F.F.F.F.F.F.F.F.............. [100%] =================================== FAILURES =================================== _____________ TestTransportPCERenderer.test_05_service_path_create _____________ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:service-path' body = '{"input": {"service-name": "service_test", "wave-number": "7", "modulation-format": "dp-qpsk", "operation": "create",... 40, "min-freq": 195.775, "max-freq": 195.825, "lower-spectral-slot-number": 713, "higher-spectral-slot-number": 720}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '441', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8191): Read timed out. (read timeout=30) ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_05_service_path_create(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_test', 'wave-number': '7', 'modulation-format': 'dp-qpsk', 'operation': 'create', 'nodes': [{'node-id': 'ROADMA01', 'src-tp': 'SRG1-PP7-TXRX', 'dest-tp': 'DEG1-TTP-TXRX'}, {'node-id': 'XPDRA01', 'src-tp': 'XPDR1-CLIENT1', 'dest-tp': 'XPDR1-NETWORK1'}], 'center-freq': 195.8, 'nmc-width': 40, 'min-freq': 195.775, 'max-freq': 195.825, 'lower-spectral-slot-number': 713, 'higher-spectral-slot-number': 720 }) transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8191): Read timed out. (read timeout=30) ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_05_service_path_create ________ TestTransportPCERenderer.test_06_service_path_create_rdm_check ________ self = def test_06_service_path_create_rdm_check(self): response = test_utils.check_node_attribute_request("ROADMA01", "interface", "DEG1-TTP-TXRX-713:720") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:113: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_06_service_path_create_rdm_check ________ TestTransportPCERenderer.test_07_service_path_create_rdm_check ________ self = def test_07_service_path_create_rdm_check(self): response = test_utils.check_node_attribute_request("ROADMA01", "interface", "SRG1-PP7-TXRX-713:720") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:129: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_07_service_path_create_rdm_check ________ TestTransportPCERenderer.test_08_service_path_create_rdm_check ________ self = def test_08_service_path_create_rdm_check(self): response = test_utils.check_node_attribute_request( "ROADMA01", "roadm-connections", "SRG1-PP7-TXRX-DEG1-TTP-TXRX-713:720") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:146: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_08_service_path_create_rdm_check _______ TestTransportPCERenderer.test_09_service_path_create_xpdr_check ________ self = def test_09_service_path_create_xpdr_check(self): response = test_utils.check_node_attribute_request("XPDRA01", "interface", "XPDR1-NETWORK1-713:720") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:159: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_09_service_path_create_xpdr_check _______ TestTransportPCERenderer.test_10_service_path_create_xpdr_check ________ self = def test_10_service_path_create_xpdr_check(self): response = test_utils.check_node_attribute_request("XPDRA01", "interface", "XPDR1-NETWORK1-OTU") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:177: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_10_service_path_create_xpdr_check _______ TestTransportPCERenderer.test_11_service_path_create_xpdr_check ________ self = def test_11_service_path_create_xpdr_check(self): response = test_utils.check_node_attribute_request("XPDRA01", "interface", "XPDR1-NETWORK1-ODU") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:194: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_11_service_path_create_xpdr_check _______ TestTransportPCERenderer.test_12_service_path_create_xpdr_check ________ self = def test_12_service_path_create_xpdr_check(self): response = test_utils.check_node_attribute_request("XPDRA01", "interface", "XPDR1-CLIENT1-ETHERNET") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:217: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_12_service_path_create_xpdr_check _______ TestTransportPCERenderer.test_13_service_path_create_xpdr_check ________ self = def test_13_service_path_create_xpdr_check(self): response = test_utils.check_node_attribute_request("XPDRA01", "circuit-packs", "1%2F0%2F1-PLUG-NET") # FIXME: https://jira.opendaylight.org/browse/TRNSPRTPCE-591 self.assertEqual(response['status_code'], requests.codes.ok) > self.assertIn('not-reserved-inuse', response['circuit-packs'][0]["equipment-state"]) E AssertionError: 'not-reserved-inuse' not found in 'not-reserved-available' transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py:239: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_13_service_path_create_xpdr_check =========================== short test summary info ============================ FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_05_service_path_create FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_06_service_path_create_rdm_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_07_service_path_create_rdm_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_08_service_path_create_rdm_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_09_service_path_create_xpdr_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_10_service_path_create_xpdr_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_11_service_path_create_xpdr_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_12_service_path_create_xpdr_check FAILED transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py::TestTransportPCERenderer::test_13_service_path_create_xpdr_check 9 failed, 15 passed in 118.22s (0:01:58) tests121: exit 1 (459.13 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 1.2.1 pid=7350 FFFFF. [100%] 51 passed in 489.25s (0:08:09) pytest -q transportpce_tests/tapi/test02_full_topology.py FFF...........FF.FF.F..........FFF.............. [100%] =================================== FAILURES =================================== ________ TestTransportPCEOtnRenderer.test_02_service_path_create_otuc2 _________ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:service-path' body = '{"input": {"service-name": "service_OTUC2", "wave-number": "0", "modulation-format": "dp-qpsk", "operation": "create"...75, "min-freq": 196.0375, "max-freq": 196.125, "lower-spectral-slot-number": 755, "higher-spectral-slot-number": 768}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '336', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_02_service_path_create_otuc2(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_OTUC2', 'wave-number': '0', 'modulation-format': 'dp-qpsk', 'operation': 'create', 'nodes': [{'node-id': 'XPDR-A2', 'dest-tp': 'XPDR2-NETWORK1'}], 'center-freq': 196.1, 'nmc-width': 75, 'min-freq': 196.0375, 'max-freq': 196.125, 'lower-spectral-slot-number': 755, 'higher-spectral-slot-number': 768 }) transportpce_tests/7.1/test02_otn_renderer.py:74: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_02_service_path_create_otuc2 _________ TestTransportPCEOtnRenderer.test_03_get_portmapping_network1 _________ self = def test_03_get_portmapping_network1(self): response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") self.assertEqual(response['status_code'], requests.codes.ok) self.NETWORK2_CHECK_DICT["supporting-otucn"] = "XPDR2-NETWORK1-OTUC2" expected_sorted = test_utils.recursive_sort(self.NETWORK2_CHECK_DICT) response_sorted = [ test_utils.recursive_sort(item) for item in response['mapping'] ] > self.assertIn(expected_sorted, response_sorted) E AssertionError: {'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-otucn': 'XPDR2-NETWORK1-OTUC2', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'} not found in [{'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'}] transportpce_tests/7.1/test02_otn_renderer.py:105: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_03_get_portmapping_network1 ___________ TestTransportPCEOtnRenderer.test_04_check_interface_otsi ___________ self = def test_04_check_interface_otsi(self): # pylint: disable=line-too-long response = test_utils.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-755:768") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:110: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_04_check_interface_otsi __________ TestTransportPCEOtnRenderer.test_05_check_interface_otsig ___________ self = def test_05_check_interface_otsig(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTSIGROUP-200G") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:135: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_05_check_interface_otsig __________ TestTransportPCEOtnRenderer.test_06_check_interface_otuc2 ___________ self = def test_06_check_interface_otuc2(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTUC2") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:154: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_06_check_interface_otuc2 ______ TestTransportPCEOtnRenderer.test_07_otn_service_path_create_oduc2 _______ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:otn-service-path' body = '{"input": {"service-name": "service_ODUC2", "operation": "create", "service-rate": "200", "service-format": "ODU", "nodes": [{"node-id": "XPDR-A2", "network-tp": "XPDR2-NETWORK1"}]}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '182', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:otn-service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_07_otn_service_path_create_oduc2(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_ODUC2', 'operation': 'create', 'service-rate': '200', 'service-format': 'ODU', 'nodes': [{'node-id': 'XPDR-A2', 'network-tp': 'XPDR2-NETWORK1'}] }) transportpce_tests/7.1/test02_otn_renderer.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_07_otn_service_path_create_oduc2 _________ TestTransportPCEOtnRenderer.test_08_get_portmapping_network1 _________ self = def test_08_get_portmapping_network1(self): response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") self.assertEqual(response['status_code'], requests.codes.ok) self.NETWORK2_CHECK_DICT["supporting-oducn"] = "XPDR2-NETWORK1-ODUC2" expected_sorted = test_utils.recursive_sort(self.NETWORK2_CHECK_DICT) response_sorted = [ test_utils.recursive_sort(item) for item in response['mapping'] ] > self.assertIn(expected_sorted, response_sorted) E AssertionError: {'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-oducn': 'XPDR2-NETWORK1-ODUC2', 'supporting-otucn': 'XPDR2-NETWORK1-OTUC2', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'} not found in [{'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'}] transportpce_tests/7.1/test02_otn_renderer.py:198: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_08_get_portmapping_network1 __________ TestTransportPCEOtnRenderer.test_09_check_interface_oduc2 ___________ self = def test_09_check_interface_oduc2(self): response = test_utils.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC2") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:202: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_09_check_interface_oduc2 ______ TestTransportPCEOtnRenderer.test_10_otn_service_path_create_100ge _______ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:otn-service-path' body = '{"input": {"service-name": "service_Ethernet", "operation": "create", "service-rate": "100", "service-format": "Ether...2-CLIENT1", "network-tp": "XPDR2-NETWORK1"}], "ethernet-encoding": "eth encode", "opucn-trib-slots": ["1.1", "1.20"]}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '292', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:otn-service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_10_otn_service_path_create_100ge(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_Ethernet', 'operation': 'create', 'service-rate': '100', 'service-format': 'Ethernet', 'nodes': [{'node-id': 'XPDR-A2', 'client-tp': 'XPDR2-CLIENT1', 'network-tp': 'XPDR2-NETWORK1'}], 'ethernet-encoding': 'eth encode', 'opucn-trib-slots': ['1.1', '1.20'] }) transportpce_tests/7.1/test02_otn_renderer.py:232: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_10_otn_service_path_create_100ge _______ TestTransportPCEOtnRenderer.test_11_check_interface_100ge_client _______ self = def test_11_check_interface_100ge_client(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-CLIENT1-ETHERNET-100G") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:257: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_11_check_interface_100ge_client _______ TestTransportPCEOtnRenderer.test_12_check_interface_odu4_client ________ self = def test_12_check_interface_odu4_client(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-CLIENT1-ODU4:service_Ethernet") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:274: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_12_check_interface_odu4_client _______ TestTransportPCEOtnRenderer.test_13_check_interface_odu4_network _______ self = def test_13_check_interface_odu4_network(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-ODU4:service_Ethernet") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:298: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_13_check_interface_odu4_network _______ TestTransportPCEOtnRenderer.test_14_check_odu_connection_xpdra2 ________ self = def test_14_check_odu_connection_xpdra2(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "odu-connection", "XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:329: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_14_check_odu_connection_xpdra2 ________ TestTransportPCEOtnRenderer.test_26_service_path_create_otuc3 _________ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:service-path' body = '{"input": {"service-name": "service_OTUC3", "wave-number": "0", "modulation-format": "dp-qam8", "operation": "create"...75, "min-freq": 196.0375, "max-freq": 196.125, "lower-spectral-slot-number": 755, "higher-spectral-slot-number": 768}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '336', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_26_service_path_create_otuc3(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_OTUC3', 'wave-number': '0', 'modulation-format': 'dp-qam8', 'operation': 'create', 'nodes': [{'node-id': 'XPDR-A2', 'dest-tp': 'XPDR2-NETWORK1'}], 'center-freq': 196.1, 'nmc-width': 75, 'min-freq': 196.0375, 'max-freq': 196.125, 'lower-spectral-slot-number': 755, 'higher-spectral-slot-number': 768 }) transportpce_tests/7.1/test02_otn_renderer.py:447: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_26_service_path_create_otuc3 _________ TestTransportPCEOtnRenderer.test_27_get_portmapping_network1 _________ self = def test_27_get_portmapping_network1(self): response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") self.assertEqual(response['status_code'], requests.codes.ok) self.NETWORK2_CHECK_DICT["supporting-otucn"] = "XPDR2-NETWORK1-OTUC3" expected_sorted = test_utils.recursive_sort(self.NETWORK2_CHECK_DICT) response_sorted = [ test_utils.recursive_sort(item) for item in response['mapping'] ] > self.assertIn(expected_sorted, response_sorted) E AssertionError: {'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-otucn': 'XPDR2-NETWORK1-OTUC3', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'} not found in [{'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'}] transportpce_tests/7.1/test02_otn_renderer.py:481: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_27_get_portmapping_network1 ___________ TestTransportPCEOtnRenderer.test_28_check_interface_otsi ___________ self = def test_28_check_interface_otsi(self): # pylint: disable=line-too-long response = test_utils.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-755:768") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:486: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_28_check_interface_otsi __________ TestTransportPCEOtnRenderer.test_29_check_interface_otsig ___________ self = def test_29_check_interface_otsig(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTSIGROUP-300G") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:512: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_29_check_interface_otsig __________ TestTransportPCEOtnRenderer.test_30_check_interface_otuc3 ___________ self = def test_30_check_interface_otuc3(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTUC3") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:531: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_30_check_interface_otuc3 ______ TestTransportPCEOtnRenderer.test_31_otn_service_path_create_oduc3 _______ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:otn-service-path' body = '{"input": {"service-name": "service_ODUC3", "operation": "create", "service-rate": "300", "service-format": "ODU", "nodes": [{"node-id": "XPDR-A2", "network-tp": "XPDR2-NETWORK1"}]}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '182', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:otn-service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_31_otn_service_path_create_oduc3(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_ODUC3', 'operation': 'create', 'service-rate': '300', 'service-format': 'ODU', 'nodes': [{'node-id': 'XPDR-A2', 'network-tp': 'XPDR2-NETWORK1'}] }) transportpce_tests/7.1/test02_otn_renderer.py:552: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_31_otn_service_path_create_oduc3 _________ TestTransportPCEOtnRenderer.test_32_get_portmapping_network1 _________ self = def test_32_get_portmapping_network1(self): response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") self.assertEqual(response['status_code'], requests.codes.ok) self.NETWORK2_CHECK_DICT["supporting-oducn"] = "XPDR2-NETWORK1-ODUC3" expected_sorted = test_utils.recursive_sort(self.NETWORK2_CHECK_DICT) response_sorted = [ test_utils.recursive_sort(item) for item in response['mapping'] ] > self.assertIn(expected_sorted, response_sorted) E AssertionError: {'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-oducn': 'XPDR2-NETWORK1-ODUC3', 'supporting-otucn': 'XPDR2-NETWORK1-OTUC3', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'} not found in [{'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'}] transportpce_tests/7.1/test02_otn_renderer.py:575: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_32_get_portmapping_network1 __________ TestTransportPCEOtnRenderer.test_33_check_interface_oduc3 ___________ self = def test_33_check_interface_oduc3(self): response = test_utils.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC3") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:579: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_33_check_interface_oduc3 ________ TestTransportPCEOtnRenderer.test_40_service_path_create_otuc4 _________ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:service-path' body = '{"input": {"service-name": "service_OTUC4", "wave-number": "0", "modulation-format": "dp-qam16", "operation": "create...75, "min-freq": 196.0375, "max-freq": 196.125, "lower-spectral-slot-number": 755, "higher-spectral-slot-number": 768}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '337', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_40_service_path_create_otuc4(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_OTUC4', 'wave-number': '0', 'modulation-format': 'dp-qam16', 'operation': 'create', 'nodes': [{'node-id': 'XPDR-A2', 'dest-tp': 'XPDR2-NETWORK1'}], 'center-freq': 196.1, 'nmc-width': 75, 'min-freq': 196.0375, 'max-freq': 196.125, 'lower-spectral-slot-number': 755, 'higher-spectral-slot-number': 768 }) transportpce_tests/7.1/test02_otn_renderer.py:675: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_40_service_path_create_otuc4 _________ TestTransportPCEOtnRenderer.test_41_get_portmapping_network1 _________ self = def test_41_get_portmapping_network1(self): response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") self.assertEqual(response['status_code'], requests.codes.ok) self.NETWORK2_CHECK_DICT["supporting-otucn"] = "XPDR2-NETWORK1-OTUC4" expected_sorted = test_utils.recursive_sort(self.NETWORK2_CHECK_DICT) response_sorted = [ test_utils.recursive_sort(item) for item in response['mapping'] ] > self.assertIn(expected_sorted, response_sorted) E AssertionError: {'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-otucn': 'XPDR2-NETWORK1-OTUC4', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'} not found in [{'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'}] transportpce_tests/7.1/test02_otn_renderer.py:709: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_41_get_portmapping_network1 ___________ TestTransportPCEOtnRenderer.test_42_check_interface_otsi ___________ self = def test_42_check_interface_otsi(self): # pylint: disable=line-too-long response = test_utils.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-755:768") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:714: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_42_check_interface_otsi __________ TestTransportPCEOtnRenderer.test_43_check_interface_otsig ___________ self = def test_43_check_interface_otsig(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTSIGROUP-400G") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:740: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_43_check_interface_otsig __________ TestTransportPCEOtnRenderer.test_44_check_interface_otuc4 ___________ self = def test_44_check_interface_otuc4(self): response = test_utils.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTUC4") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:759: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_44_check_interface_otuc4 ______ TestTransportPCEOtnRenderer.test_45_otn_service_path_create_oduc3 _______ self = conn = method = 'POST' url = '/rests/operations/transportpce-device-renderer:otn-service-path' body = '{"input": {"service-name": "service_ODUC4", "operation": "create", "service-rate": "400", "service-format": "ODU", "nodes": [{"node-id": "XPDR-A2", "network-tp": "XPDR2-NETWORK1"}]}}' headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '182', 'Authorization': 'Basic YWRtaW46YWRtaW4='} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) timeout = Timeout(connect=30, read=30, total=None), chunked = False response_conn = preload_content = False, decode_content = False, enforce_content_length = True def _make_request( self, conn: BaseHTTPConnection, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | None = None, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, chunked: bool = False, response_conn: BaseHTTPConnection | None = None, preload_content: bool = True, decode_content: bool = True, enforce_content_length: bool = True, ) -> BaseHTTPResponse: """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param response_conn: Set this to ``None`` if you will handle releasing the connection or set the connection to have the response release it. :param preload_content: If True, the response's body will be preloaded during construction. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) try: # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) raise # _validate_conn() starts the connection to an HTTPS proxy # so we need to wrap errors with 'ProxyError' here too. except ( OSError, NewConnectionError, TimeoutError, BaseSSLError, CertificateError, SSLError, ) as e: new_e: Exception = e if isinstance(e, (BaseSSLError, CertificateError)): new_e = SSLError(e) # If the connection didn't successfully connect to it's proxy # then there if isinstance( new_e, (OSError, NewConnectionError, TimeoutError, SSLError) ) and (conn and conn.proxy and not conn.has_connected_to_proxy): new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) raise new_e # conn.request() calls http.client.*.request, not the method in # urllib3.request. It also calls makefile (recv) on the socket. try: conn.request( method, url, body=body, headers=headers, chunked=chunked, preload_content=preload_content, decode_content=decode_content, enforce_content_length=enforce_content_length, ) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is # legitimately able to close the connection after sending a valid response. # With this behaviour, the received response is still readable. except BrokenPipeError: pass except OSError as e: # MacOS/Linux # EPROTOTYPE and ECONNRESET are needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: raise # Reset the timeout for the recv() on the socket read_timeout = timeout_obj.read_timeout if not conn.is_closed: # In Python 3 socket.py will catch EAGAIN and return None when you # try and read into the file pointer created by http.client, which # instead raises a BadStatusLine exception. Instead of catching # the exception and assuming all BadStatusLine exceptions are read # timeouts, check for a zero timeout before making the request. if read_timeout == 0: raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={read_timeout})" ) conn.timeout = read_timeout # Receive the response from the server try: > response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:571: in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1395: in getresponse response.begin() /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:325: in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:286: in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = b = def readinto(self, b): """Read up to len(b) bytes into the writable buffer *b* and return the number of bytes read. If the socket is non-blocking and no bytes are available, None is returned. If *b* is non-empty, a 0 return value indicates that the connection was shutdown at the other end. """ self._checkClosed() self._checkReadable() if self._timeout_occurred: raise OSError("cannot read from timed out object") while True: try: > return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ E TimeoutError: timed out /opt/pyenv/versions/3.11.10/lib/python3.11/socket.py:718: TimeoutError The above exception was the direct cause of the following exception: self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen retries = retries.increment( ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:490: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/util.py:39: in reraise raise value ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen response = self._make_request( ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('timed out') url = '/rests/operations/transportpce-device-renderer:otn-service-path' timeout_value = 30 def _raise_timeout( self, err: BaseSSLError | OSError | SocketTimeout, url: str, timeout_value: _TYPE_TIMEOUT | None, ) -> None: """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, f"Read timed out. (read timeout={timeout_value})" ) from err E urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:367: ReadTimeoutError During handling of the above exception, another exception occurred: self = def test_45_otn_service_path_create_oduc3(self): > response = test_utils.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_ODUC4', 'operation': 'create', 'service-rate': '400', 'service-format': 'ODU', 'nodes': [{'node-id': 'XPDR-A2', 'network-tp': 'XPDR2-NETWORK1'}] }) transportpce_tests/7.1/test02_otn_renderer.py:780: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ transportpce_tests/common/test_utils.py:751: in transportpce_api_rpc_request response = post_request(url, data) ^^^^^^^^^^^^^^^^^^^^^^^ transportpce_tests/common/test_utils.py:143: in post_request return requests.request( ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) raise ConnectionError(e, request=request) except ClosedPoolError as e: raise ConnectionError(e, request=request) except _ProxyError as e: raise ProxyError(e) except (_SSLError, _HTTPError) as e: if isinstance(e, _SSLError): # This branch is for urllib3 versions earlier than v1.22 raise SSLError(e, request=request) elif isinstance(e, ReadTimeoutError): > raise ReadTimeout(e, request=request) E requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8184): Read timed out. (read timeout=30) ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:690: ReadTimeout ----------------------------- Captured stdout call ----------------------------- execution of test_45_otn_service_path_create_oduc3 _________ TestTransportPCEOtnRenderer.test_46_get_portmapping_network1 _________ self = def test_46_get_portmapping_network1(self): response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") self.assertEqual(response['status_code'], requests.codes.ok) self.NETWORK2_CHECK_DICT["supporting-oducn"] = "XPDR2-NETWORK1-ODUC4" expected_sorted = test_utils.recursive_sort(self.NETWORK2_CHECK_DICT) response_sorted = [ test_utils.recursive_sort(item) for item in response['mapping'] ] > self.assertIn(expected_sorted, response_sorted) E AssertionError: {'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-oducn': 'XPDR2-NETWORK1-ODUC4', 'supporting-otucn': 'XPDR2-NETWORK1-OTUC4', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'} not found in [{'lcp-hash-val': 'LY9PxYJqUbw=', 'logical-connection-point': 'XPDR2-NETWORK1', 'port-admin-state': 'InService', 'port-direction': 'bidirectional', 'port-oper-state': 'InService', 'port-qual': 'switch-network', 'rate': '200', 'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'], 'supported-operational-mode': ['OR-W-100G-oFEC-31.6Gbd', 'OR-W-200G-oFEC-31.6Gbd'], 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-port': 'L1', 'xpdr-type': 'mpdr'}] transportpce_tests/7.1/test02_otn_renderer.py:803: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_46_get_portmapping_network1 __________ TestTransportPCEOtnRenderer.test_47_check_interface_oduc4 ___________ self = def test_47_check_interface_oduc4(self): response = test_utils.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC4") > self.assertEqual(response['status_code'], requests.codes.ok) E AssertionError: 409 != 200 transportpce_tests/7.1/test02_otn_renderer.py:807: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_47_check_interface_oduc4 =========================== short test summary info ============================ FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_02_service_path_create_otuc2 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_03_get_portmapping_network1 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_04_check_interface_otsi FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_05_check_interface_otsig FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_06_check_interface_otuc2 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_07_otn_service_path_create_oduc2 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_08_get_portmapping_network1 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_09_check_interface_oduc2 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_10_otn_service_path_create_100ge FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_11_check_interface_100ge_client FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_12_check_interface_odu4_client FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_13_check_interface_odu4_network FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_14_check_odu_connection_xpdra2 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_26_service_path_create_otuc3 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_27_get_portmapping_network1 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_28_check_interface_otsi FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_29_check_interface_otsig FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_30_check_interface_otuc3 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_31_otn_service_path_create_oduc3 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_32_get_portmapping_network1 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_33_check_interface_oduc3 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_40_service_path_create_otuc4 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_41_get_portmapping_network1 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_42_check_interface_otsi FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_43_check_interface_otsig FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_44_check_interface_otuc4 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_45_otn_service_path_create_oduc3 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_46_get_portmapping_network1 FAILED transportpce_tests/7.1/test02_otn_renderer.py::TestTransportPCEOtnRenderer::test_47_check_interface_oduc4 29 failed, 33 passed in 370.81s (0:06:10) tests121: FAIL ✖ in 7 minutes 47.44 seconds tests71: exit 1 (425.80 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 7.1 pid=12492 .................. [100%] 36 passed in 338.89s (0:05:38) pytest -q transportpce_tests/tapi/test03_tapi_device_change_notifications.py ....................................................................... [100%] 71 passed in 318.49s (0:05:18) pytest -q transportpce_tests/tapi/test04_topo_extension.py ................... [100%] 19 passed in 142.36s (0:02:22) pytest -q transportpce_tests/tapi/test05_pce_tapi.py ...................... [100%] 22 passed in 638.17s (0:10:38) tests71: FAIL ✖ in 7 minutes 13.52 seconds tests_tapi: OK ✔ in 32 minutes 17.01 seconds tests221: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt tests221: freeze> python -m pip freeze --all tests221: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 tests221: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 2.2.1 using environment variables from ./karaf221.env pytest -q transportpce_tests/2.2.1/test01_portmapping.py ................................... [100%] 35 passed in 77.79s (0:01:17) pytest -q transportpce_tests/2.2.1/test02_topo_portmapping.py ...... [100%] 6 passed in 45.39s pytest -q transportpce_tests/2.2.1/test03_topology.py ............................................ [100%] 44 passed in 138.51s (0:02:18) pytest -q transportpce_tests/2.2.1/test04_otn_topology.py ............ [100%] 12 passed in 59.93s pytest -q transportpce_tests/2.2.1/test05_flex_grid.py ................ [100%] 16 passed in 114.92s (0:01:54) pytest -q transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py ............................... [100%] 31 passed in 37.28s pytest -q transportpce_tests/2.2.1/test07_otn_renderer.py .......................... [100%] 26 passed in 91.23s (0:01:31) pytest -q transportpce_tests/2.2.1/test08_otn_sh_renderer.py ...................... [100%] 22 passed in 100.02s (0:01:40) pytest -q transportpce_tests/2.2.1/test09_olm.py ........................................ [100%] 40 passed in 184.30s (0:03:04) pytest -q transportpce_tests/2.2.1/test11_otn_end2end.py ........................................................................ [ 74%] ......................... [100%] 97 passed in 492.10s (0:08:12) pytest -q transportpce_tests/2.2.1/test12_end2end.py ...................................................... [100%] 54 passed in 448.53s (0:07:28) pytest -q transportpce_tests/2.2.1/test14_otn_switch_end2end.py ........................................................................ [ 71%] ............................. [100%] 101 passed in 493.20s (0:08:13) pytest -q transportpce_tests/2.2.1/test15_otn_end2end_with_intermediate_switch.py ........................................................................ [ 67%] ................................... [100%] 107 passed in 782.79s (0:13:02) pytest -q transportpce_tests/2.2.1/test16_freq_end2end.py ............................................. [100%] 45 passed in 200.85s (0:03:20) tests221: OK ✔ in 54 minutes 38.76 seconds tests_hybrid: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt tests_hybrid: freeze> python -m pip freeze --all tests_hybrid: bcrypt==5.0.0,certifi==2026.1.4,cffi==2.0.0,charset-normalizer==3.4.4,cryptography==46.0.3,dict2xml==1.7.7,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==25.0,paramiko==4.0.0,pip==25.3,pluggy==1.6.0,psutil==7.2.1,pycparser==2.23,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==80.9.0,urllib3==2.6.3 tests_hybrid: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh hybrid using environment variables from ./karaf221.env pytest -q transportpce_tests/hybrid/test01_device_change_notifications.py .............FFF...................FF.............. [100%] =================================== FAILURES =================================== __ TestTransportPCEDeviceChangeNotifications.test_14_check_update_portmapping __ self = def test_14_check_update_portmapping(self): response = test_utils.get_portmapping_node_attr("XPDRA01", None, None) self.assertEqual(response['status_code'], requests.codes.ok) mapping_list = response['nodes'][0]['mapping'] for mapping in mapping_list: if mapping['logical-connection-point'] == 'XPDR1-NETWORK1': > self.assertEqual(mapping['port-oper-state'], 'OutOfService', "Operational State should be 'OutOfService'") E AssertionError: 'InService' != 'OutOfService' E - InService E + OutOfService E : Operational State should be 'OutOfService' transportpce_tests/hybrid/test01_device_change_notifications.py:218: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_14_check_update_portmapping _ TestTransportPCEDeviceChangeNotifications.test_15_check_update_openroadm_topo _ self = def test_15_check_update_openroadm_topo(self): response = test_utils.get_ietf_network_request('openroadm-topology', 'config') self.assertEqual(response['status_code'], requests.codes.ok) node_list = response['network'][0]['node'] nb_updated_tp = 0 for node in node_list: self.assertEqual(node['org-openroadm-common-network:operational-state'], 'inService') self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: if node['node-id'] == 'XPDRA01-XPDR1' and tp['tp-id'] == 'XPDR1-NETWORK1': > self.assertEqual(tp['org-openroadm-common-network:operational-state'], 'outOfService') E AssertionError: 'inService' != 'outOfService' E - inService E + outOfService transportpce_tests/hybrid/test01_device_change_notifications.py:240: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_15_check_update_openroadm_topo ___ TestTransportPCEDeviceChangeNotifications.test_16_check_update_service1 ____ self = def test_16_check_update_service1(self): response = test_utils.get_ordm_serv_list_attr_request("services", "service1") self.assertEqual(response['status_code'], requests.codes.ok) > self.assertEqual(response['services'][0]['operational-state'], 'outOfService') E AssertionError: 'inService' != 'outOfService' E - inService E + outOfService transportpce_tests/hybrid/test01_device_change_notifications.py:266: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_16_check_update_service1 __ TestTransportPCEDeviceChangeNotifications.test_36_check_update_portmapping __ self = def test_36_check_update_portmapping(self): response = test_utils.get_portmapping_node_attr("XPDR-C1", None, None) self.assertEqual(response['status_code'], requests.codes.ok) mapping_list = response['nodes'][0]['mapping'] for mapping in mapping_list: if mapping['logical-connection-point'] == 'XPDR1-NETWORK1': > self.assertEqual(mapping['port-oper-state'], 'OutOfService', "Operational State should be 'OutOfService'") E AssertionError: 'InService' != 'OutOfService' E - InService E + OutOfService E : Operational State should be 'OutOfService' transportpce_tests/hybrid/test01_device_change_notifications.py:498: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_36_check_update_portmapping _ TestTransportPCEDeviceChangeNotifications.test_37_check_update_openroadm_topo _ self = def test_37_check_update_openroadm_topo(self): response = test_utils.get_ietf_network_request('openroadm-topology', 'config') self.assertEqual(response['status_code'], requests.codes.ok) node_list = response['network'][0]['node'] nb_updated_tp = 0 for node in node_list: self.assertEqual(node['org-openroadm-common-network:operational-state'], 'inService') self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: if node['node-id'] == 'XPDR-C1-XPDR1' and tp['tp-id'] == 'XPDR1-NETWORK1': > self.assertEqual(tp['org-openroadm-common-network:operational-state'], 'outOfService') E AssertionError: 'inService' != 'outOfService' E - inService E + outOfService transportpce_tests/hybrid/test01_device_change_notifications.py:520: AssertionError ----------------------------- Captured stdout call ----------------------------- execution of test_37_check_update_openroadm_topo =========================== short test summary info ============================ FAILED transportpce_tests/hybrid/test01_device_change_notifications.py::TestTransportPCEDeviceChangeNotifications::test_14_check_update_portmapping FAILED transportpce_tests/hybrid/test01_device_change_notifications.py::TestTransportPCEDeviceChangeNotifications::test_15_check_update_openroadm_topo FAILED transportpce_tests/hybrid/test01_device_change_notifications.py::TestTransportPCEDeviceChangeNotifications::test_16_check_update_service1 FAILED transportpce_tests/hybrid/test01_device_change_notifications.py::TestTransportPCEDeviceChangeNotifications::test_36_check_update_portmapping FAILED transportpce_tests/hybrid/test01_device_change_notifications.py::TestTransportPCEDeviceChangeNotifications::test_37_check_update_openroadm_topo 5 failed, 46 passed in 322.79s (0:05:22) tests_hybrid: exit 1 (323.07 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh hybrid pid=89712 buildcontroller: OK (113.73=setup[8.82]+cmd[104.91] seconds) sims: OK (12.84=setup[8.81]+cmd[4.03] seconds) build_karaf_tests121: OK (64.46=setup[7.88]+cmd[56.58] seconds) testsPCE: OK (286.83=setup[53.28]+cmd[233.55] seconds) tests121: FAIL code 1 (467.44=setup[8.31]+cmd[459.13] seconds) build_karaf_tests221: OK (67.49=setup[7.85]+cmd[59.64] seconds) tests_tapi: OK (1937.01=setup[8.32]+cmd[1928.69] seconds) tests221: OK (3278.76=setup[7.74]+cmd[3271.01] seconds) build_karaf_tests71: OK (67.46=setup[7.82]+cmd[59.64] seconds) tests71: FAIL code 1 (433.52=setup[7.72]+cmd[425.80] seconds) build_karaf_tests190: OK (67.54=setup[7.93]+cmd[59.61] seconds) tests190: FAIL code 1 (211.56=setup[8.23]+cmd[203.33] seconds) tests_hybrid: FAIL code 1 (330.80=setup[7.73]+cmd[323.07] seconds) buildlighty: OK (35.74=setup[11.56]+cmd[24.18] seconds) docs: OK (34.48=setup[31.83]+cmd[2.66] seconds) docs-linkcheck: OK (36.23=setup[30.67]+cmd[5.56] seconds) checkbashisms: OK (3.38=setup[2.10]+cmd[0.01,0.06,1.20] seconds) pre-commit: OK (51.14=setup[3.08]+cmd[0.00,0.02,39.14,8.90] seconds) pylint: OK (30.69=setup[5.06]+cmd[25.63] seconds) evaluation failed :( (6014.72 seconds)