def get_all_credentials(tenant_id):
 session = db.get_session()
 try:
  creds = session.query(l2network_models.Credential).filter_by(tenant_id=tenant_id).all()
  return creds
 except exc.NoResultFound:
  return []

def get_all_credentials ( tenant_id ) : session = db . get_session ( ) try : creds = session . query ( l2network_models . Credential ) . filter_by ( tenant_id = tenant_id ) . all ( ) return creds except exc . NoResultFound : return [ ]
lists all the creds for a tenant .