-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JUJU-1671] Charmhub url from model config #724
Conversation
e5885f1
to
ffd8e17
Compare
/build |
url = "https://api.snapcraft.io/v2/charms/info/{}?fields=default-release.revision.subordinate".format(charm_name) | ||
model_conf = await self.model.get_config() | ||
charmhub_url = model_conf['charmhub-url'] | ||
url = "{}/v2/charms/info/{}?fields=default-release.revision.subordinate".format(charmhub_url.value, charm_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we've dropped Python 3.5 support we can use fstrings right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree 👍 we should probably turn all the formattings into fstrings at some point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One small q
I think there's something going on in the tests, none of them is finished, it's more than likely about this change, it's blocking for some reason. Will investigate 👍 |
/build |
/merge |
#739 ## What's Changed * Model name can now be accessed through model.name by @jack-w-shaw in #702 * [JUJU-1593] Fix `unit.run()` and update the old client codes by @cderici in #710 * Add py.typed marker by @sed-i in #709 * [JUJU-1664] Add force, no-wait, destroy-storage params to app.destroy by @cderici in #714 * snapcraft.io access should use https requests by @addyess in #715 * [JUJU-1680] Add issue and PR templates by @cderici in #718 * [JUJU-1681] Add --attach-storage parameter to model.deploy by @cderici in #720 * [JUJU-1706] Allow waiting for `wait_for_exact_units=0` by @cderici in #723 * [JUJU-1663] Drop Python 3.5 support from python-libjuju by @cderici in #722 * [JUJU-1671] Charmhub url from model config by @cderici in #724 * [JUJU-1733] Revisit unitrun example by @cderici in #725 * [JUJU-1800] Revise the `application.upgrade_charm()` (refresh) by @cderici in #729 * [JUJU-1893] Revisit `charmhub.info()` by @cderici in #737 [JUJU-1593]: https://warthogs.atlassian.net/browse/JUJU-1593?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1664]: https://warthogs.atlassian.net/browse/JUJU-1664?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1680]: https://warthogs.atlassian.net/browse/JUJU-1680?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1681]: https://warthogs.atlassian.net/browse/JUJU-1681?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1706]: https://warthogs.atlassian.net/browse/JUJU-1706?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1663]: https://warthogs.atlassian.net/browse/JUJU-1663?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1671]: https://warthogs.atlassian.net/browse/JUJU-1671?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Description
Before this change, the api host address for the charmhub was hard-coded. This change allows fetching the api address from the model config.
QA Steps