Module Import alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Import alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num NameLoad NameLoad NameLoad NameLoad Str Str Num Num Num NameLoad NameLoad NameLoad Num NameLoad NameLoad Dict Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Call NameLoad NameLoad BinOpMod Str NameLoad keyword Str keyword NameLoad keyword Str keyword Str keyword SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Return ListComp Call NameLoad NameLoad NameLoad NameLoad IfExp NameLoad NameLoad BinOpMod Str BinOpDiv NameLoad NameLoad comprehension NameStore Call NameLoad BinOpMult NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr 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 decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Expr Call AttributeLoad NameLoad attr BinOpMult BinOpMult NameLoad BinOpAdd NameLoad NameLoad NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Expr Call AttributeLoad NameLoad attr BinOpMult BinOpMult NameLoad NameLoad NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Expr Call AttributeLoad NameLoad attr BinOpMult BinOpMult NameLoad NameLoad NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr 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 NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str For NameStore Call NameLoad NameLoad body 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 NameLoad attr For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore ListComp Call NameLoad NameLoad BinOpMod Str NameLoad comprehension NameStore Call NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Expr Call AttributeLoad NameLoad attr 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 SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore Dict BinOpAdd AttributeLoad NameLoad attr Str ListLoad ListLoad Str ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryFinally body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str finalbody Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Str Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad BinOpAdd NameLoad Call AttributeLoad NameLoad attr Num attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad BinOpSub NameLoad Call AttributeLoad NameLoad attr Num attr decorator_list decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad keyword Num keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict decorator_list Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad decorator_list
N/A N/A datetime N/A mock oslo_policy policy oslo_policy oslo_utils timeutils six.moves range N/A webob nova.api.openstack.compute.legacy_v2.contrib simple_tenant_usage simple_tenant_usage_v2 nova.api.openstack.compute simple_tenant_usage simple_tenant_usage_v21 nova.compute vm_states nova context nova db nova exception nova objects nova policy nova test nova.tests.unit.api.openstack fakes nova.tests.unit fake_flavor nova.tests uuidsentinel uuids N/A SERVERS 5 N/A TENANTS 2 N/A HOURS 24 N/A ROOT_GB 10 N/A EPHEMERAL_GB 20 N/A MEMORY_MB 1024 N/A VCPUS 2 N/A NOW N/A N/A timeutils utcnow N/A START N/A NOW N/A N/A datetime timedelta hours HOURS N/A STOP NOW N/A FAKE_INST_TYPE N/A id vcpus root_gb ephemeral_gb memory_mb name flavorid rxtx_factor vcpu_weight swap created_at updated_at deleted_at deleted disabled is_public extra_specs 1 VCPUS ROOT_GB EPHEMERAL_GB MEMORY_MB fakeflavor foo 1.0 1 0 None None None 0 False True N/A foo bar get_fake_db_instance N/A N/A start end instance_id tenant_id vm_state N/A N/A vm_states ACTIVE N/A N/A inst N/A N/A fakes stub_instance id instance_id uuid N/A getattr uuids N/A instance_%d instance_id image_ref 1 project_id tenant_id user_id fakeuser display_name name flavor_id N/A FAKE_INST_TYPE N/A id launched_at start terminated_at end vm_state vm_state memory_mb MEMORY_MB vcpus VCPUS root_gb ROOT_GB ephemeral_gb EPHEMERAL_GB N/A inst N/A fake_instance_get_active_by_window_joined N/A N/A context begin end project_id host columns_to_join N/A N/A N/A N/A N/A get_fake_db_instance START STOP x N/A project_id project_id N/A faketenant_%s N/A x SERVERS N/A x N/A range N/A TENANTS SERVERS N/A SimpleTenantUsageTestV21 N/A N/A test TestCase N/A N/A policy_rule_prefix os_compute_api:os-simple-tenant-usage N/A controller N/A N/A simple_tenant_usage_v21 SimpleTenantUsageController setUp N/A N/A self N/A N/A N/A N/A N/A N/A super SimpleTenantUsageTestV21 self setUp 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 _test_verify_index N/A N/A self start stop N/A N/A N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?start=%s&end=%s N/A N/A N/A start isoformat N/A N/A stop isoformat N/A N/A N/A req environ N/A nova.context N/A self admin_context N/A res_dict N/A N/A N/A self controller index req N/A usages N/A res_dict N/A tenant_usages N/A i N/A range TENANTS N/A N/A N/A N/A self assertEqual N/A SERVERS HOURS N/A int N/A N/A usages N/A i N/A total_hours N/A N/A N/A self assertEqual N/A N/A SERVERS N/A ROOT_GB EPHEMERAL_GB HOURS N/A int N/A N/A usages N/A i N/A total_local_gb_usage N/A N/A N/A self assertEqual N/A N/A SERVERS MEMORY_MB HOURS N/A int N/A N/A usages N/A i N/A total_memory_mb_usage N/A N/A N/A self assertEqual N/A N/A SERVERS VCPUS HOURS N/A int N/A N/A usages N/A i N/A total_vcpus_usage 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_index N/A N/A self N/A N/A N/A N/A N/A self _test_verify_index START STOP N/A test_verify_index_future_end_time N/A N/A self N/A N/A N/A future N/A NOW N/A N/A datetime timedelta hours HOURS N/A N/A N/A self _test_verify_index START future N/A test_verify_show N/A N/A self N/A N/A N/A N/A N/A self _test_verify_show START STOP N/A test_verify_show_future_end_time N/A N/A self N/A N/A N/A future N/A NOW N/A N/A datetime timedelta hours HOURS N/A N/A N/A self _test_verify_show START future N/A _get_tenant_usages N/A N/A self detailed N/A N/A N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?detailed=%s&start=%s&end=%s N/A detailed N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A N/A req environ N/A nova.context N/A self admin_context N/A orig_get_active_by_window_joined N/A N/A objects InstanceList get_active_by_window_joined fake_get_active_by_window_joined N/A N/A context begin end project_id host expected_attrs use_slave N/A None None None None False N/A N/A N/A N/A self assertEqual N/A flavor expected_attrs N/A N/A orig_get_active_by_window_joined context begin end project_id host expected_attrs use_slave N/A N/A N/A N/A N/A mock patch object N/A objects InstanceList get_active_by_window_joined side_effect fake_get_active_by_window_joined N/A N/A res_dict N/A N/A N/A self controller index req N/A N/A res_dict N/A tenant_usages N/A test_verify_detailed_index N/A N/A self N/A N/A N/A usages N/A N/A self _get_tenant_usages 1 N/A i N/A range TENANTS N/A N/A servers N/A N/A usages N/A i N/A server_usages N/A j N/A range SERVERS N/A N/A N/A N/A self assertEqual HOURS N/A int N/A N/A servers N/A j N/A hours N/A test_verify_simple_index N/A N/A self N/A N/A N/A usages N/A N/A self _get_tenant_usages detailed 0 N/A i N/A range TENANTS N/A N/A N/A N/A self assertIsNone N/A N/A N/A usages N/A i get server_usages N/A test_verify_simple_index_empty_param N/A N/A self N/A N/A N/A usages N/A N/A self _get_tenant_usages N/A i N/A range TENANTS N/A N/A N/A N/A self assertIsNone N/A N/A N/A usages N/A i get server_usages N/A _test_verify_show N/A N/A self start stop N/A N/A N/A tenant_id 1 N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?start=%s&end=%s N/A N/A N/A start isoformat N/A N/A stop isoformat N/A N/A N/A req environ N/A nova.context N/A self user_context N/A res_dict N/A N/A N/A self controller show req tenant_id 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 TENANTS SERVERS N/A len N/A usage N/A server_usages N/A server_uuids N/A N/A getattr uuids N/A instance_%d x N/A x N/A range SERVERS N/A j N/A range SERVERS N/A N/A delta N/A STOP START N/A uptime N/A int N/A N/A delta total_seconds N/A N/A N/A self assertEqual uptime N/A int N/A N/A servers N/A j N/A uptime N/A N/A N/A self assertEqual HOURS N/A int N/A N/A servers N/A j N/A hours N/A N/A N/A self assertIn N/A N/A servers N/A j N/A instance_id server_uuids N/A test_verify_show_cannot_view_other_tenant N/A N/A self N/A N/A N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?start=%s&end=%s N/A N/A N/A START isoformat N/A N/A STOP isoformat N/A N/A N/A req environ N/A nova.context N/A self alt_user_context N/A rules N/A N/A N/A self policy_rule_prefix :show N/A N/A role:admin N/A project_id:%(project_id)s N/A N/A N/A policy set_rules N/A N/A N/A oslo_policy Rules from_dict rules N/A N/A N/A N/A N/A self assertRaises N/A exception PolicyNotAuthorized N/A N/A self controller show req faketenant_0 N/A N/A N/A N/A policy reset N/A test_get_tenants_usage_with_bad_start_date N/A N/A self N/A N/A N/A future N/A NOW N/A N/A datetime timedelta hours HOURS N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?start=%s&end=%s N/A N/A N/A future isoformat N/A N/A NOW isoformat N/A N/A N/A req environ N/A nova.context N/A self user_context N/A N/A N/A self assertRaises N/A N/A webob exc HTTPBadRequest N/A N/A self controller show req faketenant_0 N/A test_get_tenants_usage_with_invalid_start_date N/A N/A self N/A N/A N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?start=%s&end=%s N/A xxxx N/A N/A NOW isoformat N/A N/A N/A req environ N/A nova.context N/A self user_context N/A N/A N/A self assertRaises N/A N/A webob exc HTTPBadRequest N/A N/A self controller show req faketenant_0 N/A _test_get_tenants_usage_with_one_date N/A N/A self date_url_param N/A N/A N/A req N/A N/A N/A fakes HTTPRequest blank N/A ?%s date_url_param N/A N/A N/A req environ N/A nova.context N/A self user_context N/A res N/A N/A N/A self controller show req faketenant_0 N/A N/A N/A self assertIn tenant_usage res N/A test_get_tenants_usage_with_no_start_date N/A N/A self N/A N/A N/A N/A N/A self _test_get_tenants_usage_with_one_date N/A end=%s N/A N/A N/A NOW N/A N/A datetime timedelta 5 isoformat N/A test_get_tenants_usage_with_no_end_date N/A N/A self N/A N/A N/A N/A N/A self _test_get_tenants_usage_with_one_date N/A start=%s N/A N/A N/A NOW N/A N/A datetime timedelta 5 isoformat N/A N/A N/A N/A N/A mock patch object db instance_get_active_by_window_joined fake_instance_get_active_by_window_joined SimpleTenantUsageTestV2 N/A SimpleTenantUsageTestV21 N/A N/A policy_rule_prefix compute_extension:simple_tenant_usage N/A controller N/A N/A simple_tenant_usage_v2 SimpleTenantUsageController N/A SimpleTenantUsageControllerTestV21 N/A N/A test TestCase N/A N/A controller N/A N/A simple_tenant_usage_v21 SimpleTenantUsageController setUp N/A N/A self N/A N/A N/A N/A N/A N/A super SimpleTenantUsageControllerTestV21 self setUp N/A N/A self context N/A N/A context RequestContext fakeuser fake-project N/A N/A self baseinst N/A get_fake_db_instance START STOP instance_id 1 tenant_id N/A N/A self context project_id vm_state N/A vm_states DELETED N/A flavor N/A N/A fake_flavor fake_flavor_obj N/A self context FAKE_INST_TYPE N/A N/A self inst_obj N/A N/A N/A objects Instance _from_db_object N/A self context N/A N/A objects Instance N/A self baseinst N/A N/A N/A self inst_obj flavor flavor N/A test_get_flavor_from_non_deleted_with_id_fails N/A N/A self fake_get_flavor N/A N/A N/A N/A N/A self assertRaises N/A exception NotFound N/A N/A self controller _get_flavor N/A self context N/A self inst_obj N/A N/A N/A N/A mock patch nova.objects.Instance.get_flavor side_effect N/A N/A exception NotFound test_get_flavor_from_deleted_with_notfound N/A N/A self fake_get_flavor N/A N/A N/A N/A N/A self inst_obj deleted 1 N/A flavor N/A N/A N/A self controller _get_flavor N/A self context N/A self inst_obj N/A N/A N/A N/A self assertEqual N/A objects Flavor N/A type flavor N/A N/A N/A self assertEqual N/A FAKE_INST_TYPE N/A id N/A flavor id N/A N/A N/A mock patch nova.objects.Instance.get_flavor side_effect N/A N/A exception NotFound test_get_flavor_from_deleted_with_id_of_deleted N/A N/A self fake_get_flavor N/A N/A N/A N/A N/A self inst_obj deleted 1 N/A N/A N/A self inst_obj instance_type_id 99 N/A flavor N/A N/A N/A self controller _get_flavor N/A self context N/A self inst_obj N/A N/A N/A N/A self assertIsNone flavor N/A N/A N/A mock patch nova.objects.Instance.get_flavor side_effect N/A N/A exception NotFound N/A SimpleTenantUsageControllerTestV2 N/A SimpleTenantUsageControllerTestV21 N/A N/A controller N/A N/A simple_tenant_usage_v2 SimpleTenantUsageController N/A SimpleTenantUsageUtilsV21 N/A N/A test NoDBTestCase N/A N/A simple_tenant_usage simple_tenant_usage_v21 test_valid_string N/A N/A self N/A N/A N/A dt N/A N/A N/A self simple_tenant_usage parse_strtime 2014-02-21T13:47:20.824060 %Y-%m-%dT%H:%M:%S.%f N/A N/A N/A self assertEqual N/A N/A datetime datetime microsecond 824060 second 20 minute 47 hour 13 day 21 month 2 year 2014 dt N/A test_invalid_string N/A N/A self N/A N/A N/A N/A N/A self assertRaises N/A exception InvalidStrTime N/A N/A self simple_tenant_usage parse_strtime 2014-02-21 13:47:20.824060 %Y-%m-%dT%H:%M:%S.%f N/A N/A SimpleTenantUsageUtilsV2 N/A SimpleTenantUsageUtilsV21 N/A N/A simple_tenant_usage simple_tenant_usage_v2 N/A