Js-libjuju / getting the right connection url


#1

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 examplewss://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


#2

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


#3

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


#4

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.