def validate(config):
    '''
    Validate the beacon configuration
    '''
    # Configuration for pkg beacon should be a list
    if not isinstance(config, dict):
        return False, ('Configuration for pkg beacon must be a dictionary.')
    if 'pkgs' not in config:
        return False, ('Configuration for pkg beacon requires list of pkgs.')
    return True, 'Valid beacon configuration'
dataset/ETHPy150Open saltstack/salt/salt/beacons/pkg.py/validate/original