Charmed MongoDB

Channel Revision Published Runs on
6/stable 164 26 Mar 2024
Ubuntu 22.04
6/candidate 164 26 Mar 2024
Ubuntu 22.04
6/beta 164 26 Mar 2024
Ubuntu 22.04
6/edge 173 27 May 2024
Ubuntu 22.04
5/stable 117 20 Apr 2023
Ubuntu 22.04
5/candidate 117 20 Apr 2023
Ubuntu 22.04
5/edge 139 21 Nov 2023
Ubuntu 22.04 Ubuntu 20.04
5/edge 109 06 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
3.6/stable 100 28 Apr 2023
Ubuntu 20.04 Ubuntu 18.04
3.6/candidate 100 13 Apr 2023
Ubuntu 20.04 Ubuntu 18.04
3.6/edge 100 03 Feb 2023
Ubuntu 20.04 Ubuntu 18.04
juju deploy mongodb --channel 6/stable
Show information

Platform:

Ubuntu
22.04 20.04 18.04

charms.mongodb.v1.mongodb_provider

In this class, we manage client database relations.

This class creates a user and database for each application relation and expose needed information for client connection via fields in external relation.


class MongoDBProvider

Description

In this class, we manage client database relations. None

Methods

MongoDBProvider. __init__( self , charm: CharmBase , substrate , relation_name: str )

Constructor for MongoDBProvider object.

Arguments

charm

the charm for which this relation is provided

substrate

host type, either "k8s" or "vm"

relation_name

the name of the relation

MongoDBProvider. pass_hook_checks( self , event: EventBase )

Description

Runs the pre-hooks checks for MongoDBProvider, returns True if all pass. None

MongoDBProvider. oversee_users( self , departed_relation_id , event )

Oversees the users of the application.

Arguments

departed_relation_id

When specified execution of functions makes sure to exclude the users and databases and remove them if necessary.

event

relation event.

Description

Function manages user relations by removing, updated, and creating users; and dropping databases when necessary.

MongoDBProvider. update_app_relation_data( self )

Description

Helper function to update application relation data. None