def get_by_id(cls, context, id): db_cgsnapshots = db.cgsnapshot_get(context, id) return cls._from_db_object(context, cls(context), db_cgsnapshots)
def _get_cgsnapshot_attrib(cgsnapshot_id, attrib_name): return db.cgsnapshot_get(context.get_admin_context(), cgsnapshot_id)[attrib_name]