Manage Beacons

def manage_beacons(self, tag, data):
        '''
        Manage Beacons
        '''
        func = data.get('func', None)
        name = data.get('name', None)
        beacon_data = data.get('beacon_data', None)
        include_pillar = data.get('include_pillar', None)
        include_opts = data.get('include_opts', None)

        funcs = {'add': ('add_beacon', (name, beacon_data)),
                 'modify': ('modify_beacon', (name, beacon_data)),
                 'delete': ('delete_beacon', (name,)),
                 'enable': ('enable_beacons', ()),
                 'disable': ('disable_beacons', ()),
                 'enable_beacon': ('enable_beacon', (name,)),
                 'disable_beacon': ('disable_beacon', (name,)),
                 'list': ('list_beacons', (include_opts,
                                           include_pillar)),
                 'list_available': ('list_available_beacons', ()),
                 'validate_beacon': ('validate_beacon', (name,
                                                         beacon_data)),
                 'reset': ('reset', ())}

        # Call the appropriate beacon function
        try:
            alias, params = funcs.get(func)
            getattr(self.beacons, alias)(*params)
        except AttributeError:
            log.error('Function "%s" is unavailable in salt.beacons', func)
        except TypeError as exc:
            log.info(
                'Failed to handle %s with data(%s). Error: %s',
                tag, data, exc,
                exc_info_on_loglevel=logging.DEBUG
            )