def require_context(f):

    @functools.wraps(f)
    def wrapper(*args, **kwargs):
        ec2api.context.require_context(args[0])
        return f(*args, **kwargs)
    return wrapper
Decorator to require *any* user or admin context.
dataset/ETHPy150Open openstack/ec2-api/ec2api/db/sqlalchemy/api.py/require_context