Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Return Dict Str Str Str Str Str Num NameLoad NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Dict Str Str Str Str Str Str Str Str Str NameLoad Str NameLoad Str Str Str Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Return ListComp Call NameLoad NameLoad NameLoad NameLoad BinOpMod Str BinOpDiv NameLoad NameLoad comprehension NameStore Call NameLoad BinOpMult NameLoad NameLoad 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 NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str ImportFrom alias identifier Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str BinOpMult NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str BinOpMult BinOpMult NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str BinOpMult BinOpMult NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str BinOpMult BinOpMult NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str NameLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A N/A datetime N/A json N/A webob nova context nova flags nova test nova.compute api nova.tests.api.openstack fakes N/A FLAGS N/A flags FLAGS N/A SERVERS 5 N/A TENANTS 2 N/A HOURS 24 N/A LOCAL_GB 10 N/A MEMORY_MB 1024 N/A VCPUS 2 N/A STOP N/A N/A N/A datetime datetime utcnow N/A START N/A STOP N/A N/A datetime timedelta hours HOURS fake_instance_type_get N/A N/A self context instance_type_id N/A N/A N/A N/A id vcpus local_gb memory_mb name 1 VCPUS LOCAL_GB MEMORY_MB fakeflavor N/A get_fake_db_instance N/A N/A start end instance_id tenant_id N/A N/A N/A N/A id image_ref project_id user_id display_name state_description instance_type_id launched_at terminated_at instance_id 1 tenant_id fakeuser name state 1 start end N/A fake_instance_get_active_by_window N/A N/A self context begin end project_id N/A N/A N/A N/A N/A get_fake_db_instance START STOP x N/A faketenant_%s N/A x SERVERS N/A x N/A xrange N/A TENANTS SERVERS N/A SimpleTenantUsageTest 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 SimpleTenantUsageTest self setUp N/A N/A N/A N/A self stubs Set N/A api API get_instance_type fake_instance_type_get N/A N/A N/A N/A self stubs Set N/A api API get_active_by_window fake_instance_get_active_by_window N/A N/A self admin_context N/A N/A context RequestContext fakeadmin_0 faketenant_0 is_admin True N/A N/A self user_context N/A N/A context RequestContext fakeadmin_0 faketenant_0 is_admin False N/A N/A self alt_user_context N/A N/A context RequestContext fakeadmin_0 faketenant_1 is_admin False N/A N/A FLAGS allow_admin_api True N/A test_verify_index N/A N/A self N/A N/A N/A req N/A N/A N/A webob Request blank N/A /v1.1/123/os-simple-tenant-usage?start=%s&end=%s N/A N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A req method GET N/A N/A N/A req headers N/A content-type application/json N/A res N/A N/A req get_response N/A N/A fakes wsgi_app fake_auth_context N/A self admin_context N/A N/A N/A self assertEqual N/A res status_int 200 N/A res_dict N/A N/A json loads N/A res body N/A usages N/A res_dict N/A tenant_usages nova log logging N/A N/A N/A logging warn usages N/A i N/A xrange TENANTS N/A N/A N/A N/A self assertEqual N/A int N/A N/A usages N/A i N/A total_hours N/A SERVERS HOURS N/A N/A N/A self assertEqual N/A int N/A N/A usages N/A i N/A total_local_gb_usage N/A N/A SERVERS LOCAL_GB HOURS N/A N/A N/A self assertEqual N/A int N/A N/A usages N/A i N/A total_memory_mb_usage N/A N/A SERVERS MEMORY_MB HOURS N/A N/A N/A self assertEqual N/A int N/A N/A usages N/A i N/A total_vcpus_usage N/A N/A SERVERS VCPUS HOURS N/A N/A N/A self assertFalse N/A N/A N/A usages N/A i get server_usages N/A test_verify_detailed_index N/A N/A self N/A N/A N/A req N/A N/A N/A webob Request blank N/A /v1.1/123/os-simple-tenant-usage?detailed=1&start=%s&end=%s N/A N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A req method GET N/A N/A N/A req headers N/A content-type application/json N/A res N/A N/A req get_response N/A N/A fakes wsgi_app fake_auth_context N/A self admin_context N/A N/A N/A self assertEqual N/A res status_int 200 N/A res_dict N/A N/A json loads N/A res body N/A usages N/A res_dict N/A tenant_usages N/A i N/A xrange TENANTS N/A N/A servers N/A N/A usages N/A i N/A server_usages N/A j N/A xrange SERVERS N/A N/A N/A N/A self assertEqual N/A int N/A N/A servers N/A j N/A hours HOURS N/A test_verify_index_fails_for_nonadmin N/A N/A self N/A N/A N/A req N/A N/A N/A webob Request blank N/A /v1.1/123/os-simple-tenant-usage?detailed=1&start=%s&end=%s N/A N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A req method GET N/A N/A N/A req headers N/A content-type application/json N/A res N/A N/A req get_response N/A N/A fakes wsgi_app N/A N/A N/A self assertEqual N/A res status_int 403 N/A test_verify_show N/A N/A self N/A N/A N/A req N/A N/A N/A webob Request blank N/A /v1.1/faketenant_0/os-simple-tenant-usage/faketenant_0?start=%s&end=%s N/A N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A req method GET N/A N/A N/A req headers N/A content-type application/json N/A res N/A N/A req get_response N/A N/A fakes wsgi_app fake_auth_context N/A self user_context N/A N/A N/A self assertEqual N/A res status_int 200 N/A res_dict N/A N/A json loads N/A res body N/A usage N/A res_dict N/A tenant_usage N/A servers N/A usage N/A server_usages N/A N/A N/A self assertEqual N/A len N/A usage N/A server_usages SERVERS N/A j N/A xrange SERVERS N/A N/A N/A N/A self assertEqual N/A int N/A N/A servers N/A j N/A hours HOURS N/A test_verify_show_cant_view_other_tenant N/A N/A self N/A N/A N/A req N/A N/A N/A webob Request blank N/A /v1.1/faketenant_1/os-simple-tenant-usage/faketenant_0?start=%s&end=%s N/A N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A req method GET N/A N/A N/A req headers N/A content-type application/json N/A res N/A N/A req get_response N/A N/A fakes wsgi_app fake_auth_context N/A self alt_user_context N/A N/A N/A self assertEqual N/A res status_int 403 N/A N/A