@@ -91,24 +91,23 @@ def _entrypoint(ctx, plugin_content: dict, warnet_content: dict):
91
91
"""Called by entrypoint"""
92
92
hook_value = warnet_content [WarnetContent .HOOK_VALUE .value ]
93
93
94
- match hook_value :
95
- case (
96
- HookValue .PRE_NETWORK
97
- | HookValue .POST_NETWORK
98
- | HookValue .PRE_DEPLOY
99
- | HookValue .POST_DEPLOY
100
- ):
101
- data = get_data (plugin_content )
102
- if data :
103
- _launch_pod (ctx , install_name = hook_value .value .lower () + "-hello" , ** data )
104
- else :
105
- _launch_pod (ctx , install_name = hook_value .value .lower () + "-hello" )
106
- case HookValue .PRE_NODE :
107
- name = warnet_content [PLUGIN_ANNEX ][AnnexMember .NODE_NAME .value ] + "-pre-hello-pod"
108
- _launch_pod (ctx , install_name = hook_value .value .lower () + "-" + name , podName = name )
109
- case HookValue .POST_NODE :
110
- name = warnet_content [PLUGIN_ANNEX ][AnnexMember .NODE_NAME .value ] + "-post-hello-pod"
111
- _launch_pod (ctx , install_name = hook_value .value .lower () + "-" + name , podName = name )
94
+ if hook_value in (
95
+ HookValue .PRE_NETWORK ,
96
+ HookValue .POST_NETWORK ,
97
+ HookValue .PRE_DEPLOY ,
98
+ HookValue .POST_DEPLOY ,
99
+ ):
100
+ data = get_data (plugin_content )
101
+ if data :
102
+ _launch_pod (ctx , install_name = hook_value .value .lower () + "-hello" , ** data )
103
+ else :
104
+ _launch_pod (ctx , install_name = hook_value .value .lower () + "-hello" )
105
+ elif hook_value == HookValue .PRE_NODE :
106
+ name = warnet_content [PLUGIN_ANNEX ][AnnexMember .NODE_NAME .value ] + "-pre-hello-pod"
107
+ _launch_pod (ctx , install_name = hook_value .value .lower () + "-" + name , podName = name )
108
+ elif hook_value == HookValue .POST_NODE :
109
+ name = warnet_content [PLUGIN_ANNEX ][AnnexMember .NODE_NAME .value ] + "-post-hello-pod"
110
+ _launch_pod (ctx , install_name = hook_value .value .lower () + "-" + name , podName = name )
112
111
113
112
114
113
def get_data (plugin_content : dict ) -> Optional [dict ]:
0 commit comments