08:27:46 Triggered by Gerrit: https://git.opendaylight.org/gerrit/c/transportpce/+/120829 08:27:46 Running as SYSTEM 08:27:46 [EnvInject] - Loading node environment variables. 08:27:46 Building remotely on prd-ubuntu2204-docker-4c-16g-264115 (ubuntu2204-docker-4c-16g) in workspace /w/workspace/transportpce-tox-verify-transportpce-master 08:27:46 [ssh-agent] Looking for ssh-agent implementation... 08:27:46 [ssh-agent] Exec ssh-agent (binary ssh-agent on a remote machine) 08:27:46 $ ssh-agent 08:27:46 SSH_AUTH_SOCK=/tmp/ssh-XXXXXXS5iyAV/agent.7552 08:27:46 SSH_AGENT_PID=7554 08:27:46 [ssh-agent] Started. 08:27:46 Running ssh-add (command line suppressed) 08:27:46 Identity added: /w/workspace/transportpce-tox-verify-transportpce-master@tmp/private_key_12980515981518894424.key (/w/workspace/transportpce-tox-verify-transportpce-master@tmp/private_key_12980515981518894424.key) 08:27:46 [ssh-agent] Using credentials jenkins (jenkins-ssh) 08:27:46 The recommended git tool is: NONE 08:27:48 using credential jenkins-ssh 08:27:48 Wiping out workspace first. 08:27:48 Cloning the remote Git repository 08:27:48 Cloning repository git://devvexx.opendaylight.org/mirror/transportpce 08:27:48 > git init /w/workspace/transportpce-tox-verify-transportpce-master # timeout=10 08:27:48 Fetching upstream changes from git://devvexx.opendaylight.org/mirror/transportpce 08:27:48 > git --version # timeout=10 08:27:48 > git --version # 'git version 2.34.1' 08:27:48 using GIT_SSH to set credentials jenkins-ssh 08:27:48 Verifying host key using known hosts file, will automatically accept unseen keys 08:27:48 > git fetch --tags --force --progress -- git://devvexx.opendaylight.org/mirror/transportpce +refs/heads/*:refs/remotes/origin/* # timeout=10 08:27:52 > git config remote.origin.url git://devvexx.opendaylight.org/mirror/transportpce # timeout=10 08:27:52 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 08:27:52 > git config remote.origin.url git://devvexx.opendaylight.org/mirror/transportpce # timeout=10 08:27:52 Fetching upstream changes from git://devvexx.opendaylight.org/mirror/transportpce 08:27:52 using GIT_SSH to set credentials jenkins-ssh 08:27:52 Verifying host key using known hosts file, will automatically accept unseen keys 08:27:52 > git fetch --tags --force --progress -- git://devvexx.opendaylight.org/mirror/transportpce refs/changes/29/120829/11 # timeout=10 08:27:53 > git rev-parse f2deb42f7f04a46d5634ac8ce7e027719e9ce474^{commit} # timeout=10 08:27:53 JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://plugins.jenkins.io/git/#remove-git-plugin-buildsbybranch-builddata-script 08:27:53 Checking out Revision f2deb42f7f04a46d5634ac8ce7e027719e9ce474 (refs/changes/29/120829/11) 08:27:53 > git config core.sparsecheckout # timeout=10 08:27:53 > git checkout -f f2deb42f7f04a46d5634ac8ce7e027719e9ce474 # timeout=10 08:27:53 Commit message: "Support for openconfig 2.0" 08:27:53 > git rev-parse FETCH_HEAD^{commit} # timeout=10 08:27:53 > git rev-list --no-walk e130fb91dabce540f1060319d623dac2c4051003 # timeout=10 08:27:53 > git remote # timeout=10 08:27:53 > git submodule init # timeout=10 08:27:53 > git submodule sync # timeout=10 08:27:53 > git config --get remote.origin.url # timeout=10 08:27:53 > git submodule init # timeout=10 08:27:53 > git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10 08:27:53 ERROR: No submodules found. 08:27:56 provisioning config files... 08:27:56 copy managed file [npmrc] to file:/home/jenkins/.npmrc 08:27:56 copy managed file [pipconf] to file:/home/jenkins/.config/pip/pip.conf 08:27:56 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins9309890443701275328.sh 08:27:56 ---> python-tools-install.sh 08:27:56 Setup pyenv: 08:27:57 * system (set by /opt/pyenv/version) 08:27:57 * 3.8.20 (set by /opt/pyenv/version) 08:27:57 * 3.9.20 (set by /opt/pyenv/version) 08:27:57 3.10.15 08:27:57 3.11.10 08:28:01 lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-4cUP 08:28:01 lf-activate-venv(): INFO: Save venv in file: /tmp/.os_lf_venv 08:28:01 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 08:28:01 lf-activate-venv(): INFO: Attempting to install with network-safe options... 08:28:05 lf-activate-venv(): INFO: Base packages installed successfully 08:28:05 lf-activate-venv(): INFO: Installing additional packages: lftools 08:28:30 lf-activate-venv(): INFO: Adding /tmp/venv-4cUP/bin to PATH 08:28:30 Generating Requirements File 08:28:48 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. 08:28:48 httplib2 0.30.2 requires pyparsing<4,>=3.0.4, but you have pyparsing 2.4.7 which is incompatible. 08:28:48 Python 3.11.10 08:28:49 pip 26.0.1 from /tmp/venv-4cUP/lib/python3.11/site-packages/pip (python 3.11) 08:28:49 appdirs==1.4.4 08:28:49 argcomplete==3.6.3 08:28:49 aspy.yaml==1.3.0 08:28:49 attrs==25.4.0 08:28:49 autopage==0.6.0 08:28:49 beautifulsoup4==4.14.3 08:28:49 boto3==1.42.63 08:28:49 botocore==1.42.63 08:28:49 bs4==0.0.2 08:28:49 certifi==2026.2.25 08:28:49 cffi==2.0.0 08:28:49 cfgv==3.5.0 08:28:49 chardet==7.0.1 08:28:49 charset-normalizer==3.4.5 08:28:49 click==8.3.1 08:28:49 cliff==4.13.2 08:28:49 cmd2==3.4.0 08:28:49 cryptography==3.3.2 08:28:49 debtcollector==3.0.0 08:28:49 decorator==5.2.1 08:28:49 defusedxml==0.7.1 08:28:49 Deprecated==1.3.1 08:28:49 distlib==0.4.0 08:28:49 dnspython==2.8.0 08:28:49 docker==7.1.0 08:28:49 dogpile.cache==1.5.0 08:28:49 durationpy==0.10 08:28:49 email-validator==2.3.0 08:28:49 filelock==3.25.0 08:28:49 future==1.0.0 08:28:49 gitdb==4.0.12 08:28:49 GitPython==3.1.46 08:28:49 httplib2==0.30.2 08:28:49 identify==2.6.17 08:28:49 idna==3.11 08:28:49 importlib-resources==1.5.0 08:28:49 iso8601==2.1.0 08:28:49 Jinja2==3.1.6 08:28:49 jmespath==1.1.0 08:28:49 jsonpatch==1.33 08:28:49 jsonpointer==3.0.0 08:28:49 jsonschema==4.26.0 08:28:49 jsonschema-specifications==2025.9.1 08:28:49 keystoneauth1==5.13.1 08:28:49 kubernetes==35.0.0 08:28:49 lftools==0.37.22 08:28:49 lxml==6.0.2 08:28:49 markdown-it-py==4.0.0 08:28:49 MarkupSafe==3.0.3 08:28:49 mdurl==0.1.2 08:28:49 msgpack==1.1.2 08:28:49 multi_key_dict==2.0.3 08:28:49 munch==4.0.0 08:28:49 netaddr==1.3.0 08:28:49 niet==1.4.2 08:28:49 nodeenv==1.10.0 08:28:49 oauth2client==4.1.3 08:28:49 oauthlib==3.3.1 08:28:49 openstacksdk==4.10.0 08:28:49 os-service-types==1.8.2 08:28:49 osc-lib==4.4.0 08:28:49 oslo.config==10.3.0 08:28:49 oslo.context==6.3.0 08:28:49 oslo.i18n==6.7.2 08:28:49 oslo.log==8.1.0 08:28:49 oslo.serialization==5.9.1 08:28:49 oslo.utils==10.0.0 08:28:49 packaging==26.0 08:28:49 pbr==7.0.3 08:28:49 platformdirs==4.9.4 08:28:49 prettytable==3.17.0 08:28:49 psutil==7.2.2 08:28:49 pyasn1==0.6.2 08:28:49 pyasn1_modules==0.4.2 08:28:49 pycparser==3.0 08:28:49 pygerrit2==2.0.15 08:28:49 PyGithub==2.8.1 08:28:49 Pygments==2.19.2 08:28:49 PyJWT==2.11.0 08:28:49 PyNaCl==1.6.2 08:28:49 pyparsing==2.4.7 08:28:49 pyperclip==1.11.0 08:28:49 pyrsistent==0.20.0 08:28:49 python-cinderclient==9.9.0 08:28:49 python-dateutil==2.9.0.post0 08:28:49 python-discovery==1.1.1 08:28:49 python-heatclient==5.1.0 08:28:49 python-jenkins==1.8.3 08:28:49 python-keystoneclient==5.8.0 08:28:49 python-magnumclient==4.10.0 08:28:49 python-openstackclient==9.0.0 08:28:49 python-swiftclient==4.10.0 08:28:49 PyYAML==6.0.3 08:28:49 referencing==0.37.0 08:28:49 requests==2.32.5 08:28:49 requests-oauthlib==2.0.0 08:28:49 requestsexceptions==1.4.0 08:28:49 rfc3986==2.0.0 08:28:49 rich==14.3.3 08:28:49 rich-argparse==1.7.2 08:28:49 rpds-py==0.30.0 08:28:49 rsa==4.9.1 08:28:49 ruamel.yaml==0.19.1 08:28:49 ruamel.yaml.clib==0.2.15 08:28:49 s3transfer==0.16.0 08:28:49 simplejson==3.20.2 08:28:49 six==1.17.0 08:28:49 smmap==5.0.3 08:28:49 soupsieve==2.8.3 08:28:49 stevedore==5.7.0 08:28:49 tabulate==0.10.0 08:28:49 toml==0.10.2 08:28:49 tomlkit==0.14.0 08:28:49 tqdm==4.67.3 08:28:49 typing_extensions==4.15.0 08:28:49 urllib3==1.26.20 08:28:49 virtualenv==21.1.0 08:28:49 wcwidth==0.6.0 08:28:49 websocket-client==1.9.0 08:28:49 wrapt==2.1.2 08:28:49 xdg==6.0.0 08:28:49 xmltodict==1.0.4 08:28:49 yq==3.4.3 08:28:49 [EnvInject] - Injecting environment variables from a build step. 08:28:49 [EnvInject] - Injecting as environment variables the properties content 08:28:49 PYTHON=python3 08:28:49 08:28:49 [EnvInject] - Variables injected successfully. 08:28:49 [transportpce-tox-verify-transportpce-master] $ /bin/bash -l /tmp/jenkins16407732395487207572.sh 08:28:49 ---> tox-install.sh 08:28:49 + source /home/jenkins/lf-env.sh 08:28:49 + lf-activate-venv --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 08:28:49 ++ mktemp -d /tmp/venv-XXXX 08:28:49 + lf_venv=/tmp/venv-5EJr 08:28:49 + local venv_file=/tmp/.os_lf_venv 08:28:49 + local python=python3 08:28:49 + local options 08:28:49 + local set_path=true 08:28:49 + local install_args= 08:28:49 ++ getopt -o np:v: -l no-path,system-site-packages,python:,venv-file: -n lf-activate-venv -- --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 08:28:49 + options=' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 08:28:49 + eval set -- ' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 08:28:49 ++ set -- --venv-file /tmp/.toxenv -- tox virtualenv urllib3~=1.26.15 08:28:49 + true 08:28:49 + case $1 in 08:28:49 + venv_file=/tmp/.toxenv 08:28:49 + shift 2 08:28:49 + true 08:28:49 + case $1 in 08:28:49 + shift 08:28:49 + break 08:28:49 + case $python in 08:28:49 + local pkg_list= 08:28:49 + [[ -d /opt/pyenv ]] 08:28:49 + echo 'Setup pyenv:' 08:28:49 Setup pyenv: 08:28:49 + export PYENV_ROOT=/opt/pyenv 08:28:49 + PYENV_ROOT=/opt/pyenv 08:28:49 + export PATH=/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:49 + PATH=/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:49 + pyenv versions 08:28:49 system 08:28:49 3.8.20 08:28:49 3.9.20 08:28:49 3.10.15 08:28:49 * 3.11.10 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 08:28:49 + command -v pyenv 08:28:49 ++ pyenv init - --no-rehash 08:28:49 + eval 'PATH="$(bash --norc -ec '\''IFS=:; paths=($PATH); 08:28:49 for i in ${!paths[@]}; do 08:28:49 if [[ ${paths[i]} == "'\'''\''/opt/pyenv/shims'\'''\''" ]]; then unset '\''\'\'''\''paths[i]'\''\'\'''\''; 08:28:49 fi; done; 08:28:49 echo "${paths[*]}"'\'')" 08:28:49 export PATH="/opt/pyenv/shims:${PATH}" 08:28:49 export PYENV_SHELL=bash 08:28:49 source '\''/opt/pyenv/libexec/../completions/pyenv.bash'\'' 08:28:49 pyenv() { 08:28:49 local command 08:28:49 command="${1:-}" 08:28:49 if [ "$#" -gt 0 ]; then 08:28:49 shift 08:28:49 fi 08:28:49 08:28:49 case "$command" in 08:28:49 rehash|shell) 08:28:49 eval "$(pyenv "sh-$command" "$@")" 08:28:49 ;; 08:28:49 *) 08:28:49 command pyenv "$command" "$@" 08:28:49 ;; 08:28:49 esac 08:28:49 }' 08:28:49 +++ bash --norc -ec 'IFS=:; paths=($PATH); 08:28:49 for i in ${!paths[@]}; do 08:28:49 if [[ ${paths[i]} == "/opt/pyenv/shims" ]]; then unset '\''paths[i]'\''; 08:28:49 fi; done; 08:28:49 echo "${paths[*]}"' 08:28:49 ++ PATH=/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:49 ++ export PATH=/opt/pyenv/shims:/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:49 ++ PATH=/opt/pyenv/shims:/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:49 ++ export PYENV_SHELL=bash 08:28:49 ++ PYENV_SHELL=bash 08:28:49 ++ source /opt/pyenv/libexec/../completions/pyenv.bash 08:28:49 +++ complete -F _pyenv pyenv 08:28:49 ++ lf-pyver python3 08:28:49 ++ local py_version_xy=python3 08:28:49 ++ local py_version_xyz= 08:28:49 ++ pyenv versions 08:28:49 ++ local command 08:28:49 ++ command=versions 08:28:49 ++ '[' 1 -gt 0 ']' 08:28:49 ++ shift 08:28:49 ++ case "$command" in 08:28:49 ++ command pyenv versions 08:28:49 ++ awk '{ print $1 }' 08:28:49 ++ grep -E '^[0-9.]*[0-9]$' 08:28:49 ++ sed 's/^[ *]* //' 08:28:49 ++ [[ ! -s /tmp/.pyenv_versions ]] 08:28:49 +++ grep '^3' /tmp/.pyenv_versions 08:28:49 +++ sort -V 08:28:49 +++ tail -n 1 08:28:49 ++ py_version_xyz=3.11.10 08:28:49 ++ [[ -z 3.11.10 ]] 08:28:49 ++ echo 3.11.10 08:28:49 ++ return 0 08:28:49 + pyenv local 3.11.10 08:28:49 + local command 08:28:49 + command=local 08:28:49 + '[' 2 -gt 0 ']' 08:28:49 + shift 08:28:49 + case "$command" in 08:28:49 + command pyenv local 3.11.10 08:28:49 + for arg in "$@" 08:28:49 + case $arg in 08:28:49 + pkg_list+='tox ' 08:28:49 + for arg in "$@" 08:28:49 + case $arg in 08:28:49 + pkg_list+='virtualenv ' 08:28:49 + for arg in "$@" 08:28:49 + case $arg in 08:28:49 + pkg_list+='urllib3~=1.26.15 ' 08:28:49 + [[ -f /tmp/.toxenv ]] 08:28:49 + [[ ! -f /tmp/.toxenv ]] 08:28:49 + [[ -n '' ]] 08:28:49 + python3 -m venv /tmp/venv-5EJr 08:28:53 + echo 'lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-5EJr' 08:28:53 lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-5EJr 08:28:53 + echo /tmp/venv-5EJr 08:28:53 + echo 'lf-activate-venv(): INFO: Save venv in file: /tmp/.toxenv' 08:28:53 lf-activate-venv(): INFO: Save venv in file: /tmp/.toxenv 08:28:53 + echo 'lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv)' 08:28:53 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 08:28:53 + local 'pip_opts=--upgrade --quiet' 08:28:53 + pip_opts='--upgrade --quiet --trusted-host pypi.org' 08:28:53 + pip_opts='--upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org' 08:28:53 + pip_opts='--upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org' 08:28:53 + [[ -n '' ]] 08:28:53 + [[ -n '' ]] 08:28:53 + echo 'lf-activate-venv(): INFO: Attempting to install with network-safe options...' 08:28:53 lf-activate-venv(): INFO: Attempting to install with network-safe options... 08:28:53 + /tmp/venv-5EJr/bin/python3 -m pip install --upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org pip 'setuptools<66' virtualenv 08:28:57 + echo 'lf-activate-venv(): INFO: Base packages installed successfully' 08:28:57 lf-activate-venv(): INFO: Base packages installed successfully 08:28:57 + [[ -z tox virtualenv urllib3~=1.26.15 ]] 08:28:57 + echo 'lf-activate-venv(): INFO: Installing additional packages: tox virtualenv urllib3~=1.26.15 ' 08:28:57 lf-activate-venv(): INFO: Installing additional packages: tox virtualenv urllib3~=1.26.15 08:28:57 + /tmp/venv-5EJr/bin/python3 -m pip install --upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org --upgrade-strategy eager tox virtualenv urllib3~=1.26.15 08:28:59 + type python3 08:28:59 + true 08:28:59 + echo 'lf-activate-venv(): INFO: Adding /tmp/venv-5EJr/bin to PATH' 08:28:59 lf-activate-venv(): INFO: Adding /tmp/venv-5EJr/bin to PATH 08:28:59 + PATH=/tmp/venv-5EJr/bin:/opt/pyenv/shims:/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 + return 0 08:28:59 + python3 --version 08:28:59 Python 3.11.10 08:28:59 + python3 -m pip --version 08:28:59 pip 26.0.1 from /tmp/venv-5EJr/lib/python3.11/site-packages/pip (python 3.11) 08:28:59 + python3 -m pip freeze 08:28:59 cachetools==7.0.4 08:28:59 colorama==0.4.6 08:28:59 distlib==0.4.0 08:28:59 filelock==3.25.0 08:28:59 packaging==26.0 08:28:59 platformdirs==4.9.4 08:28:59 pluggy==1.6.0 08:28:59 pyproject-api==1.10.0 08:28:59 python-discovery==1.1.1 08:28:59 tomli_w==1.2.0 08:28:59 tox==4.49.0 08:28:59 urllib3==1.26.20 08:28:59 virtualenv==21.1.0 08:28:59 [transportpce-tox-verify-transportpce-master] $ /bin/sh -xe /tmp/jenkins16361923483296820859.sh 08:28:59 [EnvInject] - Injecting environment variables from a build step. 08:28:59 [EnvInject] - Injecting as environment variables the properties content 08:28:59 PARALLEL=True 08:28:59 08:28:59 [EnvInject] - Variables injected successfully. 08:28:59 [transportpce-tox-verify-transportpce-master] $ /bin/bash -l /tmp/jenkins16263799501848959469.sh 08:28:59 ---> tox-run.sh 08:28:59 + PATH=/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 + ARCHIVE_TOX_DIR=/w/workspace/transportpce-tox-verify-transportpce-master/archives/tox 08:28:59 + ARCHIVE_DOC_DIR=/w/workspace/transportpce-tox-verify-transportpce-master/archives/docs 08:28:59 + mkdir -p /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox 08:28:59 + cd /w/workspace/transportpce-tox-verify-transportpce-master/. 08:28:59 + source /home/jenkins/lf-env.sh 08:28:59 + lf-activate-venv --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 08:28:59 ++ mktemp -d /tmp/venv-XXXX 08:28:59 + lf_venv=/tmp/venv-yvxB 08:28:59 + local venv_file=/tmp/.os_lf_venv 08:28:59 + local python=python3 08:28:59 + local options 08:28:59 + local set_path=true 08:28:59 + local install_args= 08:28:59 ++ getopt -o np:v: -l no-path,system-site-packages,python:,venv-file: -n lf-activate-venv -- --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 08:28:59 + options=' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 08:28:59 + eval set -- ' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 08:28:59 ++ set -- --venv-file /tmp/.toxenv -- tox virtualenv urllib3~=1.26.15 08:28:59 + true 08:28:59 + case $1 in 08:28:59 + venv_file=/tmp/.toxenv 08:28:59 + shift 2 08:28:59 + true 08:28:59 + case $1 in 08:28:59 + shift 08:28:59 + break 08:28:59 + case $python in 08:28:59 + local pkg_list= 08:28:59 + [[ -d /opt/pyenv ]] 08:28:59 + echo 'Setup pyenv:' 08:28:59 Setup pyenv: 08:28:59 + export PYENV_ROOT=/opt/pyenv 08:28:59 + PYENV_ROOT=/opt/pyenv 08:28:59 + export PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 + PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 + pyenv versions 08:28:59 system 08:28:59 3.8.20 08:28:59 3.9.20 08:28:59 3.10.15 08:28:59 * 3.11.10 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 08:28:59 + command -v pyenv 08:28:59 ++ pyenv init - --no-rehash 08:28:59 + eval 'PATH="$(bash --norc -ec '\''IFS=:; paths=($PATH); 08:28:59 for i in ${!paths[@]}; do 08:28:59 if [[ ${paths[i]} == "'\'''\''/opt/pyenv/shims'\'''\''" ]]; then unset '\''\'\'''\''paths[i]'\''\'\'''\''; 08:28:59 fi; done; 08:28:59 echo "${paths[*]}"'\'')" 08:28:59 export PATH="/opt/pyenv/shims:${PATH}" 08:28:59 export PYENV_SHELL=bash 08:28:59 source '\''/opt/pyenv/libexec/../completions/pyenv.bash'\'' 08:28:59 pyenv() { 08:28:59 local command 08:28:59 command="${1:-}" 08:28:59 if [ "$#" -gt 0 ]; then 08:28:59 shift 08:28:59 fi 08:28:59 08:28:59 case "$command" in 08:28:59 rehash|shell) 08:28:59 eval "$(pyenv "sh-$command" "$@")" 08:28:59 ;; 08:28:59 *) 08:28:59 command pyenv "$command" "$@" 08:28:59 ;; 08:28:59 esac 08:28:59 }' 08:28:59 +++ bash --norc -ec 'IFS=:; paths=($PATH); 08:28:59 for i in ${!paths[@]}; do 08:28:59 if [[ ${paths[i]} == "/opt/pyenv/shims" ]]; then unset '\''paths[i]'\''; 08:28:59 fi; done; 08:28:59 echo "${paths[*]}"' 08:28:59 ++ PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 ++ export PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 ++ PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:28:59 ++ export PYENV_SHELL=bash 08:28:59 ++ PYENV_SHELL=bash 08:28:59 ++ source /opt/pyenv/libexec/../completions/pyenv.bash 08:28:59 +++ complete -F _pyenv pyenv 08:28:59 ++ lf-pyver python3 08:28:59 ++ local py_version_xy=python3 08:28:59 ++ local py_version_xyz= 08:28:59 ++ pyenv versions 08:28:59 ++ sed 's/^[ *]* //' 08:28:59 ++ local command 08:28:59 ++ command=versions 08:28:59 ++ '[' 1 -gt 0 ']' 08:28:59 ++ shift 08:28:59 ++ case "$command" in 08:28:59 ++ command pyenv versions 08:28:59 ++ grep -E '^[0-9.]*[0-9]$' 08:28:59 ++ awk '{ print $1 }' 08:28:59 ++ [[ ! -s /tmp/.pyenv_versions ]] 08:28:59 +++ sort -V 08:28:59 +++ grep '^3' /tmp/.pyenv_versions 08:28:59 +++ tail -n 1 08:28:59 ++ py_version_xyz=3.11.10 08:28:59 ++ [[ -z 3.11.10 ]] 08:28:59 ++ echo 3.11.10 08:28:59 ++ return 0 08:28:59 + pyenv local 3.11.10 08:28:59 + local command 08:28:59 + command=local 08:28:59 + '[' 2 -gt 0 ']' 08:28:59 + shift 08:28:59 + case "$command" in 08:28:59 + command pyenv local 3.11.10 08:28:59 + for arg in "$@" 08:28:59 + case $arg in 08:28:59 + pkg_list+='tox ' 08:28:59 + for arg in "$@" 08:28:59 + case $arg in 08:28:59 + pkg_list+='virtualenv ' 08:28:59 + for arg in "$@" 08:28:59 + case $arg in 08:28:59 + pkg_list+='urllib3~=1.26.15 ' 08:28:59 + [[ -f /tmp/.toxenv ]] 08:28:59 ++ cat /tmp/.toxenv 08:28:59 + lf_venv=/tmp/venv-5EJr 08:28:59 + echo 'lf-activate-venv(): INFO: Reuse venv:/tmp/venv-5EJr from' file:/tmp/.toxenv 08:28:59 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-5EJr from file:/tmp/.toxenv 08:28:59 + echo 'lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv)' 08:28:59 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 08:28:59 + local 'pip_opts=--upgrade --quiet' 08:28:59 + pip_opts='--upgrade --quiet --trusted-host pypi.org' 08:28:59 + pip_opts='--upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org' 08:28:59 + pip_opts='--upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org' 08:28:59 + [[ -n '' ]] 08:28:59 + [[ -n '' ]] 08:28:59 + echo 'lf-activate-venv(): INFO: Attempting to install with network-safe options...' 08:28:59 lf-activate-venv(): INFO: Attempting to install with network-safe options... 08:28:59 + /tmp/venv-5EJr/bin/python3 -m pip install --upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org pip 'setuptools<66' virtualenv 08:29:00 + echo 'lf-activate-venv(): INFO: Base packages installed successfully' 08:29:00 lf-activate-venv(): INFO: Base packages installed successfully 08:29:00 + [[ -z tox virtualenv urllib3~=1.26.15 ]] 08:29:00 + echo 'lf-activate-venv(): INFO: Installing additional packages: tox virtualenv urllib3~=1.26.15 ' 08:29:00 lf-activate-venv(): INFO: Installing additional packages: tox virtualenv urllib3~=1.26.15 08:29:00 + /tmp/venv-5EJr/bin/python3 -m pip install --upgrade --quiet --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org --upgrade-strategy eager tox virtualenv urllib3~=1.26.15 08:29:01 + type python3 08:29:01 + true 08:29:01 + echo 'lf-activate-venv(): INFO: Adding /tmp/venv-5EJr/bin to PATH' 08:29:01 lf-activate-venv(): INFO: Adding /tmp/venv-5EJr/bin to PATH 08:29:01 + PATH=/tmp/venv-5EJr/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:29:01 + return 0 08:29:01 + [[ -d /opt/pyenv ]] 08:29:01 + echo '---> Setting up pyenv' 08:29:01 ---> Setting up pyenv 08:29:01 + export PYENV_ROOT=/opt/pyenv 08:29:01 + PYENV_ROOT=/opt/pyenv 08:29:01 + export PATH=/opt/pyenv/bin:/tmp/venv-5EJr/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:29:01 + PATH=/opt/pyenv/bin:/tmp/venv-5EJr/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 08:29:01 ++ pwd 08:29:01 + PYTHONPATH=/w/workspace/transportpce-tox-verify-transportpce-master 08:29:01 + export PYTHONPATH 08:29:01 + export TOX_TESTENV_PASSENV=PYTHONPATH 08:29:01 + TOX_TESTENV_PASSENV=PYTHONPATH 08:29:01 + tox --version 08:29:02 4.49.0 from /tmp/venv-5EJr/lib/python3.11/site-packages/tox/__init__.py 08:29:02 + PARALLEL=True 08:29:02 + TOX_OPTIONS_LIST= 08:29:02 + [[ -n '' ]] 08:29:02 + case ${PARALLEL,,} in 08:29:02 + TOX_OPTIONS_LIST=' --parallel auto --parallel-live' 08:29:02 + tox --parallel auto --parallel-live 08:29:02 + tee -a /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tox.log 08:29:03 docs-linkcheck: install_deps> python -I -m pip install -r docs/requirements.txt 08:29:04 checkbashisms: freeze> python -m pip freeze --all 08:29:04 docs: install_deps> python -I -m pip install -r docs/requirements.txt 08:29:04 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 08:29:04 checkbashisms: pip==26.0.1,setuptools==82.0.0 08:29:04 checkbashisms: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./fixCIcentOS8reposMirrors.sh 08:29:04 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)' 08:29:04 checkbashisms: commands[2] /w/workspace/transportpce-tox-verify-transportpce-master/tests> find . -not -path '*/\.*' -name '*.sh' -exec checkbashisms -f '{}' + 08:29:06 checkbashisms: OK ✔ in 3.42 seconds 08:29:06 pre-commit: install_deps> python -I -m pip install pre-commit 08:29:08 pre-commit: freeze> python -m pip freeze --all 08:29:08 pre-commit: cfgv==3.5.0,distlib==0.4.0,filelock==3.25.0,identify==2.6.17,nodeenv==1.10.0,pip==26.0.1,platformdirs==4.9.4,pre_commit==4.5.1,python-discovery==1.1.1,PyYAML==6.0.3,setuptools==82.0.0,virtualenv==21.1.0 08:29:08 pre-commit: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./fixCIcentOS8reposMirrors.sh 08:29:08 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)' 08:29:09 /usr/bin/cpan 08:29:09 pre-commit: commands[2] /w/workspace/transportpce-tox-verify-transportpce-master/tests> pre-commit run --all-files --show-diff-on-failure 08:29:09 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. 08:29:09 [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. 08:29:09 [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. 08:29:10 [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. 08:29:10 [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. 08:29:10 buildcontroller: freeze> python -m pip freeze --all 08:29:11 buildcontroller: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:29:11 buildcontroller: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_controller.sh 08:29:11 + update-java-alternatives -l 08:29:11 java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64 08:29:11 java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64 08:29:11 java-1.21.0-openjdk-amd64 2111 /usr/lib/jvm/java-1.21.0-openjdk-amd64 08:29:11 + sudo update-java-alternatives -s java-1.21.0-openjdk-amd64 08:29:11 [INFO] Initializing environment for https://github.com/perltidy/perltidy. 08:29:11 update-alternatives: error: no alternatives for jaotc 08:29:11 update-alternatives: error: no alternatives for rmic 08:29:11 + sed -n ;s/.* version "\(.*\)\.\(.*\)\..*".*$/\1/p; 08:29:11 + java -version 08:29:11 21 08:29:11 + JAVA_VER=21 08:29:11 + echo 21 08:29:11 + javac -version 08:29:11 + sed -n ;s/javac \(.*\)\.\(.*\)\..*.*$/\1/p; 08:29:11 21 08:29:11 ok, java is 21 or newer 08:29:11 + JAVAC_VER=21 08:29:11 + echo 21 08:29:11 + [ 21 -ge 21 ] 08:29:11 + [ 21 -ge 21 ] 08:29:11 + echo ok, java is 21 or newer 08:29:11 + wget -nv https://dlcdn.apache.org/maven/maven-3/3.9.13/binaries/apache-maven-3.9.13-bin.tar.gz -P /tmp 08:29:11 [INFO] Initializing environment for https://github.com/koalaman/shellcheck-precommit. 08:29:11 2026-03-09 08:29:11 URL:https://dlcdn.apache.org/maven/maven-3/3.9.13/binaries/apache-maven-3.9.13-bin.tar.gz [9620438/9620438] -> "/tmp/apache-maven-3.9.13-bin.tar.gz" [1] 08:29:11 + sudo mkdir -p /opt 08:29:11 + sudo tar xf /tmp/apache-maven-3.9.13-bin.tar.gz -C /opt 08:29:11 + sudo ln -s /opt/apache-maven-3.9.13 /opt/maven 08:29:11 + sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn 08:29:11 + mvn --version 08:29:12 [INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier. 08:29:12 Apache Maven 3.9.13 (39d686bd50d8e054301e3a68ad44781df6f80dda) 08:29:12 Maven home: /opt/maven 08:29:12 Java version: 21.0.10, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64 08:29:12 Default locale: en, platform encoding: UTF-8 08:29:12 OS name: "linux", version: "5.15.0-171-generic", arch: "amd64", family: "unix" 08:29:12 NOTE: Picked up JDK_JAVA_OPTIONS: 08:29:12 --add-opens=java.base/java.io=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.lang=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.net=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.nio=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.nio.file=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.util=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.util.jar=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.util.stream=ALL-UNNAMED 08:29:12 --add-opens=java.base/java.util.zip=ALL-UNNAMED 08:29:12 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 08:29:12 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 08:29:12 -Xlog:disable 08:29:12 [INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier:prettier@4.0.0-alpha.8. 08:29:12 [INFO] Initializing environment for https://github.com/adrienverge/yamllint. 08:29:12 [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. 08:29:12 [INFO] Once installed this environment will be reused. 08:29:12 [INFO] This may take a few minutes... 08:29:18 [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. 08:29:18 [INFO] Once installed this environment will be reused. 08:29:18 [INFO] This may take a few minutes... 08:29:25 [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. 08:29:25 [INFO] Once installed this environment will be reused. 08:29:25 [INFO] This may take a few minutes... 08:29:30 [INFO] Installing environment for https://github.com/perltidy/perltidy. 08:29:30 [INFO] Once installed this environment will be reused. 08:29:30 [INFO] This may take a few minutes... 08:29:30 docs-linkcheck: freeze> python -m pip freeze --all 08:29:31 docs-linkcheck: alabaster==1.0.0,attrs==25.4.0,babel==2.18.0,blockdiag==3.0.0,certifi==2026.2.25,charset-normalizer==3.4.5,contourpy==1.3.3,cycler==0.12.1,docutils==0.21.2,fonttools==4.61.1,funcparserlib==2.0.0a0,future==1.0.0,idna==3.11,imagesize==2.0.0,Jinja2==3.1.6,jsonschema==3.2.0,kiwisolver==1.4.9,lfdocs_conf==0.10.0,MarkupSafe==3.0.3,matplotlib==3.10.8,numpy==2.4.3,nwdiag==3.0.0,packaging==26.0,pillow==12.1.1,pip==26.0.1,Pygments==2.19.2,pyparsing==3.3.2,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,roman-numerals-py==4.1.0,seqdiag==3.0.0,setuptools==82.0.0,six==1.17.0,snowballstemmer==3.0.1,Sphinx==8.2.3,sphinx-bootstrap-theme==0.8.1,sphinx-data-viewer==0.1.5,sphinx-tabs==3.5.0,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 08:29:31 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 08:29:31 docs: freeze> python -m pip freeze --all 08:29:31 docs: alabaster==1.0.0,attrs==25.4.0,babel==2.18.0,blockdiag==3.0.0,certifi==2026.2.25,charset-normalizer==3.4.5,contourpy==1.3.3,cycler==0.12.1,docutils==0.21.2,fonttools==4.61.1,funcparserlib==2.0.0a0,future==1.0.0,idna==3.11,imagesize==2.0.0,Jinja2==3.1.6,jsonschema==3.2.0,kiwisolver==1.4.9,lfdocs_conf==0.10.0,MarkupSafe==3.0.3,matplotlib==3.10.8,numpy==2.4.3,nwdiag==3.0.0,packaging==26.0,pillow==12.1.1,pip==26.0.1,Pygments==2.19.2,pyparsing==3.3.2,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,roman-numerals-py==4.1.0,seqdiag==3.0.0,setuptools==82.0.0,six==1.17.0,snowballstemmer==3.0.1,Sphinx==8.2.3,sphinx-bootstrap-theme==0.8.1,sphinx-data-viewer==0.1.5,sphinx-tabs==3.5.0,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 08:29:31 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 08:29:35 docs: OK ✔ in 32.51 seconds 08:29:35 pylint: install_deps> python -I -m pip install 'pylint>=2.6.0' 08:29:38 docs-linkcheck: OK ✔ in 34.37 seconds 08:29:38 pylint: freeze> python -m pip freeze --all 08:29:39 pylint: astroid==4.0.4,dill==0.4.1,isort==8.0.1,mccabe==0.7.0,pip==26.0.1,platformdirs==4.9.4,pylint==4.0.5,setuptools==82.0.0,tomlkit==0.14.0 08:29:39 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}$' '{}' + 08:29:42 [INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier. 08:29:42 [INFO] Once installed this environment will be reused. 08:29:42 [INFO] This may take a few minutes... 08:29:45 [INFO] Installing environment for https://github.com/adrienverge/yamllint. 08:29:45 [INFO] Once installed this environment will be reused. 08:29:45 [INFO] This may take a few minutes... 08:29:50 trim trailing whitespace.................................................Passed 08:29:51 fix end of files.........................................................Failed 08:29:51 - hook id: end-of-file-fixer 08:29:51 - exit code: 1 08:29:51 - files were modified by this hook 08:29:51 08:29:51 Fixing tests/karafoc200.env 08:29:51 Fixing renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/DeviceTransceiver.java 08:29:51 Fixing renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/DeleteService.java 08:29:51 Fixing renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/Delete.java 08:29:51 08:29:51 check for added large files..............................................Passed 08:29:51 check for merge conflicts................................................Passed 08:29:51 check for case conflicts.................................................Passed 08:29:52 check json...............................................................Passed 08:29:52 mixed line ending........................................................Passed 08:29:52 Tabs remover.............................................................Passed 08:29:53 autopep8.................................................................Failed 08:29:56 - hook id: autopep8 08:29:56 - files were modified by this hook 08:29:57 perltidy.................................................................Passed 08:29:57 ShellCheck v0.10.0.......................................................Passed 08:30:03 prettier.................................................................Passed 08:30:05 yamllint.................................................................Passed 08:30:05 pre-commit hook(s) made changes. 08:30:05 If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. 08:30:05 To run `pre-commit` as part of git workflow, use `pre-commit install`. 08:30:05 All changes made by hooks: 08:30:05 diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/DeviceTransceiver.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/DeviceTransceiver.java 08:30:05 index 974466f5b..1781ccd03 100644 08:30:05 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/DeviceTransceiver.java 08:30:05 +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/DeviceTransceiver.java 08:30:05 @@ -53,4 +53,4 @@ public class DeviceTransceiver implements Transaction { 08:30:05 return Objects.equals(nodeId, that.nodeId) && Objects.equals(transceiverId, 08:30:05 that.transceiverId); 08:30:05 } 08:30:05 -} 08:30:05 \ No newline at end of file 08:30:05 +} 08:30:05 diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/Delete.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/Delete.java 08:30:05 index a9aacdb06..4caf9b983 100644 08:30:05 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/Delete.java 08:30:05 +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/Delete.java 08:30:05 @@ -37,4 +37,4 @@ public interface Delete { 08:30:05 * Disable tx-laser of line transceiver component. 08:30:05 */ 08:30:05 boolean disableTransceiversTxLaser(String nodeId, String transceiver); 08:30:05 -} 08:30:05 \ No newline at end of file 08:30:05 +} 08:30:05 diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/DeleteService.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/DeleteService.java 08:30:05 index 100998157..db1fc99e7 100644 08:30:05 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/DeleteService.java 08:30:05 +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/transaction/delete/DeleteService.java 08:30:05 @@ -113,4 +113,4 @@ public class DeleteService implements Delete { 08:30:05 } 08:30:05 } 08:30:05 08:30:05 -} 08:30:05 \ No newline at end of file 08:30:05 +} 08:30:05 diff --git a/tests/karafoc200.env b/tests/karafoc200.env 08:30:05 index 9879603e9..97c2b0d07 100644 08:30:05 --- a/tests/karafoc200.env 08:30:05 +++ b/tests/karafoc200.env 08:30:05 @@ -6,4 +6,4 @@ export USE_ODL_ALT_RMI_REGISTRY_PORT=1104 08:30:05 export USE_ODL_ALT_RMI_SERVER_PORT=44449 08:30:05 export USE_ODL_ALT_RESTCONF_PORT=8191 08:30:05 export OLM_TIMER1=3000 08:30:05 -export OLM_TIMER2=2000 08:30:05 \ No newline at end of file 08:30:05 +export OLM_TIMER2=2000 08:30:05 diff --git a/tests/transportpce_tests/oc200/test03_renderer.py b/tests/transportpce_tests/oc200/test03_renderer.py 08:30:05 index fd29913d3..06b23b6cc 100644 08:30:05 --- a/tests/transportpce_tests/oc200/test03_renderer.py 08:30:05 +++ b/tests/transportpce_tests/oc200/test03_renderer.py 08:30:05 @@ -188,7 +188,7 @@ class TestTransportPCERenderer(unittest.TestCase): 08:30:05 'service-format': 'Ethernet', 08:30:05 'nodes': [{'node-id': 'XPDR-OC', 'client-tp': 'XPDR1-CLIENT1'}] 08:30:05 }) 08:30:05 - #TestTransportPCERenderer.optical_channel_id = response['output']['node-interface'][0]['optical-channel-id'] 08:30:05 + # TestTransportPCERenderer.optical_channel_id = response['output']['node-interface'][0]['optical-channel-id'] 08:30:05 TestTransportPCERenderer.port_id = response['output']['node-interface'][0]['port-id'] 08:30:05 self.assertEqual(response['status_code'], requests.codes.ok) 08:30:05 self.assertIn('Otn Service path was set up successfully for node :XPDR-OC', 08:30:05 pre-commit: exit 1 (56.74 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> pre-commit run --all-files --show-diff-on-failure pid=8460 08:30:07 08:30:07 ------------------------------------ 08:30:07 Your code has been rated at 10.00/10 08:30:07 08:30:51 pre-commit: FAIL ✖ in 59.83 seconds 08:30:51 pylint: OK ✔ in 34.66 seconds 08:30:51 buildcontroller: OK ✔ in 1 minute 47.84 seconds 08:30:51 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 08:30:51 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 08:30:51 build_karaf_tests200: 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 08:30:51 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 08:30:57 build_karaf_tests71: freeze> python -m pip freeze --all 08:30:57 build_karaf_tests121: freeze> python -m pip freeze --all 08:30:57 build_karaf_tests200: freeze> python -m pip freeze --all 08:30:57 build_karaf_tests221: freeze> python -m pip freeze --all 08:30:58 build_karaf_tests71: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:30:58 build_karaf_tests71: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 08:30:58 build_karaf_tests121: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:30:58 build_karaf_tests121: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 08:30:58 build karaf in karaf71 with ./karaf71.env 08:30:58 build karaf in karaf121 with ./karaf121.env 08:30:58 build_karaf_tests200: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:30:58 build_karaf_tests200: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 08:30:58 build karaf in karafoc200 with ./karafoc200.env 08:30:58 build_karaf_tests221: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:30:58 build_karaf_tests221: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 08:30:58 build karaf in karaf221 with ./karaf221.env 08:30:58 NOTE: Picked up JDK_JAVA_OPTIONS: 08:30:58 --add-opens=java.base/java.io=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.net=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.file=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.jar=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.stream=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.zip=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 08:30:58 -Xlog:disable 08:30:58 NOTE: Picked up JDK_JAVA_OPTIONS: 08:30:58 --add-opens=java.base/java.io=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.net=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.file=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.jar=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.stream=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.zip=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 08:30:58 -Xlog:disable 08:30:58 NOTE: Picked up JDK_JAVA_OPTIONS: 08:30:58 --add-opens=java.base/java.io=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.net=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.file=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.jar=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.stream=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.zip=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 08:30:58 -Xlog:disable 08:30:58 NOTE: Picked up JDK_JAVA_OPTIONS: 08:30:58 --add-opens=java.base/java.io=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.net=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.nio.file=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.jar=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.stream=ALL-UNNAMED 08:30:58 --add-opens=java.base/java.util.zip=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 08:30:58 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 08:30:58 -Xlog:disable 08:31:51 build_karaf_tests221: OK ✔ in 1 minute 0.99 seconds 08:31:51 build_karaf_tests121: OK ✔ in 1 minute 1.02 seconds 08:31:51 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 08:31:51 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 08:31:52 build_karaf_tests71: OK ✔ in 1 minute 1.7 seconds 08:31:52 build_karaf_tests200: OK ✔ in 1 minute 1.7 seconds 08:31:52 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 08:31:59 buildlighty: freeze> python -m pip freeze --all 08:31:59 sims: freeze> python -m pip freeze --all 08:32:00 sims: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:32:00 sims: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./install_lightynode.sh 08:32:00 Using lighynode version 22.1.0.7 08:32:00 buildlighty: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:32:00 buildlighty: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/lighty> ./build.sh 08:32:00 Installing lightynode device to ./lightynode/lightynode-openroadm-device directory 08:32:00 NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED 08:32:02 sims: OK ✔ in 11.29 seconds 08:32:02 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 08:32:09 tests71: freeze> python -m pip freeze --all 08:32:10 tests71: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:32:10 tests71: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 7.1 08:32:10 using environment variables from ./karaf71.env 08:32:10 pytest -q transportpce_tests/7.1/test01_portmapping.py 08:32:46 buildlighty: OK ✔ in 36.96 seconds 08:32:46 testsPCE: freeze> python -m pip freeze --all 08:32:46 testsPCE: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,click==8.3.1,contourpy==1.3.3,cryptography==3.3.2,cycler==0.12.1,dict2xml==1.7.8,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==26.0,pandas==1.5.3,paramiko==4.0.0,pbr==5.11.1,pillow==12.1.1,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pyparsing==3.3.2,pytest==9.0.2,python-dateutil==2.9.0.post0,pytz==2026.1.post1,requests==2.32.5,scipy==1.17.1,setuptools==50.3.2,six==1.17.0,urllib3==2.6.3,Werkzeug==2.0.3,xlrd==1.2.0 08:32:46 testsPCE: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh pce 08:32:46 pytest -q transportpce_tests/pce/test01_pce.py 08:32:54 ............ [100%] 08:33:07 12 passed in 57.03s 08:33:07 pytest -q transportpce_tests/7.1/test02_otn_renderer.py 08:33:48 .................................................. [100%] 08:34:51 20 passed in 124.77s (0:02:04) 08:34:51 pytest -q transportpce_tests/pce/test02_pce_400G.py 08:34:52 .................................. [100%] 08:35:38 12 passed in 46.24s 08:35:38 pytest -q transportpce_tests/pce/test03_gnpy.py 08:35:38 ............. [100%] 08:35:59 62 passed in 171.49s (0:02:51) 08:35:59 pytest -q transportpce_tests/7.1/test03_renderer_or_modes.py 08:36:00 ..... [100%] 08:36:17 8 passed in 38.71s 08:36:17 pytest -q transportpce_tests/pce/test04_pce_bug_fix.py 08:36:32 ............. [100%] 08:36:57 3 passed in 39.48s 08:36:57 .testsPCE: OK ✔ in 5 minutes 5.16 seconds 08:36:57 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 08:36:57 tests200: 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 08:36:57 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 08:36:59 ...tests_tapi: freeze> python -m pip freeze --all 08:37:04 tests200: freeze> python -m pip freeze --all 08:37:04 tests121: freeze> python -m pip freeze --all 08:37:04 tests_tapi: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:37:04 tests_tapi: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh tapi 08:37:04 using environment variables from ./karaf221.env 08:37:04 pytest -q transportpce_tests/tapi/test01_abstracted_topology.py 08:37:04 tests200: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:37:04 tests200: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh oc200 08:37:04 using environment variables from ./karafoc200.env 08:37:04 pytest -q transportpce_tests/oc200/test01_portmapping.py 08:37:04 tests121: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 08:37:04 tests121: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 1.2.1 08:37:04 using environment variables from ./karaf121.env 08:37:04 pytest -q transportpce_tests/1.2.1/test01_portmapping.py 08:37:05 ....................................... [100%] 08:38:20 48 passed in 141.33s (0:02:21) 08:38:21 pytest -q transportpce_tests/7.1/test04_renderer_regen_mode.py 08:38:21 ..... [100%] 08:38:27 10 passed in 82.76s (0:01:22) 08:38:27 pytest -q transportpce_tests/oc200/test02_topology.py 08:39:11 ............................................................... [100%] 08:39:53 14 passed in 86.03s (0:01:26) 08:39:53 .pytest -q transportpce_tests/oc200/test03_renderer.py 08:39:55 .. [100%] 08:39:59 22 passed in 98.24s (0:01:38) 08:40:10 ....................... [100%] 08:40:42 16 passed in 48.57s 08:40:54 ..FFF........FF.FF.F.FF.FFFFFFFFFF [100%] 08:41:37 =================================== FAILURES =================================== 08:41:37 ___________ TestTransportPCEPortmapping.test_02_rdm_device_connected ___________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01', query='content=nonconfig', fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_02_rdm_device_connected(self): 08:41:37 > response = test_utils.check_device_connection("ROADMA01") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:54: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:409: in check_device_connection 08:41:37 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_02_rdm_device_connected 08:41:37 ___________ TestTransportPCEPortmapping.test_03_rdm_portmapping_info ___________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_03_rdm_portmapping_info(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("ROADMA01", "node-info", None) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:60: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_03_rdm_portmapping_info 08:41:37 ______ TestTransportPCEPortmapping.test_04_rdm_portmapping_DEG1_TTP_TXRX _______ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=DEG1-TTP-TXRX' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=DEG1-TTP-TXRX', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=DEG1-TTP-TXRX' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=DEG1-TTP-TXRX (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_04_rdm_portmapping_DEG1_TTP_TXRX(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("ROADMA01", "mapping", "DEG1-TTP-TXRX") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:73: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=DEG1-TTP-TXRX (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_04_rdm_portmapping_DEG1_TTP_TXRX 08:41:37 ______ TestTransportPCEPortmapping.test_05_rdm_portmapping_SRG1_PP7_TXRX _______ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG1-PP7-TXRX' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG1-PP7-TXRX', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG1-PP7-TXRX' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG1-PP7-TXRX (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_05_rdm_portmapping_SRG1_PP7_TXRX(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("ROADMA01", "mapping", "SRG1-PP7-TXRX") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:82: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG1-PP7-TXRX (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_05_rdm_portmapping_SRG1_PP7_TXRX 08:41:37 ______ TestTransportPCEPortmapping.test_06_rdm_portmapping_SRG3_PP1_TXRX _______ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG3-PP1-TXRX' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG3-PP1-TXRX', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG3-PP1-TXRX' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG3-PP1-TXRX (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_06_rdm_portmapping_SRG3_PP1_TXRX(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("ROADMA01", "mapping", "SRG3-PP1-TXRX") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:91: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/mapping=SRG3-PP1-TXRX (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_06_rdm_portmapping_SRG3_PP1_TXRX 08:41:37 __________ TestTransportPCEPortmapping.test_07_xpdr_device_connection __________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'PUT' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01' 08:41:37 body = '{"node": [{"node-id": "XPDRA01", "netconf-node-topology:netconf-node": {"netconf-node-topology:host": "127.0.0.1", "n...ff-millis": 1800000, "netconf-node-topology:backoff-multiplier": 1.5, "netconf-node-topology:keepalive-delay": 120}}]}' 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '709', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'PUT' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_07_xpdr_device_connection(self): 08:41:37 > response = test_utils.mount_device("XPDRA01", ('xpdra', self.NODE_VERSION)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:100: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:381: in mount_device 08:41:37 response = put_request(url[RESTCONF_VERSION].format('{}', node), body) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:125: in put_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_07_xpdr_device_connection 08:41:37 __________ TestTransportPCEPortmapping.test_08_xpdr_device_connected ___________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01', query='content=nonconfig', fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_08_xpdr_device_connected(self): 08:41:37 > response = test_utils.check_device_connection("XPDRA01") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:104: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:409: in check_device_connection 08:41:37 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_08_xpdr_device_connected 08:41:37 __________ TestTransportPCEPortmapping.test_09_xpdr_portmapping_info ___________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_09_xpdr_portmapping_info(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "node-info", None) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:110: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_09_xpdr_portmapping_info 08:41:37 ________ TestTransportPCEPortmapping.test_10_xpdr_portmapping_NETWORK1 _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK1' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK1', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK1' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK1 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_10_xpdr_portmapping_NETWORK1(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-NETWORK1") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:123: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK1 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_10_xpdr_portmapping_NETWORK1 08:41:37 ________ TestTransportPCEPortmapping.test_11_xpdr_portmapping_NETWORK2 _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK2' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK2', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK2' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK2 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_11_xpdr_portmapping_NETWORK2(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-NETWORK2") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:135: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-NETWORK2 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_11_xpdr_portmapping_NETWORK2 08:41:37 _________ TestTransportPCEPortmapping.test_12_xpdr_portmapping_CLIENT1 _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT1' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT1', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT1' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT1 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_12_xpdr_portmapping_CLIENT1(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT1") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:147: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT1 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_12_xpdr_portmapping_CLIENT1 08:41:37 _________ TestTransportPCEPortmapping.test_13_xpdr_portmapping_CLIENT2 _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT2' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT2', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT2' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT2 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_13_xpdr_portmapping_CLIENT2(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT2") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:159: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT2 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_13_xpdr_portmapping_CLIENT2 08:41:37 _________ TestTransportPCEPortmapping.test_14_xpdr_portmapping_CLIENT3 _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT3' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT3', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT3' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT3 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_14_xpdr_portmapping_CLIENT3(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT3") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:170: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT3 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_14_xpdr_portmapping_CLIENT3 08:41:37 _________ TestTransportPCEPortmapping.test_15_xpdr_portmapping_CLIENT4 _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT4' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT4', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT4' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT4 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_15_xpdr_portmapping_CLIENT4(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT4") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:182: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/mapping=XPDR1-CLIENT4 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_15_xpdr_portmapping_CLIENT4 08:41:37 ________ TestTransportPCEPortmapping.test_16_xpdr_device_disconnection _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'DELETE' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '0', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'DELETE' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_16_xpdr_device_disconnection(self): 08:41:37 > response = test_utils.unmount_device("XPDRA01") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:193: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:398: in unmount_device 08:41:37 response = delete_request(url[RESTCONF_VERSION].format('{}', node)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:134: in delete_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_16_xpdr_device_disconnection 08:41:37 _________ TestTransportPCEPortmapping.test_17_xpdr_device_disconnected _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01', query='content=nonconfig', fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_17_xpdr_device_disconnected(self): 08:41:37 > response = test_utils.check_device_connection("XPDRA01") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:197: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:409: in check_device_connection 08:41:37 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_17_xpdr_device_disconnected 08:41:37 ________ TestTransportPCEPortmapping.test_18_xpdr_device_not_connected _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_18_xpdr_device_not_connected(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "node-info", None) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:205: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_18_xpdr_device_not_connected 08:41:37 _________ TestTransportPCEPortmapping.test_19_rdm_device_disconnection _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'DELETE' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '0', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'DELETE' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_19_rdm_device_disconnection(self): 08:41:37 > response = test_utils.unmount_device("ROADMA01") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:213: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:398: in unmount_device 08:41:37 response = delete_request(url[RESTCONF_VERSION].format('{}', node)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:134: in delete_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01 (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_19_rdm_device_disconnection 08:41:37 _________ TestTransportPCEPortmapping.test_20_rdm_device_disconnected __________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01', query='content=nonconfig', fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_20_rdm_device_disconnected(self): 08:41:37 > response = test_utils.check_device_connection("ROADMA01") 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:217: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:409: in check_device_connection 08:41:37 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_20_rdm_device_disconnected 08:41:37 _________ TestTransportPCEPortmapping.test_21_rdm_device_not_connected _________ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 > sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:204: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 08:41:37 raise err 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 address = ('localhost', 8191), timeout = 30, source_address = None 08:41:37 socket_options = [(6, 1, 1)] 08:41:37 08:41:37 def create_connection( 08:41:37 address: tuple[str, int], 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 source_address: tuple[str, int] | None = None, 08:41:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 08:41:37 ) -> socket.socket: 08:41:37 """Connect to *address* and return the socket object. 08:41:37 08:41:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 08:41:37 port)``) and return the socket object. Passing the optional 08:41:37 *timeout* parameter will set the timeout on the socket instance 08:41:37 before attempting to connect. If no *timeout* is supplied, the 08:41:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 08:41:37 is used. If *source_address* is set it must be a tuple of (host, port) 08:41:37 for the socket to bind as a source address before making the connection. 08:41:37 An host of '' or port 0 tells the OS to use the default. 08:41:37 """ 08:41:37 08:41:37 host, port = address 08:41:37 if host.startswith("["): 08:41:37 host = host.strip("[]") 08:41:37 err = None 08:41:37 08:41:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 08:41:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 08:41:37 # The original create_connection function always returns all records. 08:41:37 family = allowed_gai_family() 08:41:37 08:41:37 try: 08:41:37 host.encode("idna") 08:41:37 except UnicodeError: 08:41:37 raise LocationParseError(f"'{host}', label empty or too long") from None 08:41:37 08:41:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 08:41:37 af, socktype, proto, canonname, sa = res 08:41:37 sock = None 08:41:37 try: 08:41:37 sock = socket.socket(af, socktype, proto) 08:41:37 08:41:37 # If provided, set socket level options before connecting. 08:41:37 _set_socket_options(sock, socket_options) 08:41:37 08:41:37 if timeout is not _DEFAULT_TIMEOUT: 08:41:37 sock.settimeout(timeout) 08:41:37 if source_address: 08:41:37 sock.bind(source_address) 08:41:37 > sock.connect(sa) 08:41:37 E ConnectionRefusedError: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info' 08:41:37 body = None 08:41:37 headers = {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 08:41:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 redirect = False, assert_same_host = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), pool_timeout = None 08:41:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 08:41:37 decode_content = False, response_kw = {} 08:41:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info', query=None, fragment=None) 08:41:37 destination_scheme = None, conn = None, release_this_conn = True 08:41:37 http_tunnel_required = False, err = None, clean_exit = False 08:41:37 08:41:37 def urlopen( # type: ignore[override] 08:41:37 self, 08:41:37 method: str, 08:41:37 url: str, 08:41:37 body: _TYPE_BODY | None = None, 08:41:37 headers: typing.Mapping[str, str] | None = None, 08:41:37 retries: Retry | bool | int | None = None, 08:41:37 redirect: bool = True, 08:41:37 assert_same_host: bool = True, 08:41:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 08:41:37 pool_timeout: int | None = None, 08:41:37 release_conn: bool | None = None, 08:41:37 chunked: bool = False, 08:41:37 body_pos: _TYPE_BODY_POSITION | None = None, 08:41:37 preload_content: bool = True, 08:41:37 decode_content: bool = True, 08:41:37 **response_kw: typing.Any, 08:41:37 ) -> BaseHTTPResponse: 08:41:37 """ 08:41:37 Get a connection from the pool and perform an HTTP request. This is the 08:41:37 lowest level call for making a request, so you'll need to specify all 08:41:37 the raw details. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 More commonly, it's appropriate to use a convenience method 08:41:37 such as :meth:`request`. 08:41:37 08:41:37 .. note:: 08:41:37 08:41:37 `release_conn` will only behave as expected if 08:41:37 `preload_content=False` because we want to make 08:41:37 `preload_content=False` the default behaviour someday soon without 08:41:37 breaking backwards compatibility. 08:41:37 08:41:37 :param method: 08:41:37 HTTP request method (such as GET, POST, PUT, etc.) 08:41:37 08:41:37 :param url: 08:41:37 The URL to perform the request on. 08:41:37 08:41:37 :param body: 08:41:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 08:41:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 08:41:37 08:41:37 :param headers: 08:41:37 Dictionary of custom headers to send, such as User-Agent, 08:41:37 If-None-Match, etc. If None, pool headers are used. If provided, 08:41:37 these headers completely replace any pool-specific headers. 08:41:37 08:41:37 :param retries: 08:41:37 Configure the number of retries to allow before raising a 08:41:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 08:41:37 08:41:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 08:41:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 08:41:37 over different types of retries. 08:41:37 Pass an integer number to retry connection errors that many times, 08:41:37 but no other types of errors. Pass zero to never retry. 08:41:37 08:41:37 If ``False``, then retries are disabled and any exception is raised 08:41:37 immediately. Also, instead of raising a MaxRetryError on redirects, 08:41:37 the redirect response will be returned. 08:41:37 08:41:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 08:41:37 08:41:37 :param redirect: 08:41:37 If True, automatically handle redirects (status codes 301, 302, 08:41:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 08:41:37 will disable redirect, too. 08:41:37 08:41:37 :param assert_same_host: 08:41:37 If ``True``, will make sure that the host of the pool requests is 08:41:37 consistent else will raise HostChangedError. When ``False``, you can 08:41:37 use the pool on an HTTP proxy and request foreign hosts. 08:41:37 08:41:37 :param timeout: 08:41:37 If specified, overrides the default timeout for this one 08:41:37 request. It may be a float (in seconds) or an instance of 08:41:37 :class:`urllib3.util.Timeout`. 08:41:37 08:41:37 :param pool_timeout: 08:41:37 If set and the pool is set to block=True, then this method will 08:41:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 08:41:37 connection is available within the time period. 08:41:37 08:41:37 :param bool preload_content: 08:41:37 If True, the response's body will be preloaded into memory. 08:41:37 08:41:37 :param bool decode_content: 08:41:37 If True, will attempt to decode the body based on the 08:41:37 'content-encoding' header. 08:41:37 08:41:37 :param release_conn: 08:41:37 If False, then the urlopen call will not release the connection 08:41:37 back into the pool once a response is received (but will release if 08:41:37 you read the entire contents of the response such as when 08:41:37 `preload_content=True`). This is useful if you're not preloading 08:41:37 the response's content immediately. You will need to call 08:41:37 ``r.release_conn()`` on the response ``r`` to return the connection 08:41:37 back into the pool. If None, it takes the value of ``preload_content`` 08:41:37 which defaults to ``True``. 08:41:37 08:41:37 :param bool chunked: 08:41:37 If True, urllib3 will send the body using chunked transfer 08:41:37 encoding. Otherwise, urllib3 will send the body using the standard 08:41:37 content-length form. Defaults to False. 08:41:37 08:41:37 :param int body_pos: 08:41:37 Position to seek to in file-like body in the event of a retry or 08:41:37 redirect. Typically this won't need to be set because urllib3 will 08:41:37 auto-populate the value when needed. 08:41:37 """ 08:41:37 parsed_url = parse_url(url) 08:41:37 destination_scheme = parsed_url.scheme 08:41:37 08:41:37 if headers is None: 08:41:37 headers = self.headers 08:41:37 08:41:37 if not isinstance(retries, Retry): 08:41:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 08:41:37 08:41:37 if release_conn is None: 08:41:37 release_conn = preload_content 08:41:37 08:41:37 # Check host 08:41:37 if assert_same_host and not self.is_same_host(url): 08:41:37 raise HostChangedError(self, url, retries) 08:41:37 08:41:37 # Ensure that the URL we're connecting to is properly encoded 08:41:37 if url.startswith("/"): 08:41:37 url = to_str(_encode_target(url)) 08:41:37 else: 08:41:37 url = to_str(parsed_url.url) 08:41:37 08:41:37 conn = None 08:41:37 08:41:37 # Track whether `conn` needs to be released before 08:41:37 # returning/raising/recursing. Update this variable if necessary, and 08:41:37 # leave `release_conn` constant throughout the function. That way, if 08:41:37 # the function recurses, the original value of `release_conn` will be 08:41:37 # passed down into the recursive call, and its value will be respected. 08:41:37 # 08:41:37 # See issue #651 [1] for details. 08:41:37 # 08:41:37 # [1] 08:41:37 release_this_conn = release_conn 08:41:37 08:41:37 http_tunnel_required = connection_requires_http_tunnel( 08:41:37 self.proxy, self.proxy_config, destination_scheme 08:41:37 ) 08:41:37 08:41:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 08:41:37 # have to copy the headers dict so we can safely change it without those 08:41:37 # changes being reflected in anyone else's copy. 08:41:37 if not http_tunnel_required: 08:41:37 headers = headers.copy() # type: ignore[attr-defined] 08:41:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 08:41:37 08:41:37 # Must keep the exception bound to a separate variable or else Python 3 08:41:37 # complains about UnboundLocalError. 08:41:37 err = None 08:41:37 08:41:37 # Keep track of whether we cleanly exited the except block. This 08:41:37 # ensures we do proper cleanup in finally. 08:41:37 clean_exit = False 08:41:37 08:41:37 # Rewind body position, if needed. Record current position 08:41:37 # for future rewinds in the event of a redirect/retry. 08:41:37 body_pos = set_file_position(body, body_pos) 08:41:37 08:41:37 try: 08:41:37 # Request a connection from the queue. 08:41:37 timeout_obj = self._get_timeout(timeout) 08:41:37 conn = self._get_conn(timeout=pool_timeout) 08:41:37 08:41:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 08:41:37 08:41:37 # Is this a closed/new connection that requires CONNECT tunnelling? 08:41:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 08:41:37 try: 08:41:37 self._prepare_proxy(conn) 08:41:37 except (BaseSSLError, OSError, SocketTimeout) as e: 08:41:37 self._raise_timeout( 08:41:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 08:41:37 ) 08:41:37 raise 08:41:37 08:41:37 # If we're going to release the connection in ``finally:``, then 08:41:37 # the response doesn't need to know about the connection. Otherwise 08:41:37 # it will also try to release it and we'll have a double-release 08:41:37 # mess. 08:41:37 response_conn = conn if not release_conn else None 08:41:37 08:41:37 # Make the request on the HTTPConnection object 08:41:37 > response = self._make_request( 08:41:37 conn, 08:41:37 method, 08:41:37 url, 08:41:37 timeout=timeout_obj, 08:41:37 body=body, 08:41:37 headers=headers, 08:41:37 chunked=chunked, 08:41:37 retries=retries, 08:41:37 response_conn=response_conn, 08:41:37 preload_content=preload_content, 08:41:37 decode_content=decode_content, 08:41:37 **response_kw, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:787: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:493: in _make_request 08:41:37 conn.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:500: in request 08:41:37 self.endheaders() 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1298: in endheaders 08:41:37 self._send_output(message_body, encode_chunked=encode_chunked) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:1058: in _send_output 08:41:37 self.send(msg) 08:41:37 /opt/pyenv/versions/3.11.10/lib/python3.11/http/client.py:996: in send 08:41:37 self.connect() 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:331: in connect 08:41:37 self.sock = self._new_conn() 08:41:37 ^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 08:41:37 def _new_conn(self) -> socket.socket: 08:41:37 """Establish a socket connection and set nodelay settings on it. 08:41:37 08:41:37 :return: New socket connection. 08:41:37 """ 08:41:37 try: 08:41:37 sock = connection.create_connection( 08:41:37 (self._dns_host, self.port), 08:41:37 self.timeout, 08:41:37 source_address=self.source_address, 08:41:37 socket_options=self.socket_options, 08:41:37 ) 08:41:37 except socket.gaierror as e: 08:41:37 raise NameResolutionError(self.host, self, e) from e 08:41:37 except SocketTimeout as e: 08:41:37 raise ConnectTimeoutError( 08:41:37 self, 08:41:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 08:41:37 ) from e 08:41:37 08:41:37 except OSError as e: 08:41:37 > raise NewConnectionError( 08:41:37 self, f"Failed to establish a new connection: {e}" 08:41:37 ) from e 08:41:37 E urllib3.exceptions.NewConnectionError: HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:219: NewConnectionError 08:41:37 08:41:37 The above exception was the direct cause of the following exception: 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 > resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:644: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:841: in urlopen 08:41:37 retries = retries.increment( 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 08:41:37 method = 'GET' 08:41:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info' 08:41:37 response = None 08:41:37 error = NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused") 08:41:37 _pool = 08:41:37 _stacktrace = 08:41:37 08:41:37 def increment( 08:41:37 self, 08:41:37 method: str | None = None, 08:41:37 url: str | None = None, 08:41:37 response: BaseHTTPResponse | None = None, 08:41:37 error: Exception | None = None, 08:41:37 _pool: ConnectionPool | None = None, 08:41:37 _stacktrace: TracebackType | None = None, 08:41:37 ) -> Self: 08:41:37 """Return a new Retry object with incremented retry counters. 08:41:37 08:41:37 :param response: A response object, or None, if the server did not 08:41:37 return a response. 08:41:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 08:41:37 :param Exception error: An error encountered during the request, or 08:41:37 None if the response was received successfully. 08:41:37 08:41:37 :return: A new ``Retry`` object. 08:41:37 """ 08:41:37 if self.total is False and error: 08:41:37 # Disabled, indicate to re-raise the error. 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 08:41:37 total = self.total 08:41:37 if total is not None: 08:41:37 total -= 1 08:41:37 08:41:37 connect = self.connect 08:41:37 read = self.read 08:41:37 redirect = self.redirect 08:41:37 status_count = self.status 08:41:37 other = self.other 08:41:37 cause = "unknown" 08:41:37 status = None 08:41:37 redirect_location = None 08:41:37 08:41:37 if error and self._is_connection_error(error): 08:41:37 # Connect retry? 08:41:37 if connect is False: 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif connect is not None: 08:41:37 connect -= 1 08:41:37 08:41:37 elif error and self._is_read_error(error): 08:41:37 # Read retry? 08:41:37 if read is False or method is None or not self._is_method_retryable(method): 08:41:37 raise reraise(type(error), error, _stacktrace) 08:41:37 elif read is not None: 08:41:37 read -= 1 08:41:37 08:41:37 elif error: 08:41:37 # Other retry? 08:41:37 if other is not None: 08:41:37 other -= 1 08:41:37 08:41:37 elif response and response.get_redirect_location(): 08:41:37 # Redirect retry? 08:41:37 if redirect is not None: 08:41:37 redirect -= 1 08:41:37 cause = "too many redirects" 08:41:37 response_redirect_location = response.get_redirect_location() 08:41:37 if response_redirect_location: 08:41:37 redirect_location = response_redirect_location 08:41:37 status = response.status 08:41:37 08:41:37 else: 08:41:37 # Incrementing because of a server error like a 500 in 08:41:37 # status_forcelist and the given method is in the allowed_methods 08:41:37 cause = ResponseError.GENERIC_ERROR 08:41:37 if response and response.status: 08:41:37 if status_count is not None: 08:41:37 status_count -= 1 08:41:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 08:41:37 status = response.status 08:41:37 08:41:37 history = self.history + ( 08:41:37 RequestHistory(method, url, error, status, redirect_location), 08:41:37 ) 08:41:37 08:41:37 new_retry = self.new( 08:41:37 total=total, 08:41:37 connect=connect, 08:41:37 read=read, 08:41:37 redirect=redirect, 08:41:37 status=status_count, 08:41:37 other=other, 08:41:37 history=history, 08:41:37 ) 08:41:37 08:41:37 if new_retry.is_exhausted(): 08:41:37 reason = error or ResponseError(cause) 08:41:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:535: MaxRetryError 08:41:37 08:41:37 During handling of the above exception, another exception occurred: 08:41:37 08:41:37 self = 08:41:37 08:41:37 def test_21_rdm_device_not_connected(self): 08:41:37 > response = test_utils.get_portmapping_node_attr("ROADMA01", "node-info", None) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 08:41:37 transportpce_tests/1.2.1/test01_portmapping.py:225: 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 transportpce_tests/common/test_utils.py:519: in get_portmapping_node_attr 08:41:37 response = get_request(target_url) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 transportpce_tests/common/test_utils.py:117: in get_request 08:41:37 return requests.request( 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 08:41:37 return session.request(method=method, url=url, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 08:41:37 resp = self.send(prep, **send_kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 08:41:37 r = adapter.send(request, **kwargs) 08:41:37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08:41:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 08:41:37 08:41:37 self = 08:41:37 request = , stream = False 08:41:37 timeout = Timeout(connect=30, read=30, total=None), verify = True, cert = None 08:41:37 proxies = OrderedDict() 08:41:37 08:41:37 def send( 08:41:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 08:41:37 ): 08:41:37 """Sends PreparedRequest object. Returns Response object. 08:41:37 08:41:37 :param request: The :class:`PreparedRequest ` being sent. 08:41:37 :param stream: (optional) Whether to stream the request content. 08:41:37 :param timeout: (optional) How long to wait for the server to send 08:41:37 data before giving up, as a float, or a :ref:`(connect timeout, 08:41:37 read timeout) ` tuple. 08:41:37 :type timeout: float or tuple or urllib3 Timeout object 08:41:37 :param verify: (optional) Either a boolean, in which case it controls whether 08:41:37 we verify the server's TLS certificate, or a string, in which case it 08:41:37 must be a path to a CA bundle to use 08:41:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 08:41:37 :param proxies: (optional) The proxies dictionary to apply to the request. 08:41:37 :rtype: requests.Response 08:41:37 """ 08:41:37 08:41:37 try: 08:41:37 conn = self.get_connection_with_tls_context( 08:41:37 request, verify, proxies=proxies, cert=cert 08:41:37 ) 08:41:37 except LocationValueError as e: 08:41:37 raise InvalidURL(e, request=request) 08:41:37 08:41:37 self.cert_verify(conn, request.url, verify, cert) 08:41:37 url = self.request_url(request, proxies) 08:41:37 self.add_headers( 08:41:37 request, 08:41:37 stream=stream, 08:41:37 timeout=timeout, 08:41:37 verify=verify, 08:41:37 cert=cert, 08:41:37 proxies=proxies, 08:41:37 ) 08:41:37 08:41:37 chunked = not (request.body is None or "Content-Length" in request.headers) 08:41:37 08:41:37 if isinstance(timeout, tuple): 08:41:37 try: 08:41:37 connect, read = timeout 08:41:37 timeout = TimeoutSauce(connect=connect, read=read) 08:41:37 except ValueError: 08:41:37 raise ValueError( 08:41:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 08:41:37 f"or a single float to set both timeouts to the same value." 08:41:37 ) 08:41:37 elif isinstance(timeout, TimeoutSauce): 08:41:37 pass 08:41:37 else: 08:41:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 08:41:37 08:41:37 try: 08:41:37 resp = conn.urlopen( 08:41:37 method=request.method, 08:41:37 url=url, 08:41:37 body=request.body, 08:41:37 headers=request.headers, 08:41:37 redirect=False, 08:41:37 assert_same_host=False, 08:41:37 preload_content=False, 08:41:37 decode_content=False, 08:41:37 retries=self.max_retries, 08:41:37 timeout=timeout, 08:41:37 chunked=chunked, 08:41:37 ) 08:41:37 08:41:37 except (ProtocolError, OSError) as err: 08:41:37 raise ConnectionError(err, request=request) 08:41:37 08:41:37 except MaxRetryError as e: 08:41:37 if isinstance(e.reason, ConnectTimeoutError): 08:41:37 # TODO: Remove this in 3.0.0: see #2811 08:41:37 if not isinstance(e.reason, NewConnectionError): 08:41:37 raise ConnectTimeout(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, ResponseError): 08:41:37 raise RetryError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _ProxyError): 08:41:37 raise ProxyError(e, request=request) 08:41:37 08:41:37 if isinstance(e.reason, _SSLError): 08:41:37 # This branch is for urllib3 v1.22 and later. 08:41:37 raise SSLError(e, request=request) 08:41:37 08:41:37 > raise ConnectionError(e, request=request) 08:41:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8191): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8191): Failed to establish a new connection: [Errno 111] Connection refused")) 08:41:37 08:41:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:677: ConnectionError 08:41:37 ----------------------------- Captured stdout call ----------------------------- 08:41:37 execution of test_21_rdm_device_not_connected 08:41:37 --------------------------- Captured stdout teardown --------------------------- 08:41:37 all processes killed 08:41:37 ODL log file stored 08:41:37 =========================== short test summary info ============================ 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_02_rdm_device_connected 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_03_rdm_portmapping_info 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_04_rdm_portmapping_DEG1_TTP_TXRX 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_05_rdm_portmapping_SRG1_PP7_TXRX 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_06_rdm_portmapping_SRG3_PP1_TXRX 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_07_xpdr_device_connection 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_08_xpdr_device_connected 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_09_xpdr_portmapping_info 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_10_xpdr_portmapping_NETWORK1 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_11_xpdr_portmapping_NETWORK2 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_12_xpdr_portmapping_CLIENT1 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_13_xpdr_portmapping_CLIENT2 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_14_xpdr_portmapping_CLIENT3 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_15_xpdr_portmapping_CLIENT4 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_16_xpdr_device_disconnection 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_17_xpdr_device_disconnected 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_18_xpdr_device_not_connected 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_19_rdm_device_disconnection 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_20_rdm_device_disconnected 08:41:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TestTransportPCEPortmapping::test_21_rdm_device_not_connected 08:41:37 20 failed, 1 passed in 272.76s (0:04:32) 08:41:37 tests71: OK ✔ in 7 minutes 57.19 seconds 08:41:37 tests200: OK ✔ in 3 minutes 45.45 seconds 08:41:37 tests121: exit 1 (273.08 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 1.2.1 pid=15389 08:42:30 . [100%] 08:42:34 51 passed in 329.62s (0:05:29) 08:42:34 pytest -q transportpce_tests/tapi/test02_full_topology.py 08:43:27 .................................... [100%] 08:51:04 36 passed in 509.81s (0:08:29) 08:51:04 pytest -q transportpce_tests/tapi/test03_tapi_device_change_notifications.py 08:51:50 ....................................................................... [100%] 08:56:21 71 passed in 316.53s (0:05:16) 08:56:21 pytest -q transportpce_tests/tapi/test04_topo_extension.py 08:57:11 ................... [100%] 08:58:42 19 passed in 141.09s (0:02:21) 08:58:42 pytest -q transportpce_tests/tapi/test05_pce_tapi.py 09:00:43 ...................... [100%] 09:06:19 22 passed in 456.92s (0:07:36) 09:06:20 tests121: FAIL ✖ in 4 minutes 40.24 seconds 09:06:20 tests_tapi: OK ✔ in 29 minutes 22.63 seconds 09:06:20 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 09:06:27 tests221: freeze> python -m pip freeze --all 09:06:27 tests221: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 09:06:27 tests221: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 2.2.1 09:06:27 using environment variables from ./karaf221.env 09:06:27 pytest -q transportpce_tests/2.2.1/test01_portmapping.py 09:07:03 ................................... [100%] 09:13:43 35 passed in 435.46s (0:07:15) 09:13:43 pytest -q transportpce_tests/2.2.1/test02_topo_portmapping.py 09:14:15 ...... [100%] 09:14:29 6 passed in 46.12s 09:14:29 pytest -q transportpce_tests/2.2.1/test03_topology.py 09:15:14 ............................................ [100%] 09:16:49 44 passed in 139.34s (0:02:19) 09:16:49 pytest -q transportpce_tests/2.2.1/test04_otn_topology.py 09:17:24 ............ [100%] 09:17:48 12 passed in 58.80s 09:17:48 pytest -q transportpce_tests/2.2.1/test05_flex_grid.py 09:18:13 ................ [100%] 09:19:42 16 passed in 113.86s (0:01:53) 09:19:42 pytest -q transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py 09:20:11 ............................... [100%] 09:20:18 31 passed in 35.26s 09:20:18 pytest -q transportpce_tests/2.2.1/test07_otn_renderer.py 09:20:52 .......................... [100%] 09:21:48 26 passed in 90.47s (0:01:30) 09:21:48 pytest -q transportpce_tests/2.2.1/test08_otn_sh_renderer.py 09:22:24 ...................... [100%] 09:23:28 22 passed in 99.11s (0:01:39) 09:23:28 pytest -q transportpce_tests/2.2.1/test09_olm.py 09:24:08 ........................................ [100%] 09:26:30 40 passed in 181.90s (0:03:01) 09:26:30 pytest -q transportpce_tests/2.2.1/test11_otn_end2end.py 09:27:13 ........................................................................ [ 74%] 09:32:50 ......................... [100%] 09:34:42 97 passed in 491.85s (0:08:11) 09:34:42 pytest -q transportpce_tests/2.2.1/test12_end2end.py 09:35:21 ...................................................... [100%] 09:42:09 54 passed in 446.71s (0:07:26) 09:42:09 pytest -q transportpce_tests/2.2.1/test14_otn_switch_end2end.py 09:43:02 ........................................................................ [ 71%] 09:48:12 ............................. [100%] 09:50:21 101 passed in 491.61s (0:08:11) 09:50:21 pytest -q transportpce_tests/2.2.1/test15_otn_end2end_with_intermediate_switch.py 09:51:16 ........................................................................ [ 67%] 09:57:02 ................................... [100%] 10:00:23 107 passed in 601.71s (0:10:01) 10:00:23 pytest -q transportpce_tests/2.2.1/test16_freq_end2end.py 10:01:05 ............................................. [100%] 10:03:42 45 passed in 199.24s (0:03:19) 10:03:43 tests221: OK ✔ in 57 minutes 23.17 seconds 10:03:43 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 10:03:49 tests_hybrid: freeze> python -m pip freeze --all 10:03:49 tests_hybrid: bcrypt==5.0.0,certifi==2026.2.25,cffi==2.0.0,charset-normalizer==3.4.5,cryptography==46.0.5,dict2xml==1.7.8,idna==3.11,iniconfig==2.3.0,invoke==2.2.1,lxml==6.0.2,netconf-client==3.5.0,packaging==26.0,paramiko==4.0.0,pip==26.0.1,pluggy==1.6.0,psutil==7.2.2,pycparser==3.0,Pygments==2.19.2,PyNaCl==1.6.2,pytest==9.0.2,requests==2.32.5,setuptools==82.0.0,urllib3==2.6.3 10:03:49 tests_hybrid: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh hybrid 10:03:49 using environment variables from ./karaf221.env 10:03:49 pytest -q transportpce_tests/hybrid/test01_device_change_notifications.py 10:04:30 ................................................... [100%] 10:06:17 51 passed in 147.66s (0:02:27) 10:06:17 pytest -q transportpce_tests/hybrid/test02_B100G_end2end.py 10:06:59 ........................................................................ [ 66%] 10:11:20 ..................................... [100%] 10:13:27 109 passed in 428.97s (0:07:08) 10:13:27 pytest -q transportpce_tests/hybrid/test03_autonomous_reroute.py 10:14:13 ..................................................... [100%] 10:20:46 53 passed in 438.96s (0:07:18) 10:20:46 buildcontroller: OK (107.84=setup[8.54]+cmd[99.30] seconds) 10:20:46 sims: OK (11.29=setup[8.72]+cmd[2.57] seconds) 10:20:46 build_karaf_tests121: OK (61.02=setup[7.67]+cmd[53.35] seconds) 10:20:46 testsPCE: OK (305.16=setup[54.72]+cmd[250.44] seconds) 10:20:46 tests121: FAIL code 1 (280.24=setup[7.16]+cmd[273.08] seconds) 10:20:46 build_karaf_tests221: OK (60.99=setup[7.70]+cmd[53.29] seconds) 10:20:46 tests_tapi: OK (1762.63=setup[7.10]+cmd[1755.52] seconds) 10:20:46 tests221: OK (3443.17=setup[7.57]+cmd[3435.60] seconds) 10:20:46 build_karaf_tests71: OK (61.70=setup[7.66]+cmd[54.04] seconds) 10:20:46 tests71: OK (477.19=setup[7.43]+cmd[469.76] seconds) 10:20:46 build_karaf_tests200: OK (61.70=setup[7.68]+cmd[54.02] seconds) 10:20:46 tests200: OK (225.45=setup[7.15]+cmd[218.30] seconds) 10:20:46 tests_hybrid: OK (1023.00=setup[6.53]+cmd[1016.48] seconds) 10:20:46 buildlighty: OK (36.96=setup[8.76]+cmd[28.20] seconds) 10:20:46 docs: OK (32.51=setup[29.48]+cmd[3.03] seconds) 10:20:46 docs-linkcheck: OK (34.37=setup[28.77]+cmd[5.61] seconds) 10:20:46 checkbashisms: OK (3.41=setup[2.14]+cmd[0.01,0.04,1.23] seconds) 10:20:46 pre-commit: FAIL code 1 (59.83=setup[3.08]+cmd[0.00,0.00,56.74] seconds) 10:20:46 pylint: OK (34.66=setup[3.99]+cmd[30.67] seconds) 10:20:46 evaluation failed :( (6703.56 seconds) 10:20:46 + tox_status=1 10:20:46 + echo '---> Completed tox runs' 10:20:46 ---> Completed tox runs 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/build_karaf_tests121/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=build_karaf_tests121 10:20:46 + cp -r .tox/build_karaf_tests121/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests121 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/build_karaf_tests200/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=build_karaf_tests200 10:20:46 + cp -r .tox/build_karaf_tests200/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests200 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/build_karaf_tests221/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=build_karaf_tests221 10:20:46 + cp -r .tox/build_karaf_tests221/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests221 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/build_karaf_tests71/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=build_karaf_tests71 10:20:46 + cp -r .tox/build_karaf_tests71/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests71 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/buildcontroller/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=buildcontroller 10:20:46 + cp -r .tox/buildcontroller/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/buildcontroller 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/buildlighty/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=buildlighty 10:20:46 + cp -r .tox/buildlighty/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/buildlighty 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/checkbashisms/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=checkbashisms 10:20:46 + cp -r .tox/checkbashisms/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/checkbashisms 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/docs-linkcheck/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=docs-linkcheck 10:20:46 + cp -r .tox/docs-linkcheck/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/docs-linkcheck 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/docs/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=docs 10:20:46 + cp -r .tox/docs/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/docs 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/pre-commit/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=pre-commit 10:20:46 + cp -r .tox/pre-commit/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/pre-commit 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/pylint/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=pylint 10:20:46 + cp -r .tox/pylint/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/pylint 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/sims/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=sims 10:20:46 + cp -r .tox/sims/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/sims 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/tests121/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=tests121 10:20:46 + cp -r .tox/tests121/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests121 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/tests200/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=tests200 10:20:46 + cp -r .tox/tests200/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests200 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/tests221/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=tests221 10:20:46 + cp -r .tox/tests221/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests221 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/tests71/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=tests71 10:20:46 + cp -r .tox/tests71/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests71 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/testsPCE/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=testsPCE 10:20:46 + cp -r .tox/testsPCE/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/testsPCE 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/tests_hybrid/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=tests_hybrid 10:20:46 + cp -r .tox/tests_hybrid/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests_hybrid 10:20:46 + for i in .tox/*/log 10:20:46 ++ echo .tox/tests_tapi/log 10:20:46 ++ awk -F/ '{print $2}' 10:20:46 + tox_env=tests_tapi 10:20:46 + cp -r .tox/tests_tapi/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests_tapi 10:20:46 + DOC_DIR=docs/_build/html 10:20:46 + [[ -d docs/_build/html ]] 10:20:46 + echo '---> Archiving generated docs' 10:20:46 ---> Archiving generated docs 10:20:46 + mv docs/_build/html /w/workspace/transportpce-tox-verify-transportpce-master/archives/docs 10:20:46 + echo '---> tox-run.sh ends' 10:20:46 ---> tox-run.sh ends 10:20:46 + test 1 -eq 0 10:20:46 + exit 1 10:20:46 ++ '[' 1 = 1 ']' 10:20:46 ++ '[' -x /usr/bin/clear_console ']' 10:20:46 ++ /usr/bin/clear_console -q 10:20:46 Build step 'Execute shell' marked build as failure 10:20:46 $ ssh-agent -k 10:20:46 unset SSH_AUTH_SOCK; 10:20:46 unset SSH_AGENT_PID; 10:20:46 echo Agent pid 7554 killed; 10:20:46 [ssh-agent] Stopped. 10:20:46 [PostBuildScript] - [INFO] Executing post build scripts. 10:20:46 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins318438173879880523.sh 10:20:46 ---> sysstat.sh 10:20:47 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins843813917978962425.sh 10:20:47 ---> package-listing.sh 10:20:47 ++ tr '[:upper:]' '[:lower:]' 10:20:47 ++ facter osfamily 10:20:47 + OS_FAMILY=debian 10:20:47 + workspace=/w/workspace/transportpce-tox-verify-transportpce-master 10:20:47 + START_PACKAGES=/tmp/packages_start.txt 10:20:47 + END_PACKAGES=/tmp/packages_end.txt 10:20:47 + DIFF_PACKAGES=/tmp/packages_diff.txt 10:20:47 + PACKAGES=/tmp/packages_start.txt 10:20:47 + '[' /w/workspace/transportpce-tox-verify-transportpce-master ']' 10:20:47 + PACKAGES=/tmp/packages_end.txt 10:20:47 + case "${OS_FAMILY}" in 10:20:47 + dpkg -l 10:20:47 + grep '^ii' 10:20:47 + '[' -f /tmp/packages_start.txt ']' 10:20:47 + '[' -f /tmp/packages_end.txt ']' 10:20:47 + diff /tmp/packages_start.txt /tmp/packages_end.txt 10:20:47 + '[' /w/workspace/transportpce-tox-verify-transportpce-master ']' 10:20:47 + mkdir -p /w/workspace/transportpce-tox-verify-transportpce-master/archives/ 10:20:47 + cp -f /tmp/packages_diff.txt /tmp/packages_end.txt /tmp/packages_start.txt /w/workspace/transportpce-tox-verify-transportpce-master/archives/ 10:20:47 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins11685429089014011873.sh 10:20:47 ---> capture-instance-metadata.sh 10:20:47 Setup pyenv: 10:20:47 system 10:20:47 3.8.20 10:20:47 3.9.20 10:20:47 3.10.15 10:20:47 * 3.11.10 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:20:47 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-4cUP from file:/tmp/.os_lf_venv 10:20:47 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 10:20:47 lf-activate-venv(): INFO: Attempting to install with network-safe options... 10:20:50 lf-activate-venv(): INFO: Base packages installed successfully 10:20:50 lf-activate-venv(): INFO: Installing additional packages: lftools 10:21:03 lf-activate-venv(): INFO: Adding /tmp/venv-4cUP/bin to PATH 10:21:03 INFO: Running in OpenStack, capturing instance metadata 10:21:03 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins3512532926128224400.sh 10:21:03 provisioning config files... 10:21:03 Could not find credentials [logs] for transportpce-tox-verify-transportpce-master #4537 10:21:03 copy managed file [jenkins-log-archives-settings] to file:/w/workspace/transportpce-tox-verify-transportpce-master@tmp/config7638220124458550848tmp 10:21:03 Regular expression run condition: Expression=[^.*logs-s3.*], Label=[odl-logs-s3-cloudfront-index] 10:21:03 Run condition [Regular expression match] enabling perform for step [Provide Configuration files] 10:21:03 provisioning config files... 10:21:04 copy managed file [jenkins-s3-log-ship] to file:/home/jenkins/.aws/credentials 10:21:04 [EnvInject] - Injecting environment variables from a build step. 10:21:04 [EnvInject] - Injecting as environment variables the properties content 10:21:04 SERVER_ID=logs 10:21:04 10:21:04 [EnvInject] - Variables injected successfully. 10:21:04 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins8021065855539831922.sh 10:21:04 ---> create-netrc.sh 10:21:04 WARN: Log server credential not found. 10:21:04 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins12233078378575749536.sh 10:21:04 ---> python-tools-install.sh 10:21:04 Setup pyenv: 10:21:04 system 10:21:04 3.8.20 10:21:04 3.9.20 10:21:04 3.10.15 10:21:04 * 3.11.10 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:21:04 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-4cUP from file:/tmp/.os_lf_venv 10:21:04 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 10:21:04 lf-activate-venv(): INFO: Attempting to install with network-safe options... 10:21:06 lf-activate-venv(): INFO: Base packages installed successfully 10:21:06 lf-activate-venv(): INFO: Installing additional packages: lftools 10:21:15 lf-activate-venv(): INFO: Adding /tmp/venv-4cUP/bin to PATH 10:21:15 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins8384329352513345707.sh 10:21:15 ---> sudo-logs.sh 10:21:15 Archiving 'sudo' log.. 10:21:15 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins12857090641650736969.sh 10:21:15 ---> job-cost.sh 10:21:15 INFO: Activating Python virtual environment... 10:21:15 Setup pyenv: 10:21:15 system 10:21:15 3.8.20 10:21:15 3.9.20 10:21:15 3.10.15 10:21:15 * 3.11.10 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:21:15 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-4cUP from file:/tmp/.os_lf_venv 10:21:15 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 10:21:15 lf-activate-venv(): INFO: Attempting to install with network-safe options... 10:21:17 lf-activate-venv(): INFO: Base packages installed successfully 10:21:17 lf-activate-venv(): INFO: Installing additional packages: zipp==1.1.0 python-openstackclient urllib3~=1.26.15 10:21:23 lf-activate-venv(): INFO: Adding /tmp/venv-4cUP/bin to PATH 10:21:23 INFO: No stack-cost file found 10:21:23 INFO: Instance uptime: 75061s 10:21:23 INFO: Fetching instance metadata (attempt 1 of 3)... 10:21:23 DEBUG: URL: http://169.254.169.254/latest/meta-data/instance-type 10:21:24 INFO: Successfully fetched instance metadata 10:21:24 INFO: Instance type: v3-standard-4 10:21:24 INFO: Retrieving pricing info for: v3-standard-4 10:21:24 INFO: Fetching Vexxhost pricing API (attempt 1 of 3)... 10:21:24 DEBUG: URL: https://pricing.vexxhost.net/v1/pricing/v3-standard-4/cost?seconds=75061 10:21:24 INFO: Successfully fetched Vexxhost pricing API 10:21:24 INFO: Retrieved cost: 2.31 10:21:24 INFO: Retrieved resource: v3-standard-4 10:21:24 INFO: Creating archive directory: /w/workspace/transportpce-tox-verify-transportpce-master/archives/cost 10:21:24 INFO: Archiving costs to: /w/workspace/transportpce-tox-verify-transportpce-master/archives/cost.csv 10:21:24 INFO: Successfully archived job cost data 10:21:24 DEBUG: Cost data: transportpce-tox-verify-transportpce-master,4537,2026-03-09 10:21:24,v3-standard-4,75061,2.31,0.00,FAILURE 10:21:24 [transportpce-tox-verify-transportpce-master] $ /bin/bash -l /tmp/jenkins5900261008172693437.sh 10:21:24 ---> logs-deploy.sh 10:21:24 Setup pyenv: 10:21:24 system 10:21:24 3.8.20 10:21:24 3.9.20 10:21:24 3.10.15 10:21:24 * 3.11.10 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:21:24 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-4cUP from file:/tmp/.os_lf_venv 10:21:24 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 10:21:24 lf-activate-venv(): INFO: Attempting to install with network-safe options... 10:21:26 lf-activate-venv(): INFO: Base packages installed successfully 10:21:26 lf-activate-venv(): INFO: Installing additional packages: lftools urllib3~=1.26.15 10:21:35 lf-activate-venv(): INFO: Adding /tmp/venv-4cUP/bin to PATH 10:21:35 WARNING: Nexus logging server not set 10:21:35 INFO: S3 path logs/releng/vex-yul-odl-jenkins-1/transportpce-tox-verify-transportpce-master/4537/ 10:21:35 INFO: archiving logs to S3 10:21:35 /tmp/venv-4cUP/lib/python3.11/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (1.26.20) or chardet (7.0.1)/charset_normalizer (3.4.5) doesn't match a supported version! 10:21:35 warnings.warn( 10:21:37 ---> uname -a: 10:21:37 Linux prd-ubuntu2204-docker-4c-16g-264115 5.15.0-171-generic #181-Ubuntu SMP Fri Feb 6 22:44:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux 10:21:37 10:21:37 10:21:37 ---> lscpu: 10:21:37 Architecture: x86_64 10:21:37 CPU op-mode(s): 32-bit, 64-bit 10:21:37 Address sizes: 40 bits physical, 48 bits virtual 10:21:37 Byte Order: Little Endian 10:21:37 CPU(s): 4 10:21:37 On-line CPU(s) list: 0-3 10:21:37 Vendor ID: AuthenticAMD 10:21:37 Model name: AMD EPYC-Rome Processor 10:21:37 CPU family: 23 10:21:37 Model: 49 10:21:37 Thread(s) per core: 1 10:21:37 Core(s) per socket: 1 10:21:37 Socket(s): 4 10:21:37 Stepping: 0 10:21:37 BogoMIPS: 5599.99 10:21:37 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr wbnoinvd arat npt nrip_save umip rdpid arch_capabilities 10:21:37 Virtualization: AMD-V 10:21:37 Hypervisor vendor: KVM 10:21:37 Virtualization type: full 10:21:37 L1d cache: 128 KiB (4 instances) 10:21:37 L1i cache: 128 KiB (4 instances) 10:21:37 L2 cache: 2 MiB (4 instances) 10:21:37 L3 cache: 64 MiB (4 instances) 10:21:37 NUMA node(s): 1 10:21:37 NUMA node0 CPU(s): 0-3 10:21:37 Vulnerability Gather data sampling: Not affected 10:21:37 Vulnerability Indirect target selection: Not affected 10:21:37 Vulnerability Itlb multihit: Not affected 10:21:37 Vulnerability L1tf: Not affected 10:21:37 Vulnerability Mds: Not affected 10:21:37 Vulnerability Meltdown: Not affected 10:21:37 Vulnerability Mmio stale data: Not affected 10:21:37 Vulnerability Reg file data sampling: Not affected 10:21:37 Vulnerability Retbleed: Mitigation; untrained return thunk; SMT disabled 10:21:37 Vulnerability Spec rstack overflow: Mitigation; SMT disabled 10:21:37 Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp 10:21:37 Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization 10:21:37 Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected 10:21:37 Vulnerability Srbds: Not affected 10:21:37 Vulnerability Tsa: Not affected 10:21:37 Vulnerability Tsx async abort: Not affected 10:21:37 Vulnerability Vmscape: Not affected 10:21:37 10:21:37 10:21:37 ---> nproc: 10:21:37 4 10:21:37 10:21:37 10:21:37 ---> df -h: 10:21:37 Filesystem Size Used Avail Use% Mounted on 10:21:37 tmpfs 1.6G 1.1M 1.6G 1% /run 10:21:37 /dev/vda1 78G 18G 61G 23% / 10:21:37 tmpfs 7.9G 0 7.9G 0% /dev/shm 10:21:37 tmpfs 5.0M 0 5.0M 0% /run/lock 10:21:37 /dev/vda15 105M 6.1M 99M 6% /boot/efi 10:21:37 tmpfs 1.6G 4.0K 1.6G 1% /run/user/1001 10:21:37 10:21:37 10:21:37 ---> free -m: 10:21:37 total used free shared buff/cache available 10:21:37 Mem: 15989 704 11265 3 4019 14942 10:21:37 Swap: 1023 1 1022 10:21:37 10:21:37 10:21:37 ---> ip addr: 10:21:37 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 10:21:37 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 10:21:37 inet 127.0.0.1/8 scope host lo 10:21:37 valid_lft forever preferred_lft forever 10:21:37 inet6 ::1/128 scope host 10:21:37 valid_lft forever preferred_lft forever 10:21:37 2: ens3: mtu 1458 qdisc mq state UP group default qlen 1000 10:21:37 link/ether fa:16:3e:81:05:90 brd ff:ff:ff:ff:ff:ff 10:21:37 altname enp0s3 10:21:37 inet 10.30.170.178/23 metric 100 brd 10.30.171.255 scope global dynamic ens3 10:21:37 valid_lft 11332sec preferred_lft 11332sec 10:21:37 inet6 fe80::f816:3eff:fe81:590/64 scope link 10:21:37 valid_lft forever preferred_lft forever 10:21:37 3: docker0: mtu 1458 qdisc noqueue state DOWN group default 10:21:37 link/ether 0a:1f:b8:2f:00:0d brd ff:ff:ff:ff:ff:ff 10:21:37 inet 10.250.0.254/24 brd 10.250.0.255 scope global docker0 10:21:37 valid_lft forever preferred_lft forever 10:21:37 inet6 fe80::81f:b8ff:fe2f:d/64 scope link 10:21:37 valid_lft forever preferred_lft forever 10:21:37 10:21:37 10:21:37 ---> sar -b -r -n DEV: 10:21:37 Linux 5.15.0-171-generic (prd-ubuntu2204-docker-4c-16g-264115) 03/09/26 _x86_64_ (4 CPU) 10:21:37 10:21:37 00:00:09 tps rtps wtps dtps bread/s bwrtn/s bdscd/s 10:21:37 00:10:09 2.61 0.18 1.97 0.46 4.45 26.97 873.83 10:21:37 00:20:01 1.59 0.00 1.59 0.00 0.00 16.54 0.00 10:21:37 00:30:09 1.75 0.00 1.75 0.00 0.00 18.54 0.18 10:21:37 00:40:09 1.66 0.00 1.66 0.00 0.00 17.21 0.00 10:21:37 00:50:01 1.56 0.00 1.56 0.00 0.00 16.19 0.00 10:21:37 01:00:09 1.69 0.00 1.69 0.00 0.00 17.44 0.00 10:21:37 01:10:09 1.62 0.00 1.62 0.00 0.00 16.88 0.00 10:21:37 01:20:01 1.59 0.00 1.59 0.00 0.00 16.61 0.00 10:21:37 01:30:09 1.65 0.00 1.65 0.00 0.00 17.22 0.00 10:21:37 01:40:09 1.62 0.00 1.62 0.00 0.00 16.80 0.00 10:21:37 01:50:01 1.58 0.00 1.58 0.00 0.00 16.50 0.00 10:21:37 02:00:09 1.63 0.00 1.63 0.00 0.00 16.95 0.00 10:21:37 02:10:09 1.63 0.00 1.63 0.00 0.00 17.01 0.00 10:21:37 02:20:01 1.58 0.00 1.58 0.00 0.00 16.51 0.00 10:21:37 02:30:09 1.65 0.00 1.65 0.00 0.00 17.10 0.00 10:21:37 02:40:09 1.60 0.00 1.60 0.00 0.00 16.59 0.00 10:21:37 02:50:01 1.59 0.00 1.59 0.00 0.00 16.54 0.00 10:21:37 03:00:09 1.86 0.00 1.86 0.00 0.00 18.94 0.00 10:21:37 03:10:09 1.66 0.00 1.66 0.00 0.00 17.03 0.00 10:21:37 03:20:01 1.50 0.00 1.50 0.00 0.00 15.59 0.00 10:21:37 03:30:09 1.47 0.00 1.47 0.00 0.00 15.42 0.00 10:21:37 03:40:02 1.39 0.00 1.39 0.00 0.00 14.73 0.00 10:21:37 03:50:01 1.50 0.00 1.50 0.00 0.00 15.42 0.00 10:21:37 04:00:09 1.58 0.00 1.58 0.00 0.00 16.28 0.00 10:21:37 04:10:09 1.46 0.00 1.46 0.00 0.00 15.24 0.00 10:21:37 04:20:01 1.46 0.00 1.46 0.00 0.00 15.50 0.00 10:21:37 04:30:01 1.53 0.00 1.53 0.00 0.00 16.06 0.00 10:21:37 04:40:09 1.58 0.00 1.58 0.00 0.00 16.09 0.00 10:21:37 04:50:00 1.41 0.00 1.41 0.00 0.00 15.03 0.00 10:21:37 05:00:07 1.61 0.00 1.61 0.00 0.00 17.11 0.00 10:21:37 05:10:07 1.48 0.00 1.48 0.00 0.00 15.52 0.00 10:21:37 05:20:00 1.48 0.00 1.48 0.00 0.00 15.48 0.00 10:21:37 05:30:09 1.60 0.00 1.60 0.00 0.00 16.52 0.00 10:21:37 05:40:09 1.55 0.00 1.55 0.00 0.00 15.95 0.00 10:21:37 05:50:01 1.47 0.00 1.47 0.00 0.00 15.22 0.00 10:21:37 06:00:09 1.59 0.00 1.59 0.00 0.00 16.27 0.00 10:21:37 06:10:09 1.52 0.00 1.52 0.00 0.00 15.55 0.00 10:21:37 06:20:01 1.51 0.00 1.51 0.00 0.00 15.71 0.00 10:21:37 06:30:09 1.64 0.01 1.63 0.00 0.09 16.90 0.00 10:21:37 06:40:09 1.55 0.00 1.55 0.00 0.00 16.09 0.00 10:21:37 06:50:01 1.52 0.00 1.52 0.00 0.00 15.81 0.00 10:21:37 07:00:09 1.59 0.00 1.59 0.00 0.00 16.16 0.00 10:21:37 07:10:09 1.56 0.00 1.56 0.00 0.00 16.29 0.00 10:21:37 07:20:01 1.50 0.00 1.50 0.00 0.00 15.41 0.00 10:21:37 07:30:09 1.55 0.00 1.55 0.00 0.00 16.11 0.00 10:21:37 07:40:09 1.54 0.00 1.54 0.00 0.00 15.79 0.00 10:21:37 07:50:01 1.48 0.00 1.48 0.00 0.00 15.56 0.00 10:21:37 08:00:09 1.57 0.00 1.57 0.00 0.00 16.10 0.00 10:21:37 08:10:09 1.56 0.00 1.56 0.00 0.00 16.12 0.00 10:21:37 08:20:01 1.52 0.00 1.52 0.00 0.00 15.75 0.00 10:21:37 08:30:02 108.48 7.91 98.47 2.10 785.88 7997.98 1425.14 10:21:37 08:40:09 111.86 3.97 103.74 4.14 206.58 30388.22 22999.05 10:21:37 08:50:01 8.88 1.75 6.76 0.38 44.16 190.75 663.70 10:21:37 09:00:09 10.68 0.05 10.03 0.60 2.08 325.62 1823.05 10:21:37 09:10:09 8.57 2.11 6.22 0.24 100.45 415.08 615.77 10:21:37 09:20:01 13.66 0.02 13.15 0.49 0.58 359.78 165.45 10:21:37 09:30:09 12.51 0.02 11.91 0.59 0.68 405.56 237.81 10:21:37 09:40:09 5.06 0.00 4.88 0.17 0.19 139.13 99.60 10:21:37 09:50:01 5.15 0.02 4.96 0.17 1.43 149.87 91.20 10:21:37 10:00:09 5.06 0.01 4.87 0.18 0.50 148.51 91.95 10:21:37 10:10:09 12.40 0.21 11.64 0.56 2.97 678.12 512.53 10:21:37 10:20:01 5.05 0.03 4.82 0.20 0.87 170.15 523.64 10:21:37 Average: 6.27 0.26 5.83 0.17 18.63 686.94 490.67 10:21:37 10:21:37 00:00:09 kbmemfree kbavail kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 10:21:37 00:10:09 13391828 15500284 505296 3.09 90268 2234880 1148152 6.59 394408 2317836 4 10:21:37 00:20:01 13391072 15499952 505584 3.09 90540 2235020 1148152 6.59 394688 2317980 200 10:21:37 00:30:09 13391072 15500316 505236 3.09 90896 2235028 1148152 6.59 395040 2317844 32 10:21:37 00:40:09 13391100 15500732 504884 3.08 91264 2235036 1148152 6.59 395412 2317880 32 10:21:37 00:50:01 13391100 15501252 504368 3.08 91628 2235176 1148152 6.59 395788 2318572 200 10:21:37 01:00:09 13390624 15501148 504432 3.08 91988 2235188 1148152 6.59 396140 2318196 36 10:21:37 01:10:09 13389868 15500764 504752 3.08 92344 2235196 1148152 6.59 396496 2318236 32 10:21:37 01:20:01 13388608 15500004 505520 3.09 92700 2235332 1148152 6.59 396852 2318660 204 10:21:37 01:30:09 13388608 15500360 505212 3.09 93044 2235340 1148152 6.59 397200 2318480 28 10:21:37 01:40:09 13388356 15500468 505080 3.08 93388 2235352 1148152 6.59 397540 2318404 32 10:21:37 01:50:01 13388104 15500556 504940 3.08 93748 2235364 1148152 6.59 397872 2318808 8 10:21:37 02:00:09 13387348 15500292 505152 3.09 94096 2235496 1148152 6.59 398224 2318552 32 10:21:37 02:10:09 13386460 15499812 505668 3.09 94452 2235508 1148152 6.59 398604 2318560 32 10:21:37 02:20:01 13385404 15499072 506356 3.09 94784 2235516 1148152 6.59 398904 2318768 204 10:21:37 02:30:09 13385180 15499336 506092 3.09 95096 2235656 1148152 6.59 399244 2318816 196 10:21:37 02:40:09 13385180 15499700 505836 3.09 95440 2235664 1148152 6.59 399592 2318708 28 10:21:37 02:50:01 13384956 15499784 505700 3.09 95736 2235672 1148152 6.59 399888 2318756 4 10:21:37 03:00:09 13384956 15500232 505072 3.08 96040 2235808 1148152 6.59 400192 2318876 4 10:21:37 03:10:09 13384956 15500504 504820 3.08 96288 2235820 1148152 6.59 400440 2318916 28 10:21:37 03:20:01 13384456 15500180 505084 3.08 96464 2235828 1148152 6.59 400608 2318924 12 10:21:37 03:30:09 13383952 15499908 505408 3.09 96676 2235840 1148220 6.59 400828 2318956 24 10:21:37 03:40:02 13383448 15499720 505584 3.09 96864 2235984 1148220 6.59 401020 2319344 316 10:21:37 03:50:01 13382692 15499136 506156 3.09 97040 2235984 1148220 6.59 401184 2319244 12 10:21:37 04:00:09 13381940 15498584 506688 3.09 97224 2235996 1148220 6.59 401368 2319360 32 10:21:37 04:10:09 13380176 15497152 508104 3.10 97404 2236132 1148220 6.59 401552 2319984 324 10:21:37 04:20:01 13379420 15496572 508712 3.11 97580 2236132 1148220 6.59 401712 2320448 208 10:21:37 04:30:01 13377908 15495296 510000 3.11 97780 2236156 1148220 6.59 401936 2320928 180 10:21:37 04:40:09 13375924 15493608 511576 3.12 97936 2236288 1148204 6.59 402088 2321104 32 10:21:37 04:50:00 13373684 15491552 513700 3.14 98100 2236296 1148284 6.59 402244 2321220 12 10:21:37 05:00:07 13372424 15490532 514708 3.14 98328 2236312 1148332 6.59 402468 2321476 172 10:21:37 05:10:07 13369656 15487948 517292 3.16 98508 2236312 1148284 6.59 402640 2321232 36 10:21:37 05:20:00 13368396 15487004 518208 3.17 98664 2236456 1148284 6.59 402816 2321392 8 10:21:37 05:30:09 13367224 15486028 519168 3.17 98840 2236468 1148284 6.59 402988 2321408 24 10:21:37 05:40:09 13367728 15486840 518352 3.17 99004 2236600 1148284 6.59 403156 2321544 8 10:21:37 05:50:01 13366136 15485408 519752 3.17 99152 2236612 1148284 6.59 403296 2321756 200 10:21:37 06:00:09 13364328 15483808 521332 3.18 99340 2236616 1148284 6.59 403492 2321564 32 10:21:37 06:10:09 13363216 15482996 521992 3.19 99504 2236756 1148284 6.59 403656 2321732 32 10:21:37 06:20:01 13363904 15483816 521244 3.18 99644 2236768 1148284 6.59 403792 2321764 8 10:21:37 06:30:09 13362704 15482748 522304 3.19 99776 2236800 1148284 6.59 403952 2321756 52 10:21:37 06:40:09 13362200 15482440 522644 3.19 99972 2236808 1148284 6.59 404132 2321792 44 10:21:37 06:50:01 13361948 15482440 522696 3.19 100148 2236884 1148284 6.59 404296 2322072 200 10:21:37 07:00:09 13360944 15481744 523320 3.20 100296 2237016 1148284 6.59 404468 2322016 28 10:21:37 07:10:09 13359432 15480544 524568 3.20 100460 2237160 1148284 6.59 404632 2322164 36 10:21:37 07:20:01 13358172 15479496 525592 3.21 100596 2237232 1148284 6.59 404768 2322628 208 10:21:37 07:30:09 13357668 15479248 525900 3.21 100708 2237372 1148284 6.59 404880 2322380 8 10:21:37 07:40:09 13358512 15480344 524808 3.21 100816 2237512 1148284 6.59 404988 2322536 32 10:21:37 07:50:01 13357668 15479616 525512 3.21 100936 2237516 1148412 6.59 405108 2323024 204 10:21:37 08:00:09 13358832 15481068 524076 3.20 101080 2237660 1148348 6.59 405248 2322684 32 10:21:37 08:10:09 13361712 15484104 520984 3.18 101200 2237668 1148348 6.59 405376 2322716 32 10:21:37 08:20:01 13363172 15485708 519396 3.17 101340 2237676 1148348 6.59 405516 2322952 200 10:21:37 08:30:02 9639328 14115956 1835972 11.21 189860 4336436 2658200 15.26 728332 5525360 0 10:21:37 08:40:09 2359816 5129532 10802348 65.98 279008 2506188 12816812 73.57 1927344 11528984 3840 10:21:37 08:50:01 8361008 11152868 4785092 29.23 279600 2527480 5511496 31.64 1968420 5498368 200 10:21:37 09:00:09 7088056 9899672 6037716 36.88 280272 2546584 6864956 39.40 1984560 6752372 200 10:21:37 09:10:09 9407544 12336800 3601772 22.00 285016 2659412 4408232 25.30 1994316 4443980 96 10:21:37 09:20:01 10844932 13830912 2108636 12.88 285604 2715504 3588748 20.60 2016104 2995304 12412 10:21:37 09:30:09 8413476 11453404 4484716 27.39 286188 2768868 5219308 29.96 2019252 5413252 232 10:21:37 09:40:09 8343188 11402024 4536044 27.70 286456 2787508 5283660 30.33 2020340 5481636 28 10:21:37 09:50:01 6744580 9824728 6112544 37.33 286696 2808580 6810024 39.09 2022284 7076160 192 10:21:37 10:00:09 6755396 9857408 6079756 37.13 286972 2830188 6845460 39.29 2025312 7063164 92 10:21:37 10:10:09 8135020 11381464 4556788 27.83 290376 2970984 5195992 29.82 2064460 5637604 88 10:21:37 10:20:01 7323448 10598008 5339720 32.61 290568 2998872 5966620 34.25 2075304 6429492 280 10:21:37 Average: 12293873 14606660 1385741 8.46 131802 2359121 2073886 11.90 691915 3062236 351 10:21:37 10:21:37 00:00:09 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil 10:21:37 00:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 00:10:09 ens3 0.30 0.14 0.10 0.06 0.00 0.00 0.00 0.00 10:21:37 00:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 00:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 00:20:01 ens3 0.17 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 00:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 00:30:09 lo 0.11 0.11 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 00:30:09 ens3 0.33 0.16 0.14 0.07 0.00 0.00 0.00 0.00 10:21:37 00:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 00:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 00:40:09 ens3 0.33 0.13 0.10 0.06 0.00 0.00 0.00 0.00 10:21:37 00:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 00:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 00:50:01 ens3 0.33 0.15 0.11 0.07 0.00 0.00 0.00 0.00 10:21:37 00:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 01:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 01:00:09 ens3 0.17 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 01:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 01:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 01:10:09 ens3 0.29 0.13 0.10 0.06 0.00 0.00 0.00 0.00 10:21:37 01:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 01:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 01:20:01 ens3 0.17 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 01:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 01:30:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 01:30:09 ens3 0.17 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 01:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 01:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 01:40:09 ens3 0.33 0.14 0.10 0.06 0.00 0.00 0.00 0.00 10:21:37 01:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 01:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 01:50:01 ens3 0.19 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 01:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 02:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 02:00:09 ens3 0.18 0.07 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 02:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 02:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 02:10:09 ens3 0.19 0.11 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 02:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 02:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 02:20:01 ens3 0.17 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 02:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 02:30:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 02:30:09 ens3 0.16 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 02:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 02:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 02:40:09 ens3 0.24 0.11 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 02:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 02:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 02:50:01 ens3 0.24 0.10 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 02:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 03:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 03:00:09 ens3 0.18 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 03:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 03:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 03:10:09 ens3 0.20 0.11 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 03:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 03:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 03:20:01 ens3 0.18 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 03:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 03:30:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 03:30:09 ens3 0.30 0.14 0.10 0.06 0.00 0.00 0.00 0.00 10:21:37 03:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 03:40:02 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 03:40:02 ens3 0.19 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 03:40:02 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 03:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 03:50:01 ens3 0.18 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 03:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 04:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 04:00:09 ens3 0.16 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 04:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 04:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 04:10:09 ens3 0.20 0.10 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 04:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 04:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 04:20:01 ens3 0.18 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 04:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 04:30:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 04:30:01 ens3 0.17 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 04:30:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 04:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 04:40:09 ens3 0.28 0.54 0.05 0.72 0.00 0.00 0.00 0.00 10:21:37 04:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 04:50:00 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 04:50:00 ens3 0.68 0.64 0.13 1.13 0.00 0.00 0.00 0.00 10:21:37 04:50:00 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 05:00:07 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 05:00:07 ens3 0.44 0.21 0.16 0.10 0.00 0.00 0.00 0.00 10:21:37 05:00:07 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 05:10:07 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 05:10:07 ens3 0.25 0.11 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 05:10:07 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 05:20:00 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 05:20:00 ens3 0.18 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 05:20:00 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 05:30:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 05:30:09 ens3 0.24 0.10 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 05:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 05:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 05:40:09 ens3 0.18 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 05:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 05:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 05:50:01 ens3 0.17 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 05:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 06:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 06:00:09 ens3 0.17 0.09 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 06:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 06:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 06:10:09 ens3 0.20 0.10 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 06:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 06:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 06:20:01 ens3 0.17 0.07 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 06:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 06:30:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 06:30:09 ens3 0.24 0.11 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 06:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 06:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 06:40:09 ens3 0.24 0.10 0.07 0.04 0.00 0.00 0.00 0.00 10:21:37 06:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 06:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 06:50:01 ens3 0.28 0.13 0.08 0.05 0.00 0.00 0.00 0.00 10:21:37 06:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 07:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 07:00:09 ens3 0.40 0.16 0.14 0.08 0.00 0.00 0.00 0.00 10:21:37 07:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 07:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 07:10:09 ens3 0.39 0.20 0.14 0.09 0.00 0.00 0.00 0.00 10:21:37 07:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 07:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 07:20:01 ens3 0.27 0.12 0.08 0.04 0.00 0.00 0.00 0.00 10:21:37 07:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 07:30:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 07:30:09 ens3 0.18 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 07:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 07:40:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 07:40:09 ens3 0.18 0.08 0.04 0.02 0.00 0.00 0.00 0.00 10:21:37 07:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 07:50:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 07:50:01 ens3 0.91 0.34 0.37 0.24 0.00 0.00 0.00 0.00 10:21:37 07:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 08:00:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 08:00:09 ens3 0.24 0.08 0.05 0.02 0.00 0.00 0.00 0.00 10:21:37 08:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 08:10:09 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 08:10:09 ens3 0.56 0.25 0.23 0.15 0.00 0.00 0.00 0.00 10:21:37 08:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 08:20:01 lo 0.10 0.10 0.01 0.01 0.00 0.00 0.00 0.00 10:21:37 08:20:01 ens3 0.45 0.15 0.12 0.07 0.00 0.00 0.00 0.00 10:21:37 08:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 08:30:02 lo 0.91 0.91 0.17 0.17 0.00 0.00 0.00 0.00 10:21:37 08:30:02 ens3 80.89 63.72 971.55 11.50 0.00 0.00 0.00 0.00 10:21:37 08:30:02 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 08:40:09 lo 23.27 23.27 18.31 18.31 0.00 0.00 0.00 0.00 10:21:37 08:40:09 ens3 56.38 43.52 970.72 5.07 0.00 0.00 0.00 0.00 10:21:37 08:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 08:50:01 lo 11.47 11.47 6.86 6.86 0.00 0.00 0.00 0.00 10:21:37 08:50:01 ens3 1.23 0.75 0.28 1.15 0.00 0.00 0.00 0.00 10:21:37 08:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 09:00:09 lo 12.11 12.11 7.42 7.42 0.00 0.00 0.00 0.00 10:21:37 09:00:09 ens3 0.62 0.58 0.13 0.10 0.00 0.00 0.00 0.00 10:21:37 09:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 09:10:09 lo 9.09 9.09 4.25 4.25 0.00 0.00 0.00 0.00 10:21:37 09:10:09 ens3 0.73 0.51 0.26 0.19 0.00 0.00 0.00 0.00 10:21:37 09:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 09:20:01 lo 6.22 6.22 2.94 2.94 0.00 0.00 0.00 0.00 10:21:37 09:20:01 ens3 0.68 0.53 0.16 0.12 0.00 0.00 0.00 0.00 10:21:37 09:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 09:30:09 lo 20.66 20.66 10.91 10.91 0.00 0.00 0.00 0.00 10:21:37 09:30:09 ens3 1.41 0.77 0.36 0.24 0.00 0.00 0.00 0.00 10:21:37 09:30:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 09:40:09 lo 23.86 23.86 9.03 9.03 0.00 0.00 0.00 0.00 10:21:37 09:40:09 ens3 0.94 0.54 0.27 0.19 0.00 0.00 0.00 0.00 10:21:37 09:40:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 09:50:01 lo 25.41 25.41 11.35 11.35 0.00 0.00 0.00 0.00 10:21:37 09:50:01 ens3 0.76 0.86 0.14 0.81 0.00 0.00 0.00 0.00 10:21:37 09:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 10:00:09 lo 17.89 17.89 10.56 10.56 0.00 0.00 0.00 0.00 10:21:37 10:00:09 ens3 0.73 0.62 0.16 0.48 0.00 0.00 0.00 0.00 10:21:37 10:00:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 10:10:09 lo 18.25 18.25 10.05 10.05 0.00 0.00 0.00 0.00 10:21:37 10:10:09 ens3 1.14 0.91 0.34 0.28 0.00 0.00 0.00 0.00 10:21:37 10:10:09 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 10:20:01 lo 29.65 29.65 11.38 11.38 0.00 0.00 0.00 0.00 10:21:37 10:20:01 ens3 0.72 0.61 0.17 0.13 0.00 0.00 0.00 0.00 10:21:37 10:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 Average: lo 3.29 3.29 1.67 1.67 0.00 0.00 0.00 0.00 10:21:37 Average: ens3 2.59 1.96 31.66 0.39 0.00 0.00 0.00 0.00 10:21:37 Average: docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:21:37 10:21:37 10:21:37 ---> sar -P ALL: 10:21:37 Linux 5.15.0-171-generic (prd-ubuntu2204-docker-4c-16g-264115) 03/09/26 _x86_64_ (4 CPU) 10:21:37 10:21:37 00:00:09 CPU %user %nice %system %iowait %steal %idle 10:21:37 00:10:09 all 0.18 0.00 0.03 0.03 0.02 99.74 10:21:37 00:10:09 0 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 00:10:09 1 0.08 0.00 0.03 0.10 0.01 99.79 10:21:37 00:10:09 2 0.61 0.00 0.02 0.01 0.02 99.33 10:21:37 00:10:09 3 0.02 0.00 0.03 0.01 0.03 99.91 10:21:37 00:20:01 all 0.24 0.00 0.02 0.01 0.02 99.72 10:21:37 00:20:01 0 0.01 0.00 0.02 0.00 0.01 99.96 10:21:37 00:20:01 1 0.02 0.00 0.02 0.02 0.01 99.93 10:21:37 00:20:01 2 0.90 0.00 0.01 0.00 0.01 99.08 10:21:37 00:20:01 3 0.02 0.00 0.03 0.00 0.03 99.92 10:21:37 00:30:09 all 0.04 0.00 0.02 0.01 0.02 99.92 10:21:37 00:30:09 0 0.01 0.00 0.01 0.00 0.01 99.97 10:21:37 00:30:09 1 0.03 0.00 0.02 0.01 0.02 99.91 10:21:37 00:30:09 2 0.09 0.00 0.02 0.00 0.02 99.86 10:21:37 00:30:09 3 0.01 0.00 0.02 0.02 0.02 99.93 10:21:37 00:40:09 all 0.19 0.00 0.02 0.01 0.02 99.76 10:21:37 00:40:09 0 0.01 0.00 0.01 0.01 0.01 99.96 10:21:37 00:40:09 1 0.72 0.00 0.03 0.00 0.02 99.22 10:21:37 00:40:09 2 0.03 0.00 0.02 0.00 0.03 99.92 10:21:37 00:40:09 3 0.01 0.00 0.02 0.01 0.02 99.95 10:21:37 00:50:01 all 0.15 0.00 0.02 0.01 0.02 99.80 10:21:37 00:50:01 0 0.01 0.00 0.01 0.02 0.01 99.94 10:21:37 00:50:01 1 0.58 0.00 0.04 0.00 0.03 99.35 10:21:37 00:50:01 2 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 00:50:01 3 0.01 0.00 0.01 0.00 0.01 99.97 10:21:37 01:00:09 all 0.10 0.00 0.02 0.01 0.02 99.86 10:21:37 01:00:09 0 0.02 0.00 0.01 0.00 0.02 99.95 10:21:37 01:00:09 1 0.22 0.00 0.02 0.00 0.02 99.73 10:21:37 01:00:09 2 0.13 0.00 0.02 0.02 0.01 99.81 10:21:37 01:00:09 3 0.01 0.00 0.02 0.00 0.02 99.94 10:21:37 01:10:09 all 0.15 0.00 0.03 0.01 0.02 99.80 10:21:37 01:10:09 0 0.02 0.00 0.01 0.00 0.02 99.95 10:21:37 01:10:09 1 0.01 0.00 0.01 0.00 0.01 99.96 10:21:37 01:10:09 2 0.53 0.00 0.05 0.02 0.03 99.37 10:21:37 01:10:09 3 0.02 0.00 0.03 0.01 0.02 99.92 10:21:37 01:20:01 all 0.03 0.00 0.03 0.01 0.02 99.91 10:21:37 01:20:01 0 0.01 0.00 0.02 0.00 0.01 99.95 10:21:37 01:20:01 1 0.10 0.00 0.04 0.00 0.03 99.84 10:21:37 01:20:01 2 0.02 0.00 0.02 0.02 0.01 99.94 10:21:37 01:20:01 3 0.02 0.00 0.03 0.01 0.02 99.93 10:21:37 01:30:09 all 0.04 0.00 0.02 0.01 0.02 99.92 10:21:37 01:30:09 0 0.01 0.00 0.02 0.00 0.01 99.94 10:21:37 01:30:09 1 0.10 0.00 0.02 0.00 0.02 99.86 10:21:37 01:30:09 2 0.02 0.00 0.02 0.02 0.02 99.91 10:21:37 01:30:09 3 0.01 0.00 0.01 0.00 0.01 99.97 10:21:37 01:40:09 all 0.09 0.00 0.02 0.01 0.02 99.87 10:21:37 01:40:09 0 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 01:40:09 1 0.31 0.00 0.03 0.00 0.03 99.63 10:21:37 01:40:09 2 0.01 0.00 0.01 0.03 0.01 99.94 10:21:37 01:40:09 3 0.02 0.00 0.01 0.00 0.02 99.96 10:21:37 01:50:01 all 0.02 0.00 0.02 0.01 0.02 99.93 10:21:37 01:50:01 0 0.02 0.00 0.02 0.02 0.02 99.93 10:21:37 01:50:01 1 0.02 0.00 0.02 0.00 0.03 99.93 10:21:37 01:50:01 2 0.02 0.00 0.02 0.00 0.01 99.94 10:21:37 01:50:01 3 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 10:21:37 01:50:01 CPU %user %nice %system %iowait %steal %idle 10:21:37 02:00:09 all 0.02 0.00 0.02 0.01 0.02 99.94 10:21:37 02:00:09 0 0.02 0.00 0.02 0.03 0.02 99.91 10:21:37 02:00:09 1 0.02 0.00 0.02 0.00 0.03 99.93 10:21:37 02:00:09 2 0.02 0.00 0.01 0.00 0.01 99.96 10:21:37 02:00:09 3 0.01 0.00 0.01 0.01 0.01 99.95 10:21:37 02:10:09 all 0.05 0.00 0.02 0.01 0.02 99.91 10:21:37 02:10:09 0 0.01 0.00 0.02 0.02 0.02 99.93 10:21:37 02:10:09 1 0.16 0.00 0.01 0.01 0.02 99.81 10:21:37 02:10:09 2 0.02 0.00 0.02 0.00 0.02 99.95 10:21:37 02:10:09 3 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 02:20:01 all 0.11 0.00 0.02 0.01 0.02 99.84 10:21:37 02:20:01 0 0.02 0.00 0.02 0.01 0.02 99.95 10:21:37 02:20:01 1 0.41 0.00 0.04 0.00 0.03 99.52 10:21:37 02:20:01 2 0.02 0.00 0.01 0.02 0.01 99.95 10:21:37 02:20:01 3 0.01 0.00 0.02 0.01 0.01 99.95 10:21:37 02:30:09 all 0.02 0.00 0.02 0.01 0.02 99.93 10:21:37 02:30:09 0 0.01 0.00 0.02 0.01 0.02 99.94 10:21:37 02:30:09 1 0.03 0.00 0.02 0.00 0.01 99.94 10:21:37 02:30:09 2 0.02 0.00 0.02 0.01 0.02 99.92 10:21:37 02:30:09 3 0.01 0.00 0.01 0.00 0.02 99.95 10:21:37 02:40:09 all 0.04 0.00 0.02 0.01 0.02 99.92 10:21:37 02:40:09 0 0.02 0.00 0.02 0.02 0.02 99.93 10:21:37 02:40:09 1 0.11 0.00 0.02 0.00 0.03 99.85 10:21:37 02:40:09 2 0.02 0.00 0.03 0.01 0.02 99.93 10:21:37 02:40:09 3 0.01 0.00 0.01 0.00 0.01 99.96 10:21:37 02:50:01 all 0.08 0.00 0.02 0.01 0.02 99.87 10:21:37 02:50:01 0 0.02 0.00 0.02 0.03 0.01 99.92 10:21:37 02:50:01 1 0.26 0.00 0.04 0.00 0.03 99.66 10:21:37 02:50:01 2 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 02:50:01 3 0.01 0.00 0.02 0.00 0.02 99.95 10:21:37 03:00:09 all 0.18 0.00 0.02 0.31 0.02 99.48 10:21:37 03:00:09 0 0.02 0.00 0.03 0.06 0.03 99.86 10:21:37 03:00:09 1 0.66 0.00 0.01 0.00 0.02 99.32 10:21:37 03:00:09 2 0.01 0.00 0.02 0.00 0.00 99.96 10:21:37 03:00:09 3 0.02 0.00 0.01 1.18 0.02 98.77 10:21:37 03:10:09 all 0.22 0.00 0.02 0.01 0.02 99.73 10:21:37 03:10:09 0 0.01 0.00 0.01 0.00 0.02 99.95 10:21:37 03:10:09 1 0.84 0.00 0.03 0.01 0.02 99.09 10:21:37 03:10:09 2 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 03:10:09 3 0.02 0.00 0.03 0.02 0.02 99.92 10:21:37 03:20:01 all 0.37 0.00 0.02 0.01 0.02 99.59 10:21:37 03:20:01 0 0.12 0.00 0.02 0.00 0.02 99.84 10:21:37 03:20:01 1 1.32 0.00 0.01 0.02 0.01 98.63 10:21:37 03:20:01 2 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 03:20:01 3 0.01 0.00 0.02 0.01 0.03 99.93 10:21:37 03:30:09 all 0.02 0.00 0.02 0.01 0.02 99.93 10:21:37 03:30:09 0 0.03 0.00 0.02 0.01 0.03 99.91 10:21:37 03:30:09 1 0.03 0.00 0.01 0.01 0.01 99.94 10:21:37 03:30:09 2 0.01 0.00 0.02 0.00 0.01 99.95 10:21:37 03:30:09 3 0.01 0.00 0.03 0.01 0.02 99.94 10:21:37 03:40:02 all 0.04 0.00 0.02 0.01 0.02 99.92 10:21:37 03:40:02 0 0.01 0.00 0.02 0.02 0.02 99.94 10:21:37 03:40:02 1 0.12 0.00 0.01 0.00 0.01 99.85 10:21:37 03:40:02 2 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 03:40:02 3 0.02 0.00 0.03 0.00 0.03 99.93 10:21:37 10:21:37 03:40:02 CPU %user %nice %system %iowait %steal %idle 10:21:37 03:50:01 all 0.06 0.00 0.02 0.01 0.02 99.90 10:21:37 03:50:01 0 0.01 0.00 0.01 0.02 0.02 99.94 10:21:37 03:50:01 1 0.03 0.00 0.03 0.00 0.03 99.91 10:21:37 03:50:01 2 0.02 0.00 0.02 0.00 0.01 99.96 10:21:37 03:50:01 3 0.17 0.00 0.02 0.00 0.02 99.78 10:21:37 04:00:09 all 0.07 0.00 0.02 0.01 0.02 99.88 10:21:37 04:00:09 0 0.01 0.00 0.02 0.02 0.02 99.93 10:21:37 04:00:09 1 0.02 0.00 0.00 0.00 0.01 99.97 10:21:37 04:00:09 2 0.03 0.00 0.02 0.00 0.02 99.93 10:21:37 04:00:09 3 0.24 0.00 0.02 0.00 0.02 99.71 10:21:37 04:10:09 all 0.13 0.00 0.02 0.01 0.02 99.82 10:21:37 04:10:09 0 0.01 0.00 0.02 0.01 0.02 99.94 10:21:37 04:10:09 1 0.48 0.00 0.02 0.00 0.02 99.48 10:21:37 04:10:09 2 0.01 0.00 0.01 0.02 0.01 99.95 10:21:37 04:10:09 3 0.03 0.00 0.03 0.01 0.02 99.92 10:21:37 04:20:01 all 0.16 0.00 0.02 0.01 0.02 99.80 10:21:37 04:20:01 0 0.02 0.00 0.02 0.00 0.02 99.95 10:21:37 04:20:01 1 0.02 0.00 0.03 0.00 0.02 99.93 10:21:37 04:20:01 2 0.58 0.00 0.02 0.01 0.02 99.38 10:21:37 04:20:01 3 0.01 0.00 0.02 0.01 0.02 99.94 10:21:37 04:30:01 all 0.02 0.00 0.02 0.01 0.02 99.94 10:21:37 04:30:01 0 0.01 0.00 0.02 0.01 0.01 99.95 10:21:37 04:30:01 1 0.02 0.00 0.02 0.01 0.02 99.93 10:21:37 04:30:01 2 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 04:30:01 3 0.02 0.00 0.03 0.01 0.03 99.91 10:21:37 04:40:09 all 0.02 0.00 0.02 0.01 0.02 99.94 10:21:37 04:40:09 0 0.02 0.00 0.02 0.02 0.01 99.93 10:21:37 04:40:09 1 0.02 0.00 0.01 0.00 0.01 99.96 10:21:37 04:40:09 2 0.02 0.00 0.01 0.00 0.00 99.97 10:21:37 04:40:09 3 0.03 0.00 0.03 0.00 0.03 99.90 10:21:37 04:50:00 all 0.24 0.00 0.02 0.01 0.02 99.72 10:21:37 04:50:00 0 0.90 0.00 0.02 0.02 0.03 99.03 10:21:37 04:50:00 1 0.01 0.00 0.02 0.00 0.01 99.96 10:21:37 04:50:00 2 0.02 0.00 0.02 0.00 0.01 99.94 10:21:37 04:50:00 3 0.01 0.00 0.03 0.01 0.02 99.93 10:21:37 05:00:07 all 0.11 0.00 0.02 0.01 0.02 99.85 10:21:37 05:00:07 0 0.14 0.00 0.02 0.01 0.01 99.82 10:21:37 05:00:07 1 0.01 0.00 0.01 0.00 0.01 99.96 10:21:37 05:00:07 2 0.03 0.00 0.02 0.02 0.03 99.90 10:21:37 05:00:07 3 0.24 0.00 0.02 0.00 0.02 99.72 10:21:37 05:10:07 all 0.40 0.00 0.02 0.01 0.02 99.56 10:21:37 05:10:07 0 0.01 0.00 0.02 0.00 0.01 99.95 10:21:37 05:10:07 1 1.53 0.00 0.02 0.00 0.02 98.43 10:21:37 05:10:07 2 0.02 0.00 0.02 0.02 0.01 99.93 10:21:37 05:10:07 3 0.01 0.00 0.02 0.00 0.02 99.95 10:21:37 05:20:00 all 0.20 0.00 0.02 0.01 0.02 99.76 10:21:37 05:20:00 0 0.57 0.00 0.01 0.00 0.02 99.39 10:21:37 05:20:00 1 0.11 0.00 0.03 0.01 0.03 99.81 10:21:37 05:20:00 2 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 05:20:00 3 0.07 0.00 0.01 0.01 0.02 99.90 10:21:37 05:30:09 all 0.15 0.00 0.02 0.01 0.02 99.81 10:21:37 05:30:09 0 0.54 0.00 0.01 0.01 0.02 99.41 10:21:37 05:30:09 1 0.01 0.00 0.02 0.00 0.01 99.96 10:21:37 05:30:09 2 0.02 0.00 0.04 0.00 0.02 99.91 10:21:37 05:30:09 3 0.01 0.00 0.01 0.01 0.01 99.96 10:21:37 10:21:37 05:30:09 CPU %user %nice %system %iowait %steal %idle 10:21:37 05:40:09 all 0.04 0.00 0.02 0.01 0.02 99.92 10:21:37 05:40:09 0 0.01 0.00 0.01 0.00 0.02 99.95 10:21:37 05:40:09 1 0.01 0.00 0.01 0.02 0.01 99.94 10:21:37 05:40:09 2 0.12 0.00 0.02 0.00 0.03 99.84 10:21:37 05:40:09 3 0.01 0.00 0.02 0.01 0.02 99.94 10:21:37 05:50:01 all 0.13 0.00 0.02 0.01 0.02 99.82 10:21:37 05:50:01 0 0.01 0.00 0.02 0.02 0.02 99.93 10:21:37 05:50:01 1 0.02 0.00 0.02 0.02 0.01 99.93 10:21:37 05:50:01 2 0.49 0.00 0.02 0.00 0.02 99.47 10:21:37 05:50:01 3 0.02 0.00 0.02 0.01 0.02 99.93 10:21:37 06:00:09 all 0.07 0.00 0.02 0.01 0.02 99.88 10:21:37 06:00:09 0 0.24 0.00 0.03 0.00 0.02 99.71 10:21:37 06:00:09 1 0.01 0.00 0.02 0.01 0.01 99.95 10:21:37 06:00:09 2 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 06:00:09 3 0.02 0.00 0.01 0.01 0.02 99.94 10:21:37 06:10:09 all 0.07 0.00 0.02 0.01 0.02 99.89 10:21:37 06:10:09 0 0.23 0.00 0.01 0.01 0.01 99.74 10:21:37 06:10:09 1 0.01 0.00 0.02 0.00 0.02 99.95 10:21:37 06:10:09 2 0.03 0.00 0.03 0.00 0.02 99.92 10:21:37 06:10:09 3 0.01 0.00 0.01 0.02 0.02 99.94 10:21:37 06:20:01 all 0.18 0.00 0.02 0.01 0.02 99.77 10:21:37 06:20:01 0 0.15 0.00 0.01 0.00 0.01 99.82 10:21:37 06:20:01 1 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 06:20:01 2 0.03 0.00 0.03 0.01 0.03 99.90 10:21:37 06:20:01 3 0.53 0.00 0.02 0.01 0.02 99.42 10:21:37 06:30:09 all 0.06 0.00 0.02 0.01 0.02 99.90 10:21:37 06:30:09 0 0.01 0.00 0.01 0.01 0.01 99.97 10:21:37 06:30:09 1 0.02 0.00 0.03 0.01 0.03 99.91 10:21:37 06:30:09 2 0.18 0.00 0.02 0.01 0.01 99.78 10:21:37 06:30:09 3 0.03 0.00 0.02 0.00 0.02 99.92 10:21:37 06:40:09 all 0.18 0.00 0.02 0.01 0.02 99.77 10:21:37 06:40:09 0 0.67 0.00 0.02 0.02 0.03 99.26 10:21:37 06:40:09 1 0.02 0.00 0.03 0.00 0.02 99.93 10:21:37 06:40:09 2 0.01 0.00 0.02 0.00 0.01 99.96 10:21:37 06:40:09 3 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 06:50:01 all 0.10 0.00 0.02 0.01 0.02 99.85 10:21:37 06:50:01 0 0.34 0.00 0.01 0.02 0.02 99.61 10:21:37 06:50:01 1 0.01 0.00 0.01 0.01 0.01 99.97 10:21:37 06:50:01 2 0.03 0.00 0.04 0.00 0.03 99.91 10:21:37 06:50:01 3 0.02 0.00 0.02 0.00 0.02 99.93 10:21:37 07:00:09 all 0.24 0.00 0.02 0.01 0.02 99.72 10:21:37 07:00:09 0 0.01 0.00 0.01 0.02 0.01 99.95 10:21:37 07:00:09 1 0.02 0.00 0.01 0.01 0.01 99.95 10:21:37 07:00:09 2 0.07 0.00 0.01 0.00 0.01 99.91 10:21:37 07:00:09 3 0.84 0.00 0.05 0.00 0.04 99.07 10:21:37 07:10:09 all 0.02 0.00 0.02 0.01 0.02 99.94 10:21:37 07:10:09 0 0.01 0.00 0.01 0.02 0.01 99.95 10:21:37 07:10:09 1 0.02 0.00 0.02 0.00 0.02 99.95 10:21:37 07:10:09 2 0.02 0.00 0.02 0.00 0.01 99.95 10:21:37 07:10:09 3 0.03 0.00 0.03 0.00 0.04 99.90 10:21:37 07:20:01 all 0.24 0.00 0.02 0.01 0.02 99.72 10:21:37 07:20:01 0 0.02 0.00 0.02 0.00 0.03 99.93 10:21:37 07:20:01 1 0.02 0.00 0.02 0.02 0.02 99.92 10:21:37 07:20:01 2 0.47 0.00 0.02 0.00 0.01 99.50 10:21:37 07:20:01 3 0.44 0.00 0.02 0.00 0.02 99.52 10:21:37 10:21:37 07:20:01 CPU %user %nice %system %iowait %steal %idle 10:21:37 07:30:09 all 0.22 0.00 0.02 0.01 0.02 99.74 10:21:37 07:30:09 0 0.02 0.00 0.03 0.00 0.02 99.92 10:21:37 07:30:09 1 0.01 0.00 0.01 0.01 0.01 99.95 10:21:37 07:30:09 2 0.81 0.00 0.01 0.00 0.01 99.17 10:21:37 07:30:09 3 0.02 0.00 0.02 0.01 0.02 99.92 10:21:37 07:40:09 all 0.16 0.00 0.02 0.01 0.02 99.80 10:21:37 07:40:09 0 0.01 0.00 0.02 0.00 0.02 99.95 10:21:37 07:40:09 1 0.02 0.00 0.02 0.01 0.02 99.92 10:21:37 07:40:09 2 0.60 0.00 0.01 0.00 0.01 99.37 10:21:37 07:40:09 3 0.02 0.00 0.02 0.01 0.02 99.94 10:21:37 07:50:01 all 0.41 0.00 0.02 0.01 0.02 99.54 10:21:37 07:50:01 0 0.01 0.00 0.01 0.00 0.01 99.97 10:21:37 07:50:01 1 0.40 0.00 0.03 0.01 0.03 99.54 10:21:37 07:50:01 2 1.22 0.00 0.04 0.01 0.02 98.71 10:21:37 07:50:01 3 0.02 0.00 0.01 0.00 0.02 99.95 10:21:37 08:00:09 all 0.02 0.00 0.02 0.01 0.01 99.94 10:21:37 08:00:09 0 0.00 0.00 0.01 0.02 0.01 99.96 10:21:37 08:00:09 1 0.01 0.00 0.01 0.01 0.01 99.95 10:21:37 08:00:09 2 0.02 0.00 0.02 0.00 0.02 99.94 10:21:37 08:00:09 3 0.02 0.00 0.03 0.01 0.02 99.91 10:21:37 08:10:09 all 0.18 0.00 0.02 0.01 0.02 99.78 10:21:37 08:10:09 0 0.01 0.00 0.01 0.02 0.02 99.94 10:21:37 08:10:09 1 0.16 0.00 0.02 0.00 0.01 99.81 10:21:37 08:10:09 2 0.53 0.00 0.03 0.00 0.02 99.42 10:21:37 08:10:09 3 0.03 0.00 0.02 0.01 0.02 99.94 10:21:37 08:20:01 all 0.25 0.00 0.02 0.01 0.02 99.71 10:21:37 08:20:01 0 0.01 0.00 0.01 0.00 0.02 99.96 10:21:37 08:20:01 1 0.32 0.00 0.01 0.00 0.01 99.65 10:21:37 08:20:01 2 0.03 0.00 0.03 0.01 0.03 99.91 10:21:37 08:20:01 3 0.63 0.00 0.02 0.01 0.02 99.32 10:21:37 08:30:02 all 11.02 0.00 0.93 0.35 0.03 87.67 10:21:37 08:30:02 0 11.07 0.00 1.01 0.34 0.03 87.55 10:21:37 08:30:02 1 9.41 0.00 0.67 0.12 0.04 89.76 10:21:37 08:30:02 2 10.34 0.00 0.90 0.41 0.03 88.32 10:21:37 08:30:02 3 13.28 0.00 1.12 0.53 0.03 85.04 10:21:37 08:40:09 all 64.42 0.01 2.88 0.30 0.11 32.30 10:21:37 08:40:09 0 63.83 0.01 2.84 0.40 0.11 32.81 10:21:37 08:40:09 1 64.22 0.00 3.03 0.40 0.11 32.24 10:21:37 08:40:09 2 65.44 0.00 2.83 0.16 0.10 31.48 10:21:37 08:40:09 3 64.19 0.01 2.81 0.22 0.11 32.65 10:21:37 08:50:01 all 11.05 0.00 0.48 0.04 0.08 88.35 10:21:37 08:50:01 0 11.14 0.00 0.55 0.02 0.07 88.21 10:21:37 08:50:01 1 10.58 0.00 0.47 0.03 0.08 88.83 10:21:37 08:50:01 2 11.19 0.00 0.47 0.09 0.09 88.17 10:21:37 08:50:01 3 11.28 0.00 0.42 0.04 0.08 88.17 10:21:37 09:00:09 all 21.55 0.00 0.77 0.04 0.08 77.55 10:21:37 09:00:09 0 20.87 0.00 0.67 0.02 0.08 78.37 10:21:37 09:00:09 1 22.12 0.00 0.69 0.04 0.09 77.06 10:21:37 09:00:09 2 21.31 0.00 0.84 0.02 0.09 77.74 10:21:37 09:00:09 3 21.91 0.00 0.88 0.08 0.08 77.04 10:21:37 09:10:09 all 6.91 0.00 0.36 0.06 0.08 92.59 10:21:37 09:10:09 0 6.34 0.00 0.39 0.07 0.08 93.12 10:21:37 09:10:09 1 7.77 0.00 0.38 0.07 0.08 91.71 10:21:37 09:10:09 2 7.13 0.00 0.32 0.02 0.09 92.44 10:21:37 09:10:09 3 6.41 0.00 0.36 0.08 0.07 93.08 10:21:37 10:21:37 09:10:09 CPU %user %nice %system %iowait %steal %idle 10:21:37 09:20:01 all 18.62 0.00 0.71 0.03 0.08 80.56 10:21:37 09:20:01 0 17.50 0.00 0.75 0.08 0.07 81.60 10:21:37 09:20:01 1 19.05 0.00 0.77 0.02 0.08 80.08 10:21:37 09:20:01 2 18.64 0.00 0.60 0.01 0.08 80.67 10:21:37 09:20:01 3 19.27 0.00 0.70 0.03 0.09 79.91 10:21:37 09:30:09 all 21.90 0.00 0.73 0.04 0.08 77.25 10:21:37 09:30:09 0 21.23 0.00 0.75 0.02 0.08 77.92 10:21:37 09:30:09 1 22.14 0.00 0.69 0.04 0.08 77.05 10:21:37 09:30:09 2 21.86 0.00 0.83 0.08 0.08 77.15 10:21:37 09:30:09 3 22.36 0.00 0.65 0.03 0.08 76.88 10:21:37 09:40:09 all 8.06 0.00 0.39 0.03 0.08 91.44 10:21:37 09:40:09 0 8.45 0.00 0.33 0.06 0.08 91.08 10:21:37 09:40:09 1 7.62 0.00 0.43 0.01 0.09 91.86 10:21:37 09:40:09 2 7.94 0.00 0.45 0.02 0.08 91.51 10:21:37 09:40:09 3 8.23 0.00 0.37 0.02 0.08 91.31 10:21:37 09:50:01 all 10.25 0.00 0.49 0.02 0.08 89.16 10:21:37 09:50:01 0 9.82 0.00 0.41 0.01 0.07 89.68 10:21:37 09:50:01 1 10.33 0.00 0.55 0.02 0.09 89.02 10:21:37 09:50:01 2 10.71 0.00 0.51 0.03 0.08 88.67 10:21:37 09:50:01 3 10.13 0.00 0.50 0.03 0.08 89.26 10:21:37 10:00:09 all 9.28 0.00 0.38 0.02 0.09 90.24 10:21:37 10:00:09 0 9.49 0.00 0.40 0.02 0.08 90.01 10:21:37 10:00:09 1 9.39 0.00 0.34 0.01 0.09 90.17 10:21:37 10:00:09 2 9.20 0.00 0.37 0.03 0.08 90.32 10:21:37 10:00:09 3 9.04 0.00 0.39 0.02 0.09 90.46 10:21:37 10:10:09 all 19.22 0.00 0.71 0.05 0.08 79.94 10:21:37 10:10:09 0 18.97 0.00 0.73 0.08 0.08 80.13 10:21:37 10:10:09 1 19.49 0.00 0.76 0.06 0.09 79.60 10:21:37 10:10:09 2 19.33 0.00 0.65 0.03 0.08 79.91 10:21:37 10:10:09 3 19.07 0.00 0.70 0.03 0.09 80.12 10:21:37 10:20:01 all 9.54 0.00 0.36 0.02 0.08 90.00 10:21:37 10:20:01 0 9.51 0.00 0.40 0.02 0.08 89.99 10:21:37 10:20:01 1 10.05 0.00 0.36 0.01 0.08 89.49 10:21:37 10:20:01 2 9.38 0.00 0.31 0.03 0.08 90.19 10:21:37 10:20:01 3 9.19 0.00 0.35 0.04 0.08 90.34 10:21:37 Average: all 3.53 0.00 0.16 0.03 0.03 96.25 10:21:37 Average: 0 3.44 0.00 0.16 0.03 0.03 96.34 10:21:37 Average: 1 3.59 0.00 0.16 0.02 0.03 96.20 10:21:37 Average: 2 3.56 0.00 0.16 0.02 0.03 96.22 10:21:37 Average: 3 3.53 0.00 0.17 0.04 0.03 96.23 10:21:37 10:21:37 10:21:37