Module Import alias Import alias Import alias ImportFrom alias alias alias ImportFrom alias Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return Str orelse If CompareIs NameLoad NameLoad body Return Str orelse If CompareIs NameLoad NameLoad body Return Str orelse Raise Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareGt Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareLt NameLoad Num CompareGt NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Raise Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd UnaryOpNot CompareIs NameLoad NameLoad BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareGt Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases body Expr Str Assign NameStore ListLoad Str Str Str Assign NameStore ListLoad Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Num body Expr Str Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareGt Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareLt NameLoad Num CompareGt NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If BoolOpAnd CompareGt AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotIn SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body If UnaryOpNot SubscriptLoad NameLoad Index Str body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore Dict Assign NameStore Call SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore ListLoad If BoolOpOr UnaryOpNot CompareIn Str NameLoad UnaryOpNot SubscriptLoad NameLoad Index Str body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index Str body For NameStore NameLoad body If CompareEq SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign NameStore NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Dict Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str ListLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Num If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr Num body Continue If UnaryOpNot AttributeLoad NameLoad attr body Continue For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr AttributeLoad NameLoad attr AugAssignAdd SubscriptStore SubscriptLoad NameLoad Index Str Index Str Num If CompareEq AttributeLoad NameLoad attr Str body Break If CompareEq AttributeLoad NameLoad attr Str body If CompareNotIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Dict Assign SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str ListLoad Assign SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str Num For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str attr AttributeLoad NameLoad attr AugAssignAdd SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str Num orelse For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr Num body Continue If CompareEq AttributeLoad NameLoad attr Str body For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr AttributeLoad NameLoad attr AugAssignAdd SubscriptStore SubscriptLoad NameLoad Index Str Index Str Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str Call NameLoad BinOpMult Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list decorator_list
N/A N/A logging N/A ipaddress N/A random polaris_health Error config monitors polaris_common topology N/A __all__ N/A PoolMember Pool N/A LOG N/A N/A logging getLogger __name__ N/A N/A N/A LOG addHandler N/A N/A logging NullHandler N/A MAX_POOL_MEMBER_NAME_LEN 256 N/A MAX_POOL_MEMBER_WEIGHT 99 N/A MAX_POOL_NAME_LEN 256 N/A MAX_REGION_LEN 256 N/A MAX_MAX_ADDRS_RETURNED 32 pprint_status N/A N/A status N/A N/A N/A Convert bool status into a health status string N/A N/A status True N/A N/A UP N/A N/A N/A status False N/A N/A DOWN N/A N/A N/A status None N/A N/A NEW/UNKNOWN N/A N/A N/A Error N/A N/A Invalid status "{}" format status N/A PoolMember N/A N/A N/A A backend server, member of a pool __init__ N/A N/A self ip name weight region N/A None N/A N/A 
        args:
            ip: string, IP address
            name: string, name of the server
            weight: int, weight of the server, if set to 0 the server
                is disabled
            region: string, id of the region, used in topology-based 
                distribution
         N/A N/A N/A _ip N/A N/A ipaddress ip_address ip N/A N/A N/A ValueError N/A N/A log_msg N/A N/A "{}" does not appear to be a valid IP address format ip N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A N/A _ip version 4 N/A N/A log_msg only v4 IP addresses are currently supported N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A self ip ip N/A N/A N/A N/A isinstance name str N/A N/A len name MAX_POOL_MEMBER_NAME_LEN N/A N/A log_msg N/A N/A "{}" name must be a str, {} chars max format name MAX_POOL_MEMBER_NAME_LEN N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A N/A self name name N/A N/A N/A N/A isinstance weight int N/A weight 0 N/A weight MAX_POOL_MEMBER_WEIGHT N/A N/A log_msg N/A N/A "{}" weight "{}" must be an int between 0 and {} format name weight MAX_POOL_MEMBER_WEIGHT N/A N/A Error log_msg N/A N/A N/A self weight weight N/A N/A N/A N/A region None N/A N/A N/A isinstance region str N/A N/A len region MAX_REGION_LEN N/A N/A log_msg N/A N/A "{}" region "{}" must be a str, {} chars max format name region MAX_POOL_MEMBER_NAME_LEN N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A N/A self region region N/A N/A self status None N/A N/A self status_reason None N/A N/A self last_probe_issued_time None N/A N/A self retries_left None N/A N/A Pool N/A N/A N/A A pool of backend servers N/A LB_METHOD_OPTIONS N/A wrr twrr fogroup N/A FALLBACK_OPTIONS N/A any refuse __init__ N/A N/A self name monitor members lb_method fallback max_addrs_returned N/A any 1 N/A N/A 
        args:
            name: string, name of the pool
            monitor: obj, a subclass of monitors.BaseMonitor
            members: list of PoolMember objects
            lb_method: string, distribution method name
            fallback: sring, one of "any", "refuse"
                resolution behaviour when all members of the pool are DOWN
                "any": perform distribution amongst all configured
                    members(ignore health status)
                "refuse": refuse queries
            max_addrs_returned: int, max number of A records to return in
                response
         N/A N/A self name name N/A N/A N/A N/A isinstance name str N/A N/A len name MAX_POOL_NAME_LEN N/A N/A log_msg N/A N/A "{}" name must be a str, {} chars max format name MAX_POOL_NAME_LEN N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A self monitor monitor N/A N/A self members members N/A N/A self lb_method lb_method N/A N/A N/A N/A isinstance lb_method str N/A lb_method N/A self LB_METHOD_OPTIONS N/A N/A _lb_methods N/A N/A ,  join N/A self LB_METHOD_OPTIONS N/A log_msg N/A N/A lb_method "{}" must be a str one of {} format lb_method _lb_methods N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A self fallback fallback N/A N/A N/A N/A isinstance fallback str N/A fallback N/A self FALLBACK_OPTIONS N/A N/A _fallbacks N/A N/A ,  join N/A self FALLBACK_OPTIONS N/A log_msg N/A N/A fallback "{}" must be a str one of {} format fallback _fallbacks N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A self max_addrs_returned max_addrs_returned N/A N/A N/A N/A isinstance max_addrs_returned int N/A max_addrs_returned 1 N/A max_addrs_returned MAX_MAX_ADDRS_RETURNED N/A N/A log_msg N/A N/A "{}" max_addrs_returned "{}" must be an int between 1 and {} format name max_addrs_returned MAX_MAX_ADDRS_RETURNED N/A N/A Error log_msg N/A N/A self last_status None N/A status N/A N/A self N/A N/A N/A Return health status of the pool.

        Read-only property based on health status of the pool members.

        Return True if any member of the pool with a non-0 weight is UP, 
        False otherwise.
         N/A member N/A self members N/A N/A N/A N/A N/A member weight 0 N/A member status N/A N/A True N/A False N/A property from_config_dict N/A N/A cls pool_name obj N/A N/A N/A Build a Pool object from a config dict

        args:
            pool_name: string, pool_name of the pool
            obj: dict, config dict
         N/A N/A N/A obj N/A monitor N/A monitors registered N/A N/A log_msg N/A N/A unknown monitor "{}" format N/A obj N/A monitor N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A N/A monitor_name N/A obj N/A monitor N/A N/A monitor_params obj N/A N/A N/A N/A obj N/A monitor_params N/A N/A log_msg monitor_params should not be empty N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A monitor_params N/A obj N/A monitor_params N/A N/A monitor_params N/A N/A monitor N/A N/A N/A monitors registered N/A monitor_name monitor_params N/A lb_method N/A obj N/A lb_method N/A members N/A N/A N/A N/A N/A members obj N/A N/A obj N/A members N/A N/A log_msg configuration dictionary must contain a non-empty "members" list N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A member_obj N/A obj N/A members N/A N/A _m members N/A N/A N/A N/A member_obj N/A ip N/A _m ip N/A N/A log_msg N/A N/A duplicate member IP {} format N/A member_obj N/A ip N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A region None N/A N/A lb_method twrr N/A N/A region N/A N/A topology get_region N/A member_obj N/A ip N/A config TOPOLOGY_MAP N/A N/A region N/A N/A log_msg N/A N/A unable to determine region for member {}({}) format N/A member_obj N/A ip N/A member_obj N/A name N/A N/A N/A LOG error log_msg N/A N/A Error log_msg N/A _m N/A PoolMember ip N/A member_obj N/A ip name N/A member_obj N/A name weight N/A member_obj N/A weight region region N/A N/A N/A members append _m N/A pool_optional_params N/A N/A N/A fallback obj N/A N/A N/A pool_optional_params N/A fallback N/A obj N/A fallback N/A N/A max_addrs_returned obj N/A N/A N/A pool_optional_params N/A max_addrs_returned N/A obj N/A max_addrs_returned N/A N/A cls name pool_name monitor monitor lb_method lb_method members members pool_optional_params N/A classmethod to_dist_dict N/A N/A self N/A N/A N/A Return dict representation of the Pool required by Polaris PDNS
        to perform query distribution.

        "_default" distribution table is always built.

        Region-specific distribution tables are built only if the pool is using 
        a topology lb method and has an UP member.

        Example:
            {
                'status' : True,
                'lb_method': 'twrr',
                'fallback': 'any', 
                'max_addrs_returned': 1,
                'dist_tables': {
                    '_default': {
                        'rotation': [ '192.168.1.1', '192.168.1.2' ],
                        'num_unique_addrs': 2,
                        'index': 1
                    },

                    'region1': {
                        'rotation': [ '192.168.1.1' ],
                        'num_unique_addrs': 1,
                        'index': 0
                    },

                    'region2': {
                        'rotation': [ '192.168.1.2' ],
                        'num_unique_addrs': 1,
                        'index': 0
                    },
                }
            }
         N/A obj N/A N/A N/A obj N/A status N/A self status N/A N/A obj N/A lb_method N/A self lb_method N/A N/A obj N/A fallback N/A self fallback N/A N/A obj N/A max_addrs_returned N/A self max_addrs_returned N/A dist_tables N/A N/A N/A dist_tables N/A _default N/A N/A N/A N/A dist_tables N/A _default N/A rotation N/A N/A N/A N/A dist_tables N/A _default N/A num_unique_addrs 0 N/A N/A self status N/A N/A member N/A self members N/A N/A N/A N/A member weight 0 N/A N/A N/A N/A N/A member status N/A N/A N/A i N/A range N/A member weight N/A N/A N/A N/A N/A N/A dist_tables N/A _default N/A rotation append N/A member ip N/A N/A N/A dist_tables N/A _default N/A num_unique_addrs 1 N/A N/A N/A self lb_method fogroup N/A N/A N/A N/A N/A self lb_method twrr N/A N/A N/A N/A member region dist_tables N/A N/A N/A dist_tables N/A N/A member region N/A N/A N/A N/A dist_tables N/A N/A member region N/A rotation N/A N/A N/A N/A dist_tables N/A N/A member region N/A num_unique_addrs 0 N/A i N/A range N/A member weight N/A N/A N/A N/A N/A N/A dist_tables N/A N/A member region N/A rotation append N/A member ip N/A N/A N/A dist_tables N/A N/A member region N/A num_unique_addrs 1 N/A N/A member N/A self members N/A N/A N/A N/A member weight 0 N/A N/A N/A N/A N/A self fallback any N/A N/A i N/A range N/A member weight N/A N/A N/A N/A N/A N/A dist_tables N/A _default N/A rotation append N/A member ip N/A N/A N/A dist_tables N/A _default N/A num_unique_addrs 1 N/A name dist_tables N/A N/A N/A N/A random shuffle N/A N/A dist_tables N/A name N/A rotation N/A N/A N/A dist_tables N/A name N/A index N/A int N/A N/A N/A random random N/A len N/A N/A dist_tables N/A name N/A rotation N/A N/A obj N/A dist_tables dist_tables N/A obj N/A N/A