def get_next_id(self):
        try:
            query = {'_id': 'last_id'}
            update = {'$inc': {'id': 1}}
            fn = self.db.internal.find_and_modify
            row = fn(query, update, upsert=True, new=True)
        except Exception as e:
            raise DatabaseException(e)
        return row['id']
def name(self):
        if self._values['name'] is None:
            return None
        name = str(self._values['name']).strip()
        if name == '':
            raise F5ModuleError(
                "You must specify a name for this module"
            )
        return name