Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad ListLoad Dict Str Str ListLoad NameLoad Call NameLoad Assign NameStore ListLoad Dict Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad ListLoad Dict Str Str Dict NameLoad Call NameLoad ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Expr Call AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Dict NameLoad Dict Str Str Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num For NameStore AttributeLoad NameLoad attr body If CompareEq SubscriptLoad NameLoad Index Str Str body Break Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Dict NameLoad Dict Str Str Num Num Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Dict Str Num Expr Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr IfExp NameLoad Num Num Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Num Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Str Str Str Str Num Num Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Str Str Str Str Num Num Num Num Num Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Num Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Delete AttributeDel AttributeLoad NameLoad attr attr With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A mock oslo_config cfg oslo_utils uuidutils neutron.services.metering.agents metering_agent neutron.tests base neutron.tests fake_notifier N/A _uuid N/A uuidutils generate_uuid N/A TENANT_ID N/A _uuid N/A LABEL_ID N/A _uuid N/A ROUTERS N/A N/A status name gw_port_id admin_state_up tenant_id _metering_labels id ACTIVE router1 None True TENANT_ID N/A N/A rules id N/A LABEL_ID N/A _uuid N/A ROUTERS_WITH_RULE N/A N/A status name gw_port_id admin_state_up tenant_id _metering_labels id ACTIVE router1 None True TENANT_ID N/A N/A rule id N/A LABEL_ID N/A _uuid TestMeteringOperations N/A N/A base BaseTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestMeteringOperations self setUp N/A N/A N/A N/A cfg CONF register_opts N/A N/A metering_agent MeteringAgent Opts N/A N/A self noop_driver neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver N/A N/A N/A N/A cfg CONF set_override driver N/A self noop_driver N/A N/A N/A N/A cfg CONF set_override measure_interval 0 N/A N/A N/A N/A cfg CONF set_override report_interval 0 N/A N/A N/A self setup_notification_driver N/A metering_rpc neutron.services.metering.agents.metering_agent.MeteringPluginRpc._get_sync_data_metering N/A N/A self metering_rpc_patch N/A N/A mock patch metering_rpc return_value N/A N/A N/A N/A N/A self metering_rpc_patch start N/A N/A self driver_patch N/A N/A mock patch N/A self noop_driver spec True N/A N/A N/A N/A self driver_patch start N/A loopingcall_patch N/A N/A mock patch oslo_service.loopingcall.FixedIntervalLoopingCall N/A N/A N/A loopingcall_patch start N/A N/A self agent N/A N/A metering_agent MeteringAgent my agent N/A cfg CONF N/A N/A self driver N/A N/A self agent metering_driver N/A test_add_metering_label N/A N/A self N/A N/A N/A N/A N/A N/A self agent add_metering_label None ROUTERS N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver add_metering_label call_count N/A test_remove_metering_label N/A N/A self N/A N/A N/A N/A N/A N/A self agent remove_metering_label None ROUTERS N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver remove_metering_label call_count N/A test_update_metering_label_rule N/A N/A self N/A N/A N/A N/A N/A N/A self agent update_metering_label_rules None ROUTERS N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver update_metering_label_rules call_count N/A test_add_metering_label_rule N/A N/A self N/A N/A N/A N/A N/A N/A self agent add_metering_label_rule None ROUTERS_WITH_RULE N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver add_metering_label_rule call_count N/A test_remove_metering_label_rule N/A N/A self N/A N/A N/A N/A N/A N/A self agent remove_metering_label_rule None ROUTERS_WITH_RULE N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver remove_metering_label_rule call_count N/A test_routers_updated N/A N/A self N/A N/A N/A N/A N/A N/A self agent routers_updated None ROUTERS N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver update_routers call_count N/A test_get_traffic_counters N/A N/A self N/A N/A N/A N/A N/A N/A self agent _get_traffic_counters None ROUTERS N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver get_traffic_counters call_count N/A test_notification_report N/A N/A self N/A N/A N/A N/A N/A N/A self agent routers_updated None ROUTERS N/A N/A N/A N/A self driver get_traffic_counters return_value N/A LABEL_ID N/A pkts bytes 88 444 N/A N/A N/A N/A self agent _metering_loop N/A N/A N/A self assertNotEqual N/A len N/A fake_notifier NOTIFICATIONS 0 N/A n N/A fake_notifier NOTIFICATIONS N/A N/A N/A N/A n N/A event_type l3.meter N/A N/A N/A N/A N/A self assertEqual l3.meter N/A n N/A event_type N/A payload N/A n N/A payload N/A N/A N/A self assertEqual TENANT_ID N/A payload N/A tenant_id N/A N/A N/A self assertEqual LABEL_ID N/A payload N/A label_id N/A N/A N/A self assertEqual 88 N/A payload N/A pkts N/A N/A N/A self assertEqual 444 N/A payload N/A bytes N/A test_router_deleted N/A N/A self N/A N/A N/A label_id N/A _uuid N/A N/A N/A self driver get_traffic_counters N/A N/A mock MagicMock N/A N/A N/A N/A self driver get_traffic_counters return_value N/A label_id N/A pkts bytes 44 222 N/A N/A N/A self agent _add_metering_info N/A N/A mock MagicMock N/A N/A N/A N/A self agent routers_updated None ROUTERS N/A N/A N/A N/A self agent router_deleted None N/A N/A ROUTERS N/A 0 N/A id N/A N/A N/A self assertEqual 1 N/A N/A N/A self agent _add_metering_info call_count N/A N/A N/A self assertEqual 1 N/A N/A N/A self driver remove_router call_count N/A N/A N/A N/A N/A self agent _add_metering_info assert_called_with label_id 44 222 N/A _test_purge_metering_info N/A N/A self current_timestamp is_empty mock_time N/A N/A N/A N/A mock_time return_value current_timestamp N/A N/A N/A self agent metering_infos N/A fake N/A last_update 1 N/A N/A N/A self config report_interval 1 N/A N/A N/A N/A self agent _purge_metering_info N/A N/A N/A self assertEqual N/A is_empty 0 1 N/A len N/A N/A self agent metering_infos N/A N/A N/A self assertEqual 1 N/A mock_time call_count N/A N/A N/A mock patch time.time test_purge_metering_info N/A N/A self N/A N/A N/A N/A N/A self _test_purge_metering_info 2 False N/A test_purge_metering_info_delete N/A N/A self N/A N/A N/A N/A N/A self _test_purge_metering_info 3 True N/A _test_add_metering_info N/A N/A self expected_info current_timestamp mock_time N/A N/A N/A N/A mock_time return_value current_timestamp N/A actual_info N/A N/A N/A self agent _add_metering_info fake_label_id 1 1 N/A N/A N/A self assertEqual 1 N/A len N/A N/A self agent metering_infos N/A N/A N/A self assertEqual expected_info actual_info N/A N/A N/A self assertEqual expected_info N/A N/A N/A self agent metering_infos N/A fake_label_id N/A N/A N/A self assertEqual 1 N/A mock_time call_count N/A N/A N/A mock patch time.time test_add_metering_info_create N/A N/A self N/A N/A N/A expected_info N/A bytes pkts time first_update last_update 1 1 0 1 1 N/A N/A N/A self _test_add_metering_info expected_info 1 N/A test_add_metering_info_update N/A N/A self N/A N/A N/A expected_info N/A bytes pkts time first_update last_update 1 1 0 1 1 N/A N/A N/A self agent metering_infos N/A fake_label_id expected_info N/A N/A N/A expected_info update N/A bytes pkts time last_update 2 2 1 2 N/A N/A N/A self _test_add_metering_info expected_info 2 N/A N/A TestMeteringDriver N/A N/A base BaseTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestMeteringDriver self setUp N/A N/A N/A N/A cfg CONF register_opts N/A N/A metering_agent MeteringAgent Opts N/A N/A self noop_driver neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver N/A N/A N/A N/A cfg CONF set_override driver N/A self noop_driver N/A N/A self agent N/A N/A metering_agent MeteringAgent my agent N/A cfg CONF N/A N/A self driver N/A N/A mock Mock N/A N/A N/A self agent metering_driver N/A self driver N/A test_add_metering_label_with_bad_driver_impl N/A N/A self N/A N/A N/A N/A N/A self driver add_metering_label N/A N/A N/A N/A mock patch object metering_agent LOG log N/A N/A N/A N/A N/A self agent add_metering_label None ROUTERS N/A N/A N/A N/A log exception assert_called_with N/A mock ANY N/A driver func N/A self noop_driver add_metering_label N/A test_add_metering_label_runtime_error N/A N/A self N/A N/A N/A N/A N/A N/A self driver add_metering_label side_effect RuntimeError N/A N/A N/A N/A mock patch object metering_agent LOG log N/A N/A N/A N/A N/A self agent add_metering_label None ROUTERS N/A N/A N/A N/A log exception assert_called_with N/A mock ANY N/A driver func N/A self noop_driver add_metering_label N/A test_init_chain N/A N/A self N/A N/A N/A N/A N/A mock patch oslo_service.periodic_task.PeriodicTasks.__init__ init N/A N/A N/A N/A metering_agent MeteringAgent my agent N/A cfg CONF N/A N/A N/A init assert_called_once_with N/A cfg CONF N/A N/A