def valid(options, templateopts):
    """Verify that all required options in the template are present"""
    required = templateopts['required'].keys()
    for k in required:
        if k not in options:
            return False
    return True
