Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list decorator_list
N/A N/A 
Roles in this namespace are meant to provide `MongoDB <http://www.mongodb.org/>`_ database management utilities for Debian distributions.
 cStringIO StringIO configobj ConfigObj provy.core Role provy.more.debian.package.aptitude AptitudeRole MongoDBRole N/A Role N/A N/A 
    This role provides `MongoDB <http://www.mongodb.org/>`_ database management utilities for Debian distributions.

    Example:
    ::

        from provy.core import Role
        from provy.more.debian import MongoDBRole

        class MySampleRole(Role):
            def provision(self):
                with self.using(MongoDBRole) as role:
                    role.restart()
     provision N/A N/A self N/A N/A N/A 
        Installs `MongoDB <http://www.mongodb.org/>`_ and its dependencies.
        This method should be called upon if overriden in base classes, or MongoDB won't work properly in the remote server.

        Example:
        ::

            from provy.core import Role
            from provy.more.debian import MongoDBRole

            class MySampleRole(Role):
                def provision(self):
                    self.provision_role(MongoDBRole) # no need to call this if using with block.
         N/A distro_info N/A N/A self get_distro_info N/A N/A N/A self log Installing MongoDB via packages N/A N/A N/A distro_info distributor_id Ubuntu N/A N/A N/A N/A self provision_to_ubuntu N/A N/A N/A N/A self provision_to_debian N/A N/A N/A self log MongoDB installed N/A provision_to_debian N/A N/A self N/A N/A N/A 
        Installs MongoDB and its dependencies via Debian-specific repository.
        It's not recommended that you use this method directly; Instead, provision this role directly and it will find out the best way to provision.

        Example:
        ::

            from provy.core import Role
            from provy.more.debian import MongoDBRole

            class MySampleRole(Role):
                def provision(self):
                    with self.using(MongoDBRole) as mongo:
                        mongo.provision_to_debian()
         N/A initialization_type debian-sysvinit N/A N/A N/A self __provision_with_init_type initialization_type N/A provision_to_ubuntu N/A N/A self N/A N/A N/A 
        Installs MongoDB and its dependencies via Ubuntu-specific repository.
        It's not recommended that you use this method directly; Instead, provision this role directly and it will find out the best way to provision.

        Example:
        ::

            from provy.core import Role
            from provy.more.debian import MongoDBRole

            class MySampleRole(Role):
                def provision(self):
                    with self.using(MongoDBRole) as mongo:
                        mongo.provision_to_ubuntu()
         N/A initialization_type ubuntu-upstart N/A N/A N/A self __provision_with_init_type initialization_type N/A __provision_with_init_type N/A N/A self initialization_type N/A N/A N/A N/A N/A self using AptitudeRole aptitude N/A N/A N/A N/A aptitude ensure_gpg_key http://docs.mongodb.org/10gen-gpg-key.asc N/A N/A N/A aptitude ensure_aptitude_source N/A deb http://downloads-distro.mongodb.org/repo/%s dist 10gen initialization_type N/A N/A N/A aptitude force_update N/A N/A N/A aptitude ensure_package_installed mongodb-10gen N/A restart N/A N/A self N/A N/A N/A 
        Restarts the MongoDB database.

        Example:
        ::

            from provy.core import Role
            from provy.more.debian import MongoDBRole

            class MySampleRole(Role):
                def provision(self):
                    with self.using(MongoDBRole) as mongo:
                        mongo.restart()
         N/A N/A N/A self execute service mongodb restart sudo True N/A configure N/A N/A self configuration N/A N/A N/A 
        Configures the MongoDB database according to a dictionary.

        .. note::
            Some important details about this method:

            * It will leave configuration items untouched if they're not changed;
            * It will create a new configuration item if it doesn't exist yet;
            * It will overwrite the configuration items defined in the original configuration by the ones defined in the `configuration` argument, if they have the same name;
            * It will convert boolean items to lowercase (like :data:`True` to "true"), when writing, to follow the `mongodb.conf` conventions;
            * It will leave file comments untouched, to avoid losing potentially important information;

        :param configuration: The intended configuration items.
        :type configuration: :class:`dict`

        Example:
        ::

            from provy.core import Role
            from provy.more.debian import MongoDBRole

            class MySampleRole(Role):
                def provision(self):
                    with self.using(MongoDBRole) as mongo:
                        mongo.configure({
                            'port': 9876,
                            'replSet': 'my_replica_set',
                        })
         N/A mongodb_config_path /etc/mongodb.conf N/A config N/A N/A self __config_from_remote mongodb_config_path N/A N/A N/A self __set_config_items configuration config N/A tmp_file N/A N/A self __tmp_file_with_config config N/A N/A N/A self put_file from_file tmp_file to_file mongodb_config_path sudo True N/A __tmp_file_with_config N/A N/A self config N/A N/A N/A output_buffer N/A StringIO N/A N/A N/A config write output_buffer N/A tmp_file N/A N/A self write_to_temp_file N/A N/A output_buffer getvalue N/A tmp_file N/A __config_from_remote N/A N/A self mongodb_config_path N/A N/A N/A config_content N/A N/A self read_remote_file mongodb_config_path sudo True N/A config_buffer N/A StringIO config_content N/A config N/A ConfigObj infile config_buffer N/A config N/A __set_config_items N/A N/A self configuration config N/A N/A N/A N/A key value N/A N/A configuration items N/A N/A N/A isinstance value bool N/A N/A value N/A N/A N/A str value lower N/A N/A config N/A key value N/A N/A