2.12.0 Support getting cloud specs via the credential-get hook tool, and other improvements.
This release adds a new model method, get_cloud_spec
, that returns information about the cloud where the charm is deployed. This may also include credentials that can be used by the charm to interact directly with the cloud, where Juju does not yet provide sufficient modelling. If your charm is currently using the credential-get
tool directly, you can now make use of this native support in ops. Note that this functionality is only available on machine charms.
Features
- Added
Model.get_cloud_spec
which uses thecredential-get
hook tool to get details of the cloud where the model is deployed #1152
Fixes
- Add a consistency check and default network to
add_relation
by @PietroPasotti in #1138 - Warn when an observer weakref is lost by @PietroPasotti in #1142
- Update Pebble Notices
get_notices
parameter name tousers=all
(previouslyselect=all
) #1146 - More robust validation of observer signatures #1147
- Fix attaching storage in Harness before
begin
#1150 - Change
Model.relation.app
type fromApplication|None
toApplication
#1151 - Fixed an issue where
pebble.Client.exec
might leak asocket.timeout
(builtins.TimeoutError
) exception #1155 - Don't special-case
get_relation
behaviour inleader-elected
#1156 - Accept
type: secret
for config options by @jameinel in #1167
Refactoring
- Refactor main.py, creating a new
_Manager
class by @PietroPasotti in #1085
Documentation
- Use "integrate with" rather than "relate to" #1145
- Updated code examples in the docstring of
ops.testing
from unittest to pytest style #1157 - Add peer relation details in
Harness.add_relation
docstring #1168 - Update Read the Docs Sphinx Furo theme to use Canonical's latest styling #1163, #1164, #1165
New Contributors
Thanks @IronCore864 for your first contributions, and welcome to the team!
Full Changelog: 2.11.0...2.12.0