Open hegerdes opened 1 year ago
The function to set http proxy headers via the environment variable IONOS_HTTP_PROXY_HEADERS is without any function.
IONOS_HTTP_PROXY_HEADERS
The set env gets used, parsed and sent to the proxy.
Red Hat Enterprise Linux 8.8
Python Version:
Python 3.9.16
SDK version:
ionoscloud 6.1.7
OS:
Linux
None
export IONOS_HTTP_PROXY_HEADERS="Connection: Keep-Alive" python my-script #or ansible-playbook my-ionos-playbook
"failed to set Server state present: 'str' object has no attribute 'items'"
You source the env as a raw string here: https://github.com/ionos-cloud/sdk-python/blob/79cbd97ec3c1985964f6c790185ed86ffe715d10/ionoscloud/configuration.py#L222
But it never gets checked or parsed.
Later it gets passed directly to urllib3s ´ProxyManager´: https://github.com/ionos-cloud/sdk-python/blob/79cbd97ec3c1985964f6c790185ed86ffe715d10/ionoscloud/rest.py#L126
urllib3
But ProxyManager expects a Dictionary (Mapping). See here
ProxyManager
Description
The function to set http proxy headers via the environment variable
IONOS_HTTP_PROXY_HEADERS
is without any function.Expected behavior
The set env gets used, parsed and sent to the proxy.
Environment
Red Hat Enterprise Linux 8.8
Python Version:
SDK version:
OS:
Configuration Files
None
How to Reproduce
Error and Debug Output
"failed to set Server state present: 'str' object has no attribute 'items'"
Additional Notes
You source the env as a raw string here: https://github.com/ionos-cloud/sdk-python/blob/79cbd97ec3c1985964f6c790185ed86ffe715d10/ionoscloud/configuration.py#L222
But it never gets checked or parsed.
Later it gets passed directly to
urllib3
s ´ProxyManager´: https://github.com/ionos-cloud/sdk-python/blob/79cbd97ec3c1985964f6c790185ed86ffe715d10/ionoscloud/rest.py#L126But
ProxyManager
expects a Dictionary (Mapping). See hereReferences