Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
action = step.get("action")
if not action:
return
action_name = action.get("name")
if not action_name:
raise InvalidPlan("action requires a name")
if "layer" not in action:
raise InvalidPlan("action requires the target layer to be set")
pause(action, "before")
logger.info(" Executing action '{name}'".format(name=action_name))
layer = layers.get(action["layer"])
execute_action(action_name, action, layer)
pause(action, "after")