Module Import alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad FunctionDef arguments args defaults vararg kwarg body If CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Return NameLoad If CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore ListComp ListLoad AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr comprehension TupleStore NameStore NameStore NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Assign NameStore ListLoad Dict Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Assign NameStore ListLoad ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Assign NameStore ListLoad Dict Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Assign NameStore ListLoad ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str NameLoad Str Str Str Num NameLoad Str Dict Str Str Str Str Str Str Str Str Str NameLoad Str Str Str Num NameLoad Str Assign NameStore Dict Str Dict Str Str Str Str Str AttributeLoad NameLoad attr Str Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr NameLoad Str Str Str Num NameLoad Str Dict Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr NameLoad Str Str Str Num NameLoad Str Assign NameStore Dict Str Dict Str Str Str Str Str AttributeLoad NameLoad attr Str Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A mock neutron_lib constants n_const neutron_lib exceptions n_exc oslo_config cfg neutron.common constants neutron.common ipv6_utils neutron.db db_base_plugin_common neutron.db db_base_plugin_v2 neutron.db ipam_non_pluggable_backend non_ipam neutron.db models_v2 neutron.tests base TestIpamNonPluggableBackend N/A N/A base BaseTestCase N/A N/A Unit Tests for non pluggable IPAM Logic. test_generate_ip N/A N/A self N/A N/A N/A N/A N/A N/A mock patch object N/A non_ipam IpamNonPluggableBackend _try_generate_ip generate N/A N/A N/A N/A N/A mock patch object N/A non_ipam IpamNonPluggableBackend _rebuild_availability_ranges rebuild N/A N/A N/A N/A N/A non_ipam IpamNonPluggableBackend _generate_ip c s N/A N/A N/A generate assert_called_once_with c s N/A N/A N/A self assertEqual 0 N/A rebuild call_count N/A test_generate_ip_exhausted_pool N/A N/A self N/A N/A N/A N/A N/A N/A mock patch object N/A non_ipam IpamNonPluggableBackend _try_generate_ip generate N/A N/A N/A N/A N/A mock patch object N/A non_ipam IpamNonPluggableBackend _rebuild_availability_ranges rebuild N/A N/A exception N/A N/A n_exc IpAddressGenerationFailure net_id n N/A N/A generate side_effect N/A exception None N/A N/A N/A N/A non_ipam IpamNonPluggableBackend _generate_ip c s N/A N/A N/A self assertEqual 2 N/A generate call_count N/A N/A N/A rebuild assert_called_once_with c s N/A _validate_rebuild_availability_ranges N/A N/A self pools allocations expected N/A N/A N/A ip_qry N/A N/A mock Mock N/A N/A N/A ip_qry with_lockmode return_value ip_qry N/A N/A N/A ip_qry filter_by return_value allocations N/A pool_qry N/A N/A mock Mock N/A N/A N/A pool_qry options return_value pool_qry N/A N/A N/A pool_qry with_lockmode return_value pool_qry N/A N/A N/A pool_qry filter_by return_value pools return_queries_side_effect N/A N/A N/A args kwargs N/A N/A N/A N/A args N/A 0 N/A models_v2 IPAllocation N/A N/A ip_qry N/A N/A N/A args N/A 0 N/A models_v2 IPAllocationPool N/A N/A pool_qry N/A N/A context N/A N/A mock Mock N/A N/A N/A N/A context session query side_effect return_queries_side_effect N/A subnets N/A N/A N/A mock MagicMock N/A N/A N/A N/A non_ipam IpamNonPluggableBackend _rebuild_availability_ranges context subnets N/A actual N/A N/A N/A N/A args N/A 0 allocation_pool_id N/A N/A args N/A 0 first_ip N/A N/A args N/A 0 last_ip N/A N/A _name args _kwargs N/A N/A N/A context session add mock_calls N/A N/A N/A self assertEqual expected actual N/A test_rebuild_availability_ranges N/A N/A self N/A N/A N/A pools N/A N/A id first_ip last_ip a 192.168.1.3 192.168.1.10 N/A id first_ip last_ip b 192.168.1.100 192.168.1.120 N/A allocations N/A N/A ip_address 192.168.1.3 N/A ip_address 192.168.1.78 N/A ip_address 192.168.1.7 N/A ip_address 192.168.1.110 N/A ip_address 192.168.1.11 N/A ip_address 192.168.1.4 N/A ip_address 192.168.1.111 N/A expected N/A N/A a 192.168.1.5 192.168.1.6 N/A a 192.168.1.8 192.168.1.10 N/A b 192.168.1.100 192.168.1.109 N/A b 192.168.1.112 192.168.1.120 N/A N/A N/A self _validate_rebuild_availability_ranges pools allocations expected N/A test_rebuild_ipv6_availability_ranges N/A N/A self N/A N/A N/A pools N/A N/A id first_ip last_ip a 2001::1 2001::50 N/A id first_ip last_ip b 2001::100 2001::ffff:ffff:ffff:fffe N/A allocations N/A N/A ip_address 2001::10 N/A ip_address 2001::45 N/A ip_address 2001::60 N/A ip_address 2001::111 N/A ip_address 2001::200 N/A ip_address 2001::ffff:ffff:ffff:ff10 N/A ip_address 2001::ffff:ffff:ffff:f2f0 N/A expected N/A N/A a 2001::1 2001::f N/A a 2001::11 2001::44 N/A a 2001::46 2001::50 N/A b 2001::100 2001::110 N/A b 2001::112 2001::1ff N/A b 2001::201 2001::ffff:ffff:ffff:f2ef N/A b 2001::ffff:ffff:ffff:f2f1 2001::ffff:ffff:ffff:ff0f N/A b 2001::ffff:ffff:ffff:ff11 2001::ffff:ffff:ffff:fffe N/A N/A N/A self _validate_rebuild_availability_ranges pools allocations expected N/A _test__allocate_ips_for_port N/A N/A self subnets port expected N/A N/A N/A N/A N/A N/A cfg CONF set_override ipam_driver None N/A plugin N/A N/A db_base_plugin_v2 NeutronDbPluginV2 N/A N/A N/A N/A mock patch object N/A db_base_plugin_common DbBasePluginCommon _get_subnets get_subnets N/A N/A N/A N/A N/A mock patch object N/A non_ipam IpamNonPluggableBackend _check_unique_ip check_unique N/A N/A context N/A N/A mock Mock N/A N/A get_subnets return_value subnets N/A N/A check_unique return_value True N/A actual N/A N/A N/A plugin ipam _allocate_ips_for_port context port N/A N/A N/A self assertEqual expected actual N/A test__allocate_ips_for_port_2_slaac_subnets N/A N/A self N/A N/A N/A subnets N/A N/A cidr enable_dhcp gateway_ip id network_id ip_version ipv6_address_mode ipv6_ra_mode 2001:100::/64 True 2001:100::1 d1a28edd-bd83-480a-bd40-93d036c89f13 fbb9b578-95eb-4b79-a116-78e5c4927176 6 None slaac N/A cidr enable_dhcp gateway_ip id network_id ip_version ipv6_address_mode ipv6_ra_mode 2001:200::/64 True 2001:200::1 dc813d3d-ed66-4184-8570-7325c8195e28 fbb9b578-95eb-4b79-a116-78e5c4927176 6 None slaac N/A port N/A port N/A network_id fixed_ips mac_address device_owner fbb9b578-95eb-4b79-a116-78e5c4927176 N/A n_const ATTR_NOT_SPECIFIED 12:34:56:78:44:ab compute N/A expected N/A N/A subnet subnets N/A N/A addr N/A str N/A N/A ipv6_utils get_ipv6_addr_by_EUI64 N/A subnet N/A cidr N/A N/A port N/A port N/A mac_address N/A N/A N/A expected append N/A ip_address subnet_id addr N/A subnet N/A id N/A N/A N/A self _test__allocate_ips_for_port subnets port expected N/A test__allocate_ips_for_port_2_slaac_pd_subnets N/A N/A self N/A N/A N/A subnets N/A N/A cidr enable_dhcp gateway_ip id network_id ip_version ipv6_address_mode ipv6_ra_mode N/A constants PROVISIONAL_IPV6_PD_PREFIX True ::1 d1a28edd-bd83-480a-bd40-93d036c89f13 fbb9b578-95eb-4b79-a116-78e5c4927176 6 None slaac N/A cidr enable_dhcp gateway_ip id network_id ip_version ipv6_address_mode ipv6_ra_mode N/A constants PROVISIONAL_IPV6_PD_PREFIX True ::1 dc813d3d-ed66-4184-8570-7325c8195e28 fbb9b578-95eb-4b79-a116-78e5c4927176 6 None slaac N/A port N/A port N/A network_id fixed_ips mac_address device_owner fbb9b578-95eb-4b79-a116-78e5c4927176 N/A n_const ATTR_NOT_SPECIFIED 12:34:56:78:44:ab compute N/A expected N/A N/A subnet subnets N/A N/A addr N/A str N/A N/A ipv6_utils get_ipv6_addr_by_EUI64 N/A subnet N/A cidr N/A N/A port N/A port N/A mac_address N/A N/A N/A expected append N/A ip_address subnet_id addr N/A subnet N/A id N/A N/A N/A self _test__allocate_ips_for_port subnets port expected N/A N/A