runner.cli.mongodb

Module Contents

Functions

mongodb(context: click.core.Context)

Commands to operate on the mongodb database

shell(command: Optional[str])

Execute a root session of the MongoDB client

listing(context: click.core.Context)

MongoDB list predicate

drop_mongodb(project: Optional[derex.runner.project.Project], db_name: str)

Drop a MongoDB database

list_databases_cmd(project: Optional[derex.runner.project.Project], db_name: str)

List all MongoDB databases

list_users()

List all MongoDB users

create_user_cmd(user: str, password: str, role: Optional[Tuple])

Create a mongodb user.

copy_mongodb(project: Optional[derex.runner.project.Project], source_db_name: str, destination_db_name: Optional[str], drop: bool)

Copy an existing mongodb database. If no destination database is given defaults

reset_mongodb_password_cmd(current_password: Optional[str], force: bool)

Reset the mongodb root user password with the one derived

runner.cli.mongodb.mongodb(context: click.core.Context)[source]

Commands to operate on the mongodb database

runner.cli.mongodb.shell(command: Optional[str])[source]

Execute a root session of the MongoDB client

runner.cli.mongodb.listing(context: click.core.Context)[source]

MongoDB list predicate

runner.cli.mongodb.drop_mongodb(project: Optional[derex.runner.project.Project], db_name: str)[source]

Drop a MongoDB database

runner.cli.mongodb.list_databases_cmd(project: Optional[derex.runner.project.Project], db_name: str)[source]

List all MongoDB databases

runner.cli.mongodb.list_users()[source]

List all MongoDB users

runner.cli.mongodb.create_user_cmd(user: str, password: str, role: Optional[Tuple])[source]

Create a mongodb user.

runner.cli.mongodb.copy_mongodb(project: Optional[derex.runner.project.Project], source_db_name: str, destination_db_name: Optional[str], drop: bool)[source]

Copy an existing mongodb database. If no destination database is given defaults to the project mongodb database name.

runner.cli.mongodb.reset_mongodb_password_cmd(current_password: Optional[str], force: bool)[source]

Reset the mongodb root user password with the one derived from the Derex main secret.