From 10da645ffbcaa17ed2cb07efa2d1fe93979b4895 Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Wed, 27 Nov 2024 16:55:16 +0900 Subject: [PATCH 1/2] chore: add Juju 3.6.0 schema now that it's released --- .../{schemas-juju-3.6-rc1.json => schemas-juju-3.6.0.json} | 3 +++ 1 file changed, 3 insertions(+) rename juju/client/{schemas-juju-3.6-rc1.json => schemas-juju-3.6.0.json} (99%) diff --git a/juju/client/schemas-juju-3.6-rc1.json b/juju/client/schemas-juju-3.6.0.json similarity index 99% rename from juju/client/schemas-juju-3.6-rc1.json rename to juju/client/schemas-juju-3.6.0.json index 9aa310a1..271877ed 100644 --- a/juju/client/schemas-juju-3.6-rc1.json +++ b/juju/client/schemas-juju-3.6.0.json @@ -6070,6 +6070,9 @@ "charm-profile": { "type": "string" }, + "charm-rev": { + "type": "integer" + }, "charm-version": { "type": "string" }, From fa34b610e87f04e497e738be1d5a4a8d2327b67f Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Wed, 27 Nov 2024 16:57:28 +0900 Subject: [PATCH 2/2] chore: rebuild the bindings --- juju/client/_definitions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/juju/client/_definitions.py b/juju/client/_definitions.py index f02b3471..b01afc5e 100644 --- a/juju/client/_definitions.py +++ b/juju/client/_definitions.py @@ -3132,6 +3132,7 @@ class ApplicationStatus(Type): "charm": "charm", "charm_channel": "charm-channel", "charm_profile": "charm-profile", + "charm_rev": "charm-rev", "charm_version": "charm-version", "endpoint_bindings": "endpoint-bindings", "err": "err", @@ -3154,6 +3155,7 @@ class ApplicationStatus(Type): "charm": "charm", "charm-channel": "charm_channel", "charm-profile": "charm_profile", + "charm-rev": "charm_rev", "charm-version": "charm_version", "endpoint-bindings": "endpoint_bindings", "err": "err", @@ -3178,6 +3180,7 @@ def __init__( charm=None, charm_channel=None, charm_profile=None, + charm_rev=None, charm_version=None, endpoint_bindings=None, err=None, @@ -3200,6 +3203,7 @@ def __init__( charm : str charm_channel : str charm_profile : str + charm_rev : int charm_version : str endpoint_bindings : typing.Mapping[str, str] err : Error @@ -3221,6 +3225,7 @@ def __init__( charm_ = charm charm_channel_ = charm_channel charm_profile_ = charm_profile + charm_rev_ = charm_rev charm_version_ = charm_version endpoint_bindings_ = endpoint_bindings err_ = Error.from_json(err) if err else None @@ -3266,6 +3271,11 @@ def __init__( f"Expected charm_profile_ to be a str, received: {type(charm_profile_)}" ) + if charm_rev_ is not None and not isinstance(charm_rev_, int): + raise Exception( + f"Expected charm_rev_ to be a int, received: {type(charm_rev_)}" + ) + if charm_version_ is not None and not isinstance(charm_version_, (bytes, str)): raise Exception( f"Expected charm_version_ to be a str, received: {type(charm_version_)}" @@ -3346,6 +3356,7 @@ def __init__( self.charm = charm_ self.charm_channel = charm_channel_ self.charm_profile = charm_profile_ + self.charm_rev = charm_rev_ self.charm_version = charm_version_ self.endpoint_bindings = endpoint_bindings_ self.err = err_