Populate
        
        Query mongo to get information about the obj if it exists
        
        Args:
            obj (AtlasServiceBinding.Binding or AtlasServiceInstance.Instance): instance or binding
        
        Raises:
            ErrStorageTypeUnsupported: Type unsupported.
            ErrStorageMongoConnection: Error during MongoDB communication.

def populate(self, obj):
        """ Populate
        
        Query mongo to get information about the obj if it exists
        
        Args:
            obj (AtlasServiceBinding.Binding or AtlasServiceInstance.Instance): instance or binding
        
        Raises:
            ErrStorageTypeUnsupported: Type unsupported.
            ErrStorageMongoConnection: Error during MongoDB communication.
        """
        
        # query
        if type(obj) is AtlasServiceInstance.Instance:
            query = { "instance_id" : obj.instance_id, "binding_id" : { "$exists" : False } }
        elif type(obj) is AtlasServiceBinding.Binding:
            query = { "binding_id" : obj.binding_id, "instance_id" : obj.instance.instance_id }
        else:
            raise ErrStorageTypeUnsupported(type(obj))
        
        # find
        try:
            result = self.broker.find_one(query)
        except:
            raise ErrStorageMongoConnection("Populate Instance or Binding")
        
        if result is not None:
            obj.parameters = result["parameters"]
            
            # Flags the obj to provisioned
            obj.provisioned = True
        else:
            # New
            obj.provisioned = False