@@ -206,17 +206,19 @@ def _handle_test_connectivity(self, param):
206
206
def _handle_block (self , param ):
207
207
action_result = self .add_action_result (ActionResult (param ))
208
208
209
- args = {}
210
- for key in ["cidr" , "source " , "why " , "duration" , "autoscale" ]:
211
- args [key ] = phantom . get_req_value ( param , key )
209
+ bhr_args = {}
210
+ for key in ["cidr" , "why " , "source " , "duration" , "autoscale" ]:
211
+ bhr_args [key ] = param . get ( key , None )
212
212
213
- if "autoscale" in args :
214
- args ["autoscale" ] = True if args ["autoscale" ] == "true" else False
213
+ if "autoscale" in bhr_args :
214
+ bhr_args ["autoscale" ] = \
215
+ True if bhr_args ["autoscale" ] == "true" else False
215
216
216
- self ._bhr .block (** args )
217
+ self .debug_print (f"Block arguments: { bhr_args } " )
218
+ self ._bhr .block (** bhr_args )
217
219
218
220
return action_result .set_status (
219
- phantom .APP_SUCCESS , f"Blocked { args ['cidr' ]} " )
221
+ phantom .APP_SUCCESS , f"Blocked { bhr_args ['cidr' ]} " )
220
222
221
223
def handle_action (self , param ):
222
224
ret_val = phantom .APP_SUCCESS
@@ -225,6 +227,9 @@ def handle_action(self, param):
225
227
action_id = self .get_action_identifier ()
226
228
227
229
self .debug_print ("action_id" , self .get_action_identifier ())
230
+ self .debug_print ("git_hash" , __git_hash__ )
231
+ self .debug_print ("version" , __version__ )
232
+ self .debug_print ("build_time" , __deployed__ )
228
233
229
234
if action_id == 'test_connectivity' :
230
235
ret_val = self ._handle_test_connectivity (param )
0 commit comments