Exemple #1
0
 def get_group(self, group_id):
     try:
         return self.db.get('group-%s' % group_id)
     except exception.NotFound:
         raise exception.GroupNotFound(group_id=group_id)
Exemple #2
0
 def _get_group(self, session, group_id):
     ref = session.query(Group).get(group_id)
     if not ref:
         raise exception.GroupNotFound(group_id=group_id)
     return ref
Exemple #3
0
 def _get_group(self, group_id):
     session = self.get_session()
     ref = session.query(Group).filter_by(id=group_id).first()
     if not ref:
         raise exception.GroupNotFound(group_id=group_id)
     return ref.to_dict()