Update level for activity defn 06/13706/1
authorMark Beierl <mark.beierl@canonical.com>
Thu, 20 Jul 2023 14:31:10 +0000 (14:31 +0000)
committerMark Beierl <mark.beierl@canonical.com>
Thu, 20 Jul 2023 14:31:10 +0000 (14:31 +0000)
The activity needs to be defined at the class level now

Change-Id: I1f98394548ebebe713cb014bec79e3f728373a5e
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
osm_lcm/temporal/juju_paas_activities.py

index dfa3115..7714470 100644 (file)
@@ -272,8 +272,8 @@ class CharmInfoUtils:
         return None, None
 
 
+@activity.defn(name=RemoveCharm.__name__)
 class RemoveCharmImpl(RemoveCharm):
-    @activity.defn(name=RemoveCharm.__name__)
     async def __call__(self, activity_input: RemoveCharm.Input) -> None:
         app_name = activity_input.application_name
         model_name = activity_input.model_name
@@ -295,8 +295,8 @@ class RemoveCharmImpl(RemoveCharm):
         )
 
 
+@activity.defn(name=CheckCharmIsRemoved.__name__)
 class CheckCharmIsRemovedImpl(CheckCharmIsRemoved):
-    @activity.defn(name=CheckCharmIsRemoved.__name__)
     async def __call__(self, activity_input: CheckCharmIsRemoved.Input) -> None:
         controller = await self.juju_controller._get_controller(activity_input.vim_uuid)
         if activity_input.model_name not in (await controller.list_models()):