<s> import logging <EOL> from django import shortcuts <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import exceptions <EOL> from horizon import forms <EOL> from horizon import workflows <EOL> import disaster_recovery . api . api as freezer_api <EOL> LOG = logging . getLogger ( __name__ ) <EOL> class ActionsConfigurationAction ( workflows . Action ) : <EOL> actions = forms . CharField ( <EOL> required = False ) <EOL> job_id = forms . CharField ( <EOL> required = False ) <EOL> class Meta ( object ) : <EOL> name = _ ( "<STR_LIT>" ) <EOL> slug = "<STR_LIT>" <EOL> help_text_template = "<STR_LIT>" "<STR_LIT>" <EOL> class ActionsConfiguration ( workflows . Step ) : <EOL> action_class = ActionsConfigurationAction <EOL> contributes = ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> class UpdateActions ( workflows . Workflow ) : <EOL> slug = "<STR_LIT>" <EOL> name = _ ( "<STR_LIT>" ) <EOL> finalize_button_name = _ ( "<STR_LIT>" ) <EOL> success_message = _ ( '<STR_LIT>' ) <EOL> failure_message = _ ( '<STR_LIT>' ) <EOL> success_url = "<STR_LIT>" <EOL> default_steps = ( ActionsConfiguration , ) <EOL> def handle ( self , request , context ) : <EOL> try : <EOL> if context [ '<STR_LIT>' ] != '<STR_LIT>' : <EOL> freezer_api . Job ( request ) . update_actions ( context [ '<STR_LIT>' ] , <EOL> context [ '<STR_LIT>' ] ) <EOL> return shortcuts . redirect ( '<STR_LIT>' ) <EOL> except Exception : <EOL> exceptions . handle ( request ) <EOL> return False </s>
