Exemple #1
0
def get_group_type(ctxt, id, expected_fields=None):
    """Retrieves single group type by id."""
    if id is None:
        msg = _("id cannot be None")
        raise exception.InvalidGroupType(reason=msg)

    if ctxt is None:
        ctxt = context.get_admin_context()

    return db.group_type_get(ctxt, id, expected_fields=expected_fields)
def get_group_type(ctxt, id, expected_fields=None):
    """Retrieves single group type by id."""
    if id is None:
        msg = _("id cannot be None")
        raise exception.InvalidGroupType(reason=msg)

    if ctxt is None:
        ctxt = context.get_admin_context()

    return db.group_type_get(ctxt, id, expected_fields=expected_fields)
Exemple #3
0
def is_public_group_type(context, group_type_id):
    """Return is_public boolean value of group type"""
    group_type = db.group_type_get(context, group_type_id)
    return group_type['is_public']
def is_public_group_type(context, group_type_id):
    """Return is_public boolean value of group type"""
    group_type = db.group_type_get(context, group_type_id)
    return group_type['is_public']