Js-libjuju / getting the right connection url

Hello there,

Another day another question.

I was playing around last night first, connecting to JAAS and then listing the models, which works fine.

So, then I wanted to get some info out of a model, but when I was playing around with connection strings, I found I had to specify a JAAS region:

for example wss://1.us-east1.gce.jaas.jujucharms.com/model/<uuid>/api for it to connect.

The model information coming back from modelManager.listModels seems pretty simplistic, name, owner, uuid etc. How do I find the region its in so I can construct a valid connection string?

Thanks

Tom

1 Like

Ah ironically the last doc update was “Update documentation to include the new generateModelURL method.” guess thats it then :man_facepalming:

1 Like

Ah my bad, found the redirect stuff in the other login example, need to iterate through the server urls and pick one.

1 Like

Glad you got it figured out! If you think we can benefit by expanding the documentation in some areas, or another example please file an issue on the repo and I’ll try and get to it.

1 Like