When using lib juju with a user that does not have access to the controller model, many of the controller functions would raise an error in controller.py line 561:
File ".../juju/controller.py", line 561, in get_cloud
cloud = list(result.clouds.keys())[0] # only lives on one cloud
IndexError: list index out of range
Urgency
Annoying bug in our test suite
Python-libjuju version
3.5.0.0
Juju version
3.5.0
Reproduce / Test
Assuming bootstrapped juju controller with localhost (LXD) as admin:
juju add-user testuser
juju add-model testmodel
juju grant testuer testmodel
juju change-user-password (required to logout of admin account)
juju logout
juju login -u testuser -c localhost
In a Python REPL env:
python3 -m asyncio
from juju.controller import Controller
c = Controller()
await c.connect("localhost", password="<your password for testing user>")
await c.get_cloud()
# LIST INDEX ERROR HERE
Because this user does not have access to the controller, the response coming from CloudFacade is empty.
Description
When using lib juju with a user that does not have access to the controller model, many of the controller functions would raise an error in
controller.py
line 561:Urgency
Annoying bug in our test suite
Python-libjuju version
3.5.0.0
Juju version
3.5.0
Reproduce / Test
Assuming bootstrapped juju controller with localhost (LXD) as admin:
In a Python REPL env: python3 -m asyncio
Because this user does not have access to the controller, the response coming from CloudFacade is empty.
This is currently blocking testing done via private endpoints on PS6.