Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Continue Assign NameStore NameLoad If CompareEq NameLoad Str body Assign NameStore Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Call NameLoad NameLoad NameLoad BinOpMod Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num Num Num Num body Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad Num AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword Num Return TupleLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Num Num Num Num keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Num Num Num Num keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword ListLoad Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Num Num Num Num keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad keyword ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword Num keyword Num Assign AttributeStore NameLoad attr ListLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str Num Num Num Num keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str Num Num Num Num keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body Pass decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body Pass decorator_list
N/A N/A datetime N/A iso8601 N/A mock oslo_utils timeutils nova context nova db nova.objects bandwidth_usage nova test nova.tests.unit.objects test_objects nova.tests uuidsentinel uuids _TestBandwidthUsage N/A N/A test TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super _TestBandwidthUsage self setUp N/A N/A self user_id fake_user N/A N/A self project_id fake_project N/A N/A self context N/A N/A context RequestContext N/A self user_id N/A self project_id N/A N/A now start_period N/A N/A self _time_now_and_start_period N/A N/A self expected_bw_usage N/A N/A self _fake_bw_usage time now start_period start_period N/A _compare N/A N/A test db obj ignored_fields N/A None N/A N/A N/A ignored_fields None N/A N/A ignored_fields N/A N/A N/A field value N/A N/A db items N/A N/A N/A field ignored_fields N/A N/A N/A obj_field field N/A N/A obj_field uuid N/A N/A obj_field instance_uuid N/A N/A N/A test assertEqual N/A db N/A field N/A getattr obj obj_field N/A Field %s is not equal field N/A staticmethod _fake_bw_usage N/A N/A time start_period bw_in bw_out last_ctr_in last_ctr_out N/A None None 100 200 12345 67890 N/A N/A fake_bw_usage N/A created_at updated_at deleted_at deleted uuid mac start_period bw_in bw_out last_ctr_in last_ctr_out last_refreshed None None None 0 N/A uuids instance fake_mac1 start_period bw_in bw_out last_ctr_in last_ctr_out time N/A fake_bw_usage N/A staticmethod _time_now_and_start_period N/A N/A N/A N/A N/A now N/A N/A N/A N/A timeutils utcnow replace tzinfo N/A N/A N/A iso8601 iso8601 Utc microsecond 0 N/A start_period N/A now N/A N/A datetime timedelta seconds 10 N/A N/A now start_period N/A staticmethod test_get_by_instance_uuid_and_mac N/A N/A self mock_get N/A N/A N/A N/A mock_get return_value N/A self expected_bw_usage N/A bw_usage N/A N/A N/A bandwidth_usage BandwidthUsage get_by_instance_uuid_and_mac N/A self context N/A uuids instance fake_mac start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self _compare self N/A self expected_bw_usage bw_usage N/A N/A N/A N/A mock patch object db bw_usage_get test_get_by_uuids N/A N/A self mock_get_by_uuids N/A N/A N/A N/A mock_get_by_uuids return_value N/A N/A self expected_bw_usage N/A bw_usages N/A N/A N/A bandwidth_usage BandwidthUsageList get_by_uuids N/A self context N/A N/A uuids instance start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self assertEqual 1 N/A len bw_usages N/A N/A N/A self _compare self N/A self expected_bw_usage N/A bw_usages N/A 0 N/A N/A N/A N/A mock patch object db bw_usage_get_by_uuids test_create N/A N/A self mock_create N/A N/A N/A N/A mock_create return_value N/A self expected_bw_usage N/A bw_usage N/A N/A bandwidth_usage BandwidthUsage context N/A self context N/A N/A N/A bw_usage create N/A uuids instance fake_mac 100 200 12345 67890 start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self _compare self N/A self expected_bw_usage bw_usage N/A N/A N/A N/A mock patch object db bw_usage_update test_update_with_db N/A N/A self N/A N/A N/A expected_bw_usage1 N/A N/A self _fake_bw_usage time N/A N/A self expected_bw_usage N/A last_refreshed start_period N/A N/A self expected_bw_usage N/A start_period last_ctr_in 42 last_ctr_out 42 N/A bw_usage N/A N/A bandwidth_usage BandwidthUsage context N/A self context N/A N/A N/A bw_usage create N/A uuids instance fake_mac1 100 200 42 42 start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self _compare self expected_bw_usage1 bw_usage ignored_fields N/A last_refreshed created_at N/A N/A N/A bw_usage create N/A uuids instance fake_mac1 100 200 12345 67890 start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self _compare self N/A self expected_bw_usage bw_usage ignored_fields N/A last_refreshed created_at updated_at N/A test_update N/A N/A self mock_update N/A N/A N/A expected_bw_usage1 N/A N/A self _fake_bw_usage time N/A N/A self expected_bw_usage N/A last_refreshed start_period N/A N/A self expected_bw_usage N/A start_period last_ctr_in 42 last_ctr_out 42 N/A N/A mock_update side_effect N/A expected_bw_usage1 N/A self expected_bw_usage N/A bw_usage N/A N/A bandwidth_usage BandwidthUsage context N/A self context N/A N/A N/A bw_usage create fake_uuid1 fake_mac1 100 200 42 42 start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self _compare self expected_bw_usage1 bw_usage N/A N/A N/A bw_usage create fake_uuid1 fake_mac1 100 200 12345 67890 start_period N/A N/A self expected_bw_usage N/A start_period N/A N/A N/A self _compare self N/A self expected_bw_usage bw_usage N/A N/A N/A N/A mock patch object db bw_usage_update N/A TestBandwidthUsageObject N/A N/A test_objects _LocalTest _TestBandwidthUsage N/A N/A N/A TestRemoteBandwidthUsageObject N/A N/A test_objects _RemoteTest _TestBandwidthUsage N/A N/A N/A