Store 
        
        Store an object into the MongoDB storage for caching
        
        Args:
            obj (AtlasServiceBinding.Binding or AtlasServiceInstance.Instance): instance or binding
            
        Returns:
            ObjectId: MongoDB _id
        
        Raises:
            ErrStorageMongoConnection: Error during MongoDB communication.
            ErrStorageTypeUnsupported: Type unsupported.
            ErrStorageStore : Failed to store the binding or instance.

def store(self, obj):
        """ Store 
        
        Store an object into the MongoDB storage for caching
        
        Args:
            obj (AtlasServiceBinding.Binding or AtlasServiceInstance.Instance): instance or binding
            
        Returns:
            ObjectId: MongoDB _id
        
        Raises:
            ErrStorageMongoConnection: Error during MongoDB communication.
            ErrStorageTypeUnsupported: Type unsupported.
            ErrStorageStore : Failed to store the binding or instance.
        """
        
        # query
        if type(obj) is AtlasServiceInstance.Instance:
            query = { "instance_id" : obj.instance_id, "database" : obj.get_dbname(), "cluster": obj.get_cluster(), "parameters" : obj.parameters }
        elif type(obj) is AtlasServiceBinding.Binding:
            query = { "binding_id" : obj.binding_id, "parameters" : obj.parameters, "instance_id": obj.instance.instance_id }
        else:
            raise ErrStorageTypeUnsupported(type(obj))
        
        # insert
        try:
            result = self.broker.insert_one(query)
        except:
            raise ErrStorageMongoConnection("Store Instance or Binding")
        
        if result is not None:
            # Flags the obj to provisioned
            obj.provisioned = True
            return result.inserted_id
        
        raise ErrStorageStore()