def require_admin_context(ctxt):
    if not ctxt.is_admin:
        raise exception.AdminRequired()
Raise exception.AdminRequired() if context is an admin context.
dataset/ETHPy150Open openstack/rack/rack/context.py/require_admin_context