Skip to content

2.2.0: Harness.add_network, simplified "import ops"

Compare
Choose a tag to compare
@benhoyt benhoyt released this 27 Mar 23:34
· 1062 commits to main since this release
a8717ea

This is version 2.1.0 of ops, which includes the following changes:

Harness.add_network

In #846 we added Harness.add_network, which allows developers who write charm unit tests to easily add simulated data for the bind address and network information. This is a small but long-requested feature that will avoid charmers patching internal ops methods. Fixes #456.

Simplified way to import ops

In #910 we added a simplified way to import ops: it pulls most of the names in the various ops.foo sub-modules into the top-level ops module so that charmers don’t have to remember which sub-module each class comes from. This also makes the various ops classes more discoverable with an IDE’s autocomplete. Fixes #731.

Other minor changes

There are also a few other minor changes, including the addition of Layer.__eq__ to allow you to compare pebble.Layer objects with the == operator. See the full list of commits in this release.