Libjuju connect to named controller


We are trying to connect libjuju to a named controller and stumbling a bit along the way.

Is there a way to feed libjuju the information it needs to connect to a named controller outside of having it use the .yaml files in ~/.local/share/juju?


I currently don’t think this is possible in the current setup. Although you can pass the information to connect() method on the Controller, I believe you’ll run into other issues where the code relies/reads the information directly from the system.

I think doing the following might be the way forward:

  1. Open a issue to highlight the current troubles.
  2. We could allow XDG_DATA_HOME in a similar vein to Juju, to get around the problem as a quick win.
  3. Ensure we encapsulate the state of the session between calls.
1 Like

This is definitely a gap in libjuju, and w/ the Juju api in general. I’d like to find a spot on the roadmap to fix this, but it hasn’t won out over competing priorities yet.

Contributions definitely welcome here!