<s> from paasta_tools . cli . utils import execute_paasta_serviceinit_on_remote_master <EOL> from paasta_tools . cli . utils import figure_out_service_name <EOL> from paasta_tools . cli . utils import lazy_choices_completer <EOL> from paasta_tools . cli . utils import list_instances <EOL> from paasta_tools . cli . utils import list_services <EOL> from paasta_tools . utils import compose_job_id <EOL> from paasta_tools . utils import DEFAULT_SOA_DIR <EOL> from paasta_tools . utils import list_clusters <EOL> def add_subparser ( subparsers ) : <EOL> status_parser = subparsers . add_parser ( <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> description = ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> ) , <EOL> epilog = ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> ) , <EOL> ) <EOL> status_parser . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> ) . completer = lazy_choices_completer ( list_services ) <EOL> status_parser . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> required = True , <EOL> ) . completer = lazy_choices_completer ( list_instances ) <EOL> status_parser . add_argument ( <EOL> '<STR_LIT:-c>' , '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> required = True , <EOL> ) . completer = lazy_choices_completer ( list_clusters ) <EOL> status_parser . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> required = False , <EOL> ) <EOL> status_parser . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> default = DEFAULT_SOA_DIR , <EOL> required = False , <EOL> help = "<STR_LIT>" , <EOL> ) <EOL> status_parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> required = True , <EOL> help = "<STR_LIT>" , <EOL> ) <EOL> status_parser . set_defaults ( command = paasta_emergency_scale ) <EOL> def paasta_emergency_scale ( args ) : <EOL> """<STR_LIT>""" <EOL> service = figure_out_service_name ( args , soa_dir = args . yelpsoa_config_root ) <EOL> print "<STR_LIT>" % compose_job_id ( service , args . instance ) <EOL> output = execute_paasta_serviceinit_on_remote_master ( '<STR_LIT>' , args . cluster , service , args . instance , <EOL> app_id = args . appid , delta = args . delta ) <EOL> print "<STR_LIT>" % output <EOL> print "<STR_LIT:%s>" % "<STR_LIT:\n>" . join ( paasta_emergency_scale . __doc__ . splitlines ( ) [ - <NUM_LIT:7> : ] ) </s>
