client-python
client-python copied to clipboard
Rancher 2.2?
I have a process I ran successfully against Rancher 2.1. After upgrading to Rancher 2.2, I get this failure:
Traceback (most recent call last):
File "./rancher_project_creator.py", line 79, in <module>
run_project_loop()
File "./rancher_project_creator.py", line 69, in run_project_loop
api = rancher_api()
File "./rancher_project_creator.py", line 34, in rancher_api
verify=os.getenv("RANCHER_VERIFY")
File "/venv/rancher-client/lib/python3.6/site-packages/rancher.py", line 240, in __init__
self._load_schemas()
File "/venv/rancher-client/lib/python3.6/site-packages/rancher.py", line 359, in _load_schemas
response = self._get_response(self._url)
File "/venv/rancher-client/lib/python3.6/site-packages/rancher.py", line 310, in _get_response
self._error(r.text)
File "/venv/rancher-client/lib/python3.6/site-packages/rancher.py", line 299, in _error
raise ApiError(self._unmarshall(text))
rancher.ApiError: (ApiError(...), 'API Error')
The code that fails is:
rancher = rancher.Client(
url=os.getenv("RANCHER_URL"),
access_key=os.getenv("RANCHER_ACCESS_KEY"),
secret_key=os.getenv("RANCHER_SECRET_KEY"),
verify=os.getenv("RANCHER_VERIFY")
)