-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1009 from cderici/controller-name-not-found
#1009 #### Description `controllers.yaml` is read for the `controller_name` after a connection is established, and this creates a dependency on the juju-cli to be installed in the system, which is not required for pylibjuju. Fixes #996 #### QA Steps Testing this requires a bit of stateful actions. I see two easy ways to test: 1. Use the integration test I added. Add `import pdb;pdb.set_trace()` right before the `new_cont.connect(` line, and run the integration test with `--pdb` as follows: ``` tox -e integration -- -- tests/integration/test_connection.py::test_connection_happy_path --pdb ``` Before continuing, go find the `controllers.yaml` and rename it to something else (sort of easier than removing juju-cli etc): ``` mv controllers.yaml controllers.yaml.tmp ``` Now continue in the pdb (`c`) to see if the new connection will be established without a problem. 2. Do what the integration test is doing manually in the repl: ```python $ python -m asyncio >>> from juju import controller >>> c=controller.Controller();await c.connect() ``` Stop at this point to rename the `controllers.yaml` file. ```python >>> new_c=controller.Controller() >>> await new_c.connect(endpoint=c.endpoint, username=c.username, password=c.password, cacert=c.cacert) ``` This should succeed. Don't forget to rename your controllers.yaml back: ``` mv controllers.yaml.tmp controllers.yaml ``` #### Notes & Discussion JUJU-5317
- Loading branch information
Showing
4 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters