@classmethod
    def from_config_dict(cls, pool_name, obj):
        ############################
        ### mandatory parameters ###
        ############################

        ### monitor
        if obj['monitor'] not in monitors.registered:
            log_msg = 'unknown monitor "{}"'.format(obj['monitor'])
            LOG.error(log_msg)
            raise Error(log_msg)
        else:
            monitor_name = obj['monitor']

        if 'monitor_params' in obj:
            if not obj['monitor_params']:
                log_msg = 'monitor_params should not be empty'
                LOG.error(log_msg)
                raise Error(log_msg)

            monitor_params = obj['monitor_params']
        else:
            monitor_params = {}
                 
        monitor = monitors.registered[monitor_name](**monitor_params)

        ### lb_method
        lb_method = obj['lb_method']

        ### members
        members = []

        # validate "members" key is present and not empty
        if not 'members' in obj or not obj['members']:
            log_msg = ('configuration dictionary must contain '
                       'a non-empty "members" list')    
            LOG.error(log_msg)
            raise Error(log_msg)

        for member_obj in obj['members']:
            # ensure a member with the same IP doesn't exist already 
            for _m in members:
                if member_obj['ip'] == _m.ip:
                    log_msg = 'duplicate member IP {}'.format(member_obj['ip'])
                    LOG.error(log_msg)
                    raise Error(log_msg)

            region = None
            # if topology lb method is used - set region on the pool member
            if lb_method == 'twrr':
                region = topology.get_region(
                    member_obj['ip'], config.TOPOLOGY_MAP)
                if not region:
                    log_msg  = ('unable to determine region for member {}({})'
                                .format(member_obj['ip'], member_obj['name'])) 
                    LOG.error(log_msg)
                    raise Error(log_msg)

            _m = PoolMember(ip=member_obj['ip'], 
                            name=member_obj['name'], 
                            weight=member_obj['weight'],
                            region=region)
            members.append(_m)

        ###########################
        ### optional parameters ###
        ###########################
        pool_optional_params = {}

        ### fallback
        if 'fallback' in obj:
            pool_optional_params['fallback'] = obj['fallback']

        ### max_addrs_returned
        if 'max_addrs_returned' in obj:
            pool_optional_params['max_addrs_returned'] = \
                obj['max_addrs_returned']

        # return Pool object
        return cls(name=pool_name,
                   monitor=monitor,
                   lb_method=lb_method,
                   members=members,
                   **pool_optional_params)
Creates a status bar.
dataset/ETHPy150Open polaris-gslb/polaris-gslb/polaris_health/state/pool.py/Pool.from_config_dict--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/ui/null/action/status_bar_manager.py/StatusBarManager.create_status_bar