@click.group()<EOL>@click.option('<STR_LIT>', '<STR_LIT>',<EOL>default='<STR_LIT>',<EOL>show_default=True,<EOL>help='<STR_LIT>',<EOL>)<EOL>@click.option('<STR_LIT>', '<STR_LIT>',<EOL>default='<STR_LIT>',<EOL>show_default=True,<EOL>help='<STR_LIT>',<EOL>)<EOL>@click.option('<STR_LIT>', '<STR_LIT>',<EOL>default='<STR_LIT>',<EOL>show_default=True,<EOL>help='<STR_LIT>',<EOL>)<EOL>@click.pass_context<EOL>def setup(context, institute, user_mail, user_name):
context.obj['<STR_LIT>'] = institute<EOL>context.obj['<STR_LIT>'] = user_name<EOL>context.obj['<STR_LIT>'] = user_mail<EOL>if context.invoked_subcommand == '<STR_LIT>':<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL>context.obj['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>LOG.info("<STR_LIT>", context.obj['<STR_LIT>'])<EOL>LOG.debug("<STR_LIT>", context.obj['<STR_LIT:host>'])<EOL>LOG.debug("<STR_LIT>", context.obj['<STR_LIT:port>'])<EOL>try:<EOL><INDENT>client = get_connection(<EOL>host=context.obj['<STR_LIT:host>'],<EOL>port=context.obj['<STR_LIT:port>'],<EOL>username=context.obj['<STR_LIT:username>'],<EOL>password=context.obj['<STR_LIT:password>'],<EOL>mongodb = context.obj['<STR_LIT>']<EOL>)<EOL><DEDENT>except ConnectionFailure:<EOL><INDENT>context.abort()<EOL><DEDENT>LOG.info("<STR_LIT>", context.obj['<STR_LIT>'])<EOL>database = client[context.obj['<STR_LIT>']]<EOL>LOG.info("<STR_LIT>")<EOL>try:<EOL><INDENT>LOG.info("<STR_LIT>")<EOL>database.test.find_one()<EOL><DEDENT>except ServerSelectionTimeoutError as err:<EOL><INDENT>LOG.warning("<STR_LIT>")<EOL>LOG.warning("<STR_LIT>")<EOL>context.abort()<EOL><DEDENT>LOG.info("<STR_LIT>")<EOL>mongo_adapter = MongoAdapter(database)<EOL>context.obj['<STR_LIT>'] = mongo_adapter<EOL>
Setup scout instances.