diff --git a/scenario/state.py b/scenario/state.py index 4d1293dd..233496c2 100644 --- a/scenario/state.py +++ b/scenario/state.py @@ -29,8 +29,9 @@ ) from uuid import uuid4 +import ops import yaml -from ops import CloudCredential, CloudSpec, pebble +from ops import pebble from ops.charm import CharmBase, CharmEvents from ops.model import SecretRotate, StatusBase @@ -157,7 +158,7 @@ class CloudCredential: """A list of redacted secrets.""" def _to_ops_cloud_credential(self): - return CloudCredential( + return ops.CloudCredential( auth_type=self.auth_type, attributes=self.attributes, redacted=self.redacted, @@ -196,8 +197,8 @@ class CloudSpec: is_controller_cloud: bool = False """If this is the cloud used by the controller.""" - def _to_ops_cloud_spec(self) -> CloudSpec: - return CloudSpec( + def _to_ops_cloud_spec(self) -> ops.CloudSpec: + return ops.CloudSpec( type=self.type, name=self.name, region=self.region,