def require_admin_context(ctxt):
    if not ctxt.is_admin:
        raise exception.AdminRequired()
Raise exception.AdminRequired() if context is not an admin context.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/context.py/require_admin_context