def cmd_terminate(self, argv, help):
from ploy.common import yesno<EOL>parser = argparse.ArgumentParser(<EOL>prog="<STR_LIT>" % self.progname,<EOL>description=help,<EOL>)<EOL>instances = self.get_instances(command='<STR_LIT>')<EOL>parser.add_argument("<STR_LIT>", nargs=<NUM_LIT:1>,<EOL>metavar="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>choices=sorted(instances))<EOL>args = parser.parse_args(argv)<EOL>instance = instances[args.instance[<NUM_LIT:0>]]<EOL>if not yesno("<STR_LIT>" % instance.config_id):<EOL><INDENT>return<EOL><DEDENT>instance.hooks.before_terminate(instance)<EOL>instance.terminate()<EOL>instance.hooks.after_terminate(instance)<EOL>
Terminates the instance