Module Import alias Import alias Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Import alias Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Dict Str Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str orelse If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str NameLoad body For NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str orelse If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str NameLoad body For NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str orelse If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str NameLoad body For NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str Dict NameLoad NameLoad Str NameLoad NameLoad Num Num ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad ListLoad Str NameLoad Num Str NameLoad Str Assign NameStore ListLoad Dict Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Str Num Str Str Str Str Dict Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Str Str Num Str Str Str Dict Str Str Str Str Str Str Str Str Num Num Str Str Str Str Dict Str Str Str Str Str Str Str Num Num Str Str Str Dict Str Str Str Str Str Str Str Num Num Str Str Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad Str Str Num Num Str Str Str ListLoad Str Str Str Str Str Str Num Str NameLoad ListLoad Dict Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str NameLoad Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str Str NameLoad NameLoad Str Str Str ListLoad Str Str Str Str NameLoad NameLoad NameLoad ListLoad Dict Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str NameLoad Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str Str Str Str Str Str Str Str Str Str ListLoad Dict Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str NameLoad Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str Str Str Str ListLoad Dict Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str NameLoad Dict Str Str decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num body Expr Call AttributeLoad NameLoad attr keyword Num orelse Expr Call AttributeLoad NameLoad attr
N/A N/A logging N/A unittest N/A sys N/A N/A N/A N/A sys path append ../nipap/ nipap.backend Nipap nipap.authlib SqliteAuth nipap.nipapconfig NipapConfig N/A logger N/A N/A logging getLogger N/A N/A N/A logger setLevel N/A logging DEBUG N/A log_format %(levelname)-8s %(message)s N/A xmlrpclib N/A server_url http://unittest:gottatest@127.0.0.1:1337/XMLRPC N/A s N/A N/A xmlrpclib Server server_url allow_none 1 N/A ad N/A authoritative_source nipap TestCheckdata N/A N/A unittest TestCase N/A N/A  Tests the NIPAP XML-RPC daemon
     N/A maxDiff None _mangle_pool_result N/A N/A self res N/A N/A N/A  Mangle pool result for easier testing

            We can never predict the values of things like the ID (okay, that
            one is actually kind of doable) or the added and last_modified
            timestamp. This function will make sure the values are present but
            then strip them to make it easier to test against an expected
            result.
         N/A N/A isinstance res list N/A N/A p res N/A N/A N/A N/A self assertIn id p N/A N/A p N/A id N/A N/A N/A N/A isinstance res dict N/A result res N/A N/A p N/A res N/A result N/A N/A N/A N/A self assertIn id p N/A N/A p N/A id N/A N/A N/A isinstance res dict N/A N/A N/A N/A self assertIn id res N/A N/A res N/A id N/A res N/A _mangle_prefix_result N/A N/A self res N/A N/A N/A  Mangle prefix result for easier testing

            We can never predict the values of things like the ID (okay, that
            one is actually kind of doable) or the added and last_modified
            timestamp. This function will make sure the values are present but
            then strip them to make it easier to test against an expected
            result.
         N/A N/A isinstance res list N/A N/A p res N/A N/A N/A N/A self assertIn added p N/A N/A N/A self assertIn last_modified p N/A N/A N/A self assertIn id p N/A N/A N/A self assertIn pool_id p N/A N/A p N/A added N/A N/A p N/A last_modified N/A N/A p N/A id N/A N/A p N/A pool_id N/A N/A N/A N/A isinstance res dict N/A result res N/A N/A p N/A res N/A result N/A N/A N/A N/A self assertIn added p N/A N/A N/A self assertIn last_modified p N/A N/A N/A self assertIn id p N/A N/A N/A self assertIn pool_id p N/A N/A p N/A added N/A N/A p N/A last_modified N/A N/A p N/A id N/A N/A p N/A pool_id N/A N/A N/A isinstance res dict N/A N/A N/A N/A self assertIn added res N/A N/A N/A self assertIn last_modified res N/A N/A N/A self assertIn id res N/A N/A N/A self assertIn pool_id res N/A N/A res N/A added N/A N/A res N/A last_modified N/A N/A res N/A id N/A N/A res N/A pool_id N/A res N/A _mangle_vrf_result N/A N/A self res N/A N/A N/A  Mangle vrf result for easier testing

            We can never predict the values of things like the ID (okay, that
            one is actually kind of doable) or the added and last_modified
            timestamp. This function will make sure the values are present but
            then strip them to make it easier to test against an expected
            result.
         N/A N/A isinstance res list N/A N/A p res N/A N/A N/A N/A self assertIn id p N/A N/A p N/A id N/A N/A N/A N/A isinstance res dict N/A result res N/A N/A p N/A res N/A result N/A N/A N/A N/A self assertIn id p N/A N/A p N/A id N/A N/A N/A isinstance res dict N/A N/A N/A N/A self assertIn id res N/A N/A res N/A id N/A res N/A test_verify_prefix N/A N/A self N/A N/A N/A  Verify data after upgrade
         N/A expected_base N/A alarm_priority authoritative_source avps comment country description expires external_key family indent inherited_tags monitor node order_id customer_id pool_name tags type vrf_rt vrf_id vrf_name vlan status None nipap N/A None None test None None 4 0 N/A None None None None None N/A reservation None 0 default None assigned N/A expected_prefixes N/A N/A prefix indent total_addresses used_addresses free_addresses 192.168.0.0/16 0 65536 8192 57344 N/A prefix indent total_addresses used_addresses free_addresses pool_name 192.168.0.0/20 1 4096 768 3328 upgrade-test N/A prefix indent total_addresses used_addresses free_addresses 192.168.0.0/24 2 256 0 256 N/A prefix indent total_addresses used_addresses free_addresses 192.168.1.0/24 2 256 0 256 N/A prefix indent total_addresses used_addresses free_addresses 192.168.2.0/24 2 256 0 256 N/A prefix indent total_addresses used_addresses free_addresses 192.168.32.0/20 1 4096 256 3840 N/A prefix indent total_addresses used_addresses free_addresses 192.168.32.0/24 2 256 1 255 N/A prefix display_prefix indent total_addresses used_addresses free_addresses 192.168.32.1/32 192.168.32.1 3 1 1 0 N/A prefix indent family pool_name total_addresses used_addresses free_addresses 2001:db8:1::/48 0 6 upgrade-test 1208925819614629174706176 18446744073709551616 1208907372870555465154560 N/A prefix indent family total_addresses used_addresses free_addresses 2001:db8:1::/64 1 6 18446744073709551616 0 18446744073709551616 N/A prefix indent family total_addresses used_addresses free_addresses 2001:db8:2::/48 0 6 1208925819614629174706176 0 1208925819614629174706176 N/A expected N/A N/A p expected_prefixes N/A N/A pexp N/A N/A expected_base copy N/A key p N/A N/A N/A pexp N/A key N/A p N/A key N/A N/A display_prefix pexp N/A N/A N/A pexp N/A display_prefix N/A p N/A prefix N/A N/A N/A expected append pexp N/A N/A N/A self assertEqual expected N/A N/A self _mangle_prefix_result N/A N/A s list_prefix N/A auth ad N/A test_pool1 N/A N/A self N/A N/A N/A  Verify data after upgrade
         N/A expected N/A N/A used_prefixes_v4 used_prefixes_v6 free_prefixes_v4 free_prefixes_v6 total_prefixes_v4 total_prefixes_v6 default_type description free_addresses_v4 free_addresses_v6 ipv4_default_prefix_length ipv6_default_prefix_length member_prefixes_v4 member_prefixes_v6 name prefixes total_addresses_v4 total_addresses_v6 used_addresses_v4 used_addresses_v6 vrf_id vrf_name vrf_rt tags avps 3 1 1664 18446462598732840960 1667 18446462598732840961 None None 3328 1208907372870555465154560 31 112 1 1 upgrade-test N/A 192.168.0.0/20 2001:db8:1::/48 4096 1208925819614629174706176 768 18446744073709551616 0 default None N/A N/A N/A N/A N/A self assertEqual expected N/A N/A self _mangle_pool_result N/A N/A s list_pool N/A auth pool ad N/A name upgrade-test N/A test_pool2 N/A N/A self N/A N/A N/A  Verify data after upgrade
         N/A expected N/A N/A used_prefixes_v4 used_prefixes_v6 free_prefixes_v4 free_prefixes_v6 total_prefixes_v4 total_prefixes_v6 default_type description free_addresses_v4 free_addresses_v6 ipv4_default_prefix_length ipv6_default_prefix_length member_prefixes_v4 member_prefixes_v6 name prefixes total_addresses_v4 total_addresses_v6 used_addresses_v4 used_addresses_v6 vrf_id vrf_name vrf_rt tags avps 0 0 None None None None None None 0 0 None None 0 0 upgrade-test2 N/A 0 0 0 0 None None None N/A N/A N/A N/A N/A self assertEqual expected N/A N/A self _mangle_pool_result N/A N/A s list_pool N/A auth pool ad N/A name upgrade-test2 N/A test_vrf1 N/A N/A self N/A N/A N/A  Verify empty VRF looks good
         N/A expected N/A N/A description free_addresses_v4 free_addresses_v6 name num_prefixes_v4 num_prefixes_v6 rt total_addresses_v4 total_addresses_v6 used_addresses_v4 used_addresses_v6 tags avps None 0 0 foo 0 0 123:123 0 0 0 0 N/A N/A N/A N/A N/A self assertEqual expected N/A N/A self _mangle_vrf_result N/A N/A s list_vrf N/A auth vrf ad N/A name foo N/A test_vrf2 N/A N/A self N/A N/A N/A  Verify default VRF looks good with prefixes
         N/A expected N/A N/A description free_addresses_v4 free_addresses_v6 name num_prefixes_v4 num_prefixes_v6 rt total_addresses_v4 total_addresses_v6 used_addresses_v4 used_addresses_v6 tags avps The default VRF, typically the Internet. 57344 2417833192485184639860736 default 8 3 None 65536 2417851639229258349412352 8192 18446744073709551616 N/A N/A N/A N/A N/A self assertEqual expected N/A N/A self _mangle_vrf_result N/A N/A s list_vrf N/A auth vrf ad N/A name default N/A N/A N/A N/A __name__ __main__ N/A N/A log N/A N/A logging getLogger N/A N/A N/A logging basicConfig N/A N/A N/A log setLevel N/A logging INFO N/A N/A N/A sys version_info N/A 2 7 N/A N/A N/A N/A unittest main verbosity 2 N/A N/A N/A N/A unittest main