OpenStack Study: nova
OpenStack IndexPreviousNext
def test_update_item_empty_body(self):
def test_update_item_empty_key(self):
def test_update_item_key_too_long(self):
def test_update_item_value_too_long(self):
def test_update_item_too_many_keys(self):
def test_update_item_body_uri_mismatch(self):
def test_too_many_metadata_items_on_create(self):
def test_invalid_metadata_items_on_create(self):
def test_too_many_metadata_items_on_update_item(self):
def test_invalid_metadata_items_on_update_item(self):
class BadStateServerMetaDataTest(BaseTest):
def setUp(self):
def test_invalid_state_on_delete(self):
def test_invalid_state_on_update_metadata(self):
def _return_server_in_build(self, context, server_id, columns_to_join=None):
def _return_server_in_build_by_uuid(self, context, server_uuid, columns_to_join=None, use_slave=False):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_urlmap.py
class UrlmapTest(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_path_version_v1_1(self):
def test_content_type_version_v1_1(self):
def test_accept_version_v1_1(self):
def test_path_version_v2(self):
def test_content_type_version_v2(self):
def test_accept_version_v2(self):
def test_path_content_type(self):
def test_accept_content_type(self):
def test_path_version_v3(self):
def test_content_type_version_v3(self):
def test_accept_version_v3(self):
def test_path_content_type_v3(self):
def test_accept_content_type_v3(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_v3_auth.py
class TestNoAuthMiddlewareV3(test.NoDBTestCase):
def setUp(self):
def test_authorize_user(self):
def test_authorize_user_trailing_slash(self):
def test_auth_token_no_empty_headers(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_v3_extensions.py
class fake_bad_extension(object):
class fake_stevedore_enabled_extensions(object):
def __init__(self, namespace, check_func, invoke_on_load=False, invoke_args=(), invoke_kwds={}):
def map(self, func, *args, **kwds):
def __iter__(self):
class fake_loaded_extension_info(object):
def __init__(self):
def register_extension(self, ext):
def get_extensions(self):
class ExtensionLoadingTestCase(test.NoDBTestCase):
def _set_v3_core(self, core_extensions):
def test_extensions_loaded(self):
def test_check_bad_extension(self):
def test_extensions_blacklist(self):
def test_extensions_whitelist_accept(self):
def test_extensions_whitelist_block(self):
def test_blacklist_overrides_whitelist(self):
def test_get_missing_core_extensions(self):
def test_core_extensions_present(self):
def test_core_extensions_missing(self):
def test_extensions_expected_error(self):
def fake_func():
def test_extensions_expected_error_from_list(self):
def fake_func():
def test_extensions_unexpected_error(self):
def fake_func():
def test_extensions_unexpected_error_from_list(self):
def fake_func():
def test_extensions_unexpected_policy_not_authorized_error(self):
def fake_func():
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_versions.py
class VersionsTest(test.NoDBTestCase):
def test_get_version_list(self):
def test_get_version_list_302(self):
def test_get_version_2_detail(self):
def test_get_version_2_detail_content_type(self):
def test_get_version_2_detail_xml(self):
def test_get_version_list_xml(self):
def test_get_version_2_detail_atom(self):
def test_get_version_list_atom(self):
def test_multi_choice_image(self):
def test_multi_choice_image_xml(self):
def test_multi_choice_server_atom(self):
def test_multi_choice_server(self):
class VersionsViewBuilderTests(test.NoDBTestCase):
def test_view_builder(self):
def test_generate_href(self):
def test_generate_href_v3(self):
def test_generate_href_unknown(self):
class VersionsSerializerTests(test.NoDBTestCase):
def test_versions_list_xml_serializer(self):
def test_versions_multi_xml_serializer(self):
def test_versions_list_atom_serializer(self):
def test_version_detail_atom_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\__init__.py
\OpenStack\nova-2014.1\nova\tests\api\openstack\fakes.py
class Context(object):
class FakeRouter(wsgi.Router):
def __init__(self, ext_mgr=None):
def __call__(self, req):
def fake_wsgi(self, req):
def wsgi_app(inner_app_v2=None, fake_auth_context=None, use_no_auth=False, ext_mgr=None, init_only=None):
def wsgi_app_v3(inner_app_v3=None, fake_auth_context=None, use_no_auth=False, ext_mgr=None, init_only=None):
def stub_out_key_pair_funcs(stubs, have_key_pair=True):
def key_pair(context, user_id):
def one_key_pair(context, user_id, name):
def no_key_pair(context, user_id):
def stub_out_rate_limiting(stubs):
def fake_rate_init(self, app):
def stub_out_instance_quota(stubs, allowed, quota, resource='instances'):
def fake_reserve(context, **deltas):
def stub_out_networking(stubs):
def get_my_ip():
def stub_out_compute_api_snapshot(stubs):
def snapshot(self, context, instance, name, extra_properties=None):
class stub_out_compute_api_backup(object):
def __init__(self, stubs):
def backup(self, context, instance, name, backup_type, rotation, extra_properties=None):
def stub_out_nw_api_get_instance_nw_info(stubs, num_networks=1, func=None):
def stub_out_nw_api_get_floating_ips_by_fixed_address(stubs, func=None):
def get_floating_ips_by_fixed_address(self, context, fixed_ip):
def get_instance_nw_info(*args, **kwargs):
def get_floating_ips_by_fixed_address(*args, **kwargs):
def validate_networks(self, context, networks, max_count):
def add_fixture(**kwargs):
def stub_out_glanceclient_create(stubs, sent_to_glance):
def fake_create(context, metadata, data=None):
def stub_out_glance(stubs):
def fake_get_remote_image_service():
class FakeToken(object):
def __getitem__(self, key):
def __init__(self, **kwargs):
class FakeRequestContext(context.RequestContext):
def __init__(self, *args, **kwargs):
class HTTPRequest(os_wsgi.Request):
def blank(*args, **kwargs):
class HTTPRequestV3(os_wsgi.Request):
def blank(*args, **kwargs):
class TestRouter(wsgi.Router):
def __init__(self, controller, mapper=None):
class FakeAuthDatabase(object):
def auth_token_get(context, token_hash):
def auth_token_create(context, token):
def auth_token_destroy(context, token_id):
class FakeRateLimiter(object):
def __init__(self, application):
def __call__(self, req):
def _ip(ip):
def _return_server(context, uuid, columns_to_join=None, use_slave=False):
def fake_actions_to_locked_server(self, context, instance, *args, **kwargs):
def fake_instance_get_all_by_filters(num_servers=5, **kwargs):
def _return_servers(context, *args, **kwargs):
def stub_instance(id, user_id=None, project_id=None, host=None, node=None, vm_state=None, task_state=None, reservation_id="", uuid=FAKE_UUID, image_ref="10", flavor_id="1", name=None, key_name='', access_ipv4=None, access_ipv6=None, progress=0, auto_disk_config=False, display_name=None, include_fake_metadata=True, config_drive=None, power_state=None, nw_cache=None, metadata=None, security_groups=None, root_device_name=None, limit=None, marker=None, launched_at=timeutils.utcnow(), terminated_at=timeutils.utcnow(), availability_zone='', locked_by=None, cleaned=False):
def stub_volume(id, **kwargs):
def stub_volume_create(self, context, size, name, description, snapshot, **param):
def stub_volume_update(self, context, *args, **param):
def stub_volume_delete(self, context, *args, **param):
def stub_volume_get(self, context, volume_id):
def stub_volume_notfound(self, context, volume_id):
def stub_volume_get_all(context, search_opts=None):
def stub_volume_check_attach(self, context, *args, **param):
def stub_snapshot(id, **kwargs):
def stub_snapshot_create(self, context, volume_id, name, description):
def stub_compute_volume_snapshot_create(self, context, volume_id, create_info):
def stub_snapshot_delete(self, context, snapshot_id):
def stub_compute_volume_snapshot_delete(self, context, volume_id, snapshot_id, delete_info):
def stub_snapshot_get(self, context, snapshot_id):
def stub_snapshot_get_all(self, context):
def stub_bdm_get_all_by_instance(context, instance_uuid, use_slave=False):
def fake_get_available_languages(domain):
def fake_not_implemented(*args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\api\openstack\test_common.py
class LimiterTest(test.TestCase):
def setUp(self):
def test_limiter_offset_zero(self):
def test_limiter_offset_medium(self):
def test_limiter_offset_over_max(self):
def test_limiter_offset_blank(self):
def test_limiter_offset_bad(self):
def test_limiter_nothing(self):
def test_limiter_limit_zero(self):
def test_limiter_limit_medium(self):
def test_limiter_limit_over_max(self):
def test_limiter_limit_and_offset(self):
def test_limiter_custom_max_limit(self):
def test_limiter_negative_limit(self):
def test_limiter_negative_offset(self):
class PaginationParamsTest(test.TestCase):
def test_no_params(self):
def test_valid_marker(self):
def test_valid_limit(self):
def test_invalid_limit(self):
def test_valid_limit_and_marker(self):
def test_valid_page_size(self):
def test_invalid_page_size(self):
def test_valid_limit_and_page_size(self):
class MiscFunctionsTest(test.TestCase):
def test_remove_major_version_from_href(self):
def test_remove_version_from_href(self):
def test_remove_version_from_href_2(self):
def test_remove_version_from_href_3(self):
def test_remove_version_from_href_4(self):
def test_remove_version_from_href_bad_request(self):
def test_remove_version_from_href_bad_request_2(self):
def test_remove_version_from_href_bad_request_3(self):
def test_get_id_from_href_with_int_url(self):
def test_get_id_from_href_with_int(self):
def test_get_id_from_href_with_int_url_query(self):
def test_get_id_from_href_with_uuid_url(self):
def test_get_id_from_href_with_uuid_url_query(self):
def test_get_id_from_href_with_uuid(self):
def test_raise_http_conflict_for_instance_invalid_state(self):
def test_check_img_metadata_properties_quota_valid_metadata(self):
def test_check_img_metadata_properties_quota_inv_metadata(self):
def test_status_from_state(self):
def test_task_and_vm_state_from_status(self):
class MetadataXMLDeserializationTest(test.TestCase):
def test_create(self):
def test_create_empty(self):
def test_update_all(self):
def test_update(self):
class MetadataXMLSerializationTest(test.TestCase):
def test_xml_declaration(self):
def test_index(self):
def test_index_null(self):
def test_index_unicode(self):
def test_show(self):
def test_update_all(self):
def test_update_item(self):
def test_create(self):
def test_metadata_deserializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\test_faults.py
class TestFaultWrapper(test.NoDBTestCase):
def test_safe_exception_translated(self, mock_translate):
def fake_translate(mesg, locale):
def raiser(*args, **kwargs):
class TestFaults(test.NoDBTestCase):
def _prepare_xml(self, xml_string):
def test_400_fault_json(self):
def test_413_fault_json(self):
def test_429_fault_json(self):
def test_raise(self):
def raiser(req):
def test_raise_403(self):
def raiser(req):
def test_raise_localize_explanation(self):
def raiser(req):
def test_fault_has_status_int(self):
def test_xml_serializer(self):
class FaultsXMLSerializationTestV11(test.NoDBTestCase):
def _prepare_xml(self, xml_string):
def test_400_fault(self):
def test_413_fault(self):
def test_429_fault(self):
def test_404_fault(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\test_mapper.py
class MapperTest(test.NoDBTestCase):
def test_resource_project_prefix(self):
def test_resource_no_project_prefix(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\test_wsgi.py
class RequestTest(test.NoDBTestCase):
def test_content_type_missing(self):
def test_content_type_unsupported(self):
def test_content_type_with_charset(self):
def test_content_type_from_accept(self):
def test_content_type_from_accept_best(self):
def test_content_type_from_query_extension(self):
def test_content_type_accept_and_query_extension(self):
def test_content_type_accept_default(self):
def test_cache_and_retrieve_instances(self):
def test_cache_and_retrieve_compute_nodes(self):
def test_from_request(self):
def test_asterisk(self):
def test_prefix(self):
def test_secondary(self):
def test_none_found(self):
def test_no_lang_header(self):
class ActionDispatcherTest(test.NoDBTestCase):
def test_dispatch(self):
def test_dispatch_action_None(self):
def test_dispatch_default(self):
class DictSerializerTest(test.NoDBTestCase):
def test_dispatch_default(self):
class XMLDictSerializerTest(test.NoDBTestCase):
def test_xml(self):
class JSONDictSerializerTest(test.NoDBTestCase):
def test_json(self):
class TextDeserializerTest(test.NoDBTestCase):
def test_dispatch_default(self):
class JSONDeserializerTest(test.NoDBTestCase):
def test_json(self):
def test_json_valid_utf8(self):
def test_json_invalid_utf8(self):
class XMLDeserializerTest(test.NoDBTestCase):
def test_xml(self):
def test_xml_empty(self):
def test_xml_valid_utf8(self):
def test_xml_invalid_utf8(self):
class ResourceTest(test.NoDBTestCase):
def test_resource_call_with_method_get(self):
def test_resource_call_with_method_post(self):
def test_resource_call_with_method_put(self):
def test_resource_call_with_method_delete(self):
def test_resource_not_authorized(self):
def test_dispatch(self):
def test_get_method_unknown_controller_method(self):
def test_get_method_action_json(self):
def test_get_method_action_xml(self):
def test_get_method_action_corrupt_xml(self):
def test_get_method_action_bad_body(self):
def test_get_method_unknown_controller_action(self):
def test_get_method_action_method(self):
def test_get_action_args(self):
def test_get_body_bad_content(self):
def test_get_body_no_content_type(self):
def test_get_body_no_content_body(self):
def test_get_body(self):
def test_get_request_id_with_dict_response_body(self):
def test_no_request_id_with_str_response_body(self):
def test_get_request_id_no_response_body(self):
def test_deserialize_badtype(self):
def test_deserialize_default(self):
def test_deserialize_decorator(self):
def test_register_actions(self):
def test_register_extensions(self):
def test_get_method_extensions(self):
def test_get_method_action_extensions(self):
def test_get_method_action_whitelist_extensions(self):
def test_pre_process_extensions_regular(self):
def extension1(req, resp_obj):
def extension2(req, resp_obj):
def test_pre_process_extensions_generator(self):
def extension1(req):
def extension2(req):
def test_pre_process_extensions_generator_response(self):
def extension1(req):
def extension2(req):
def test_post_process_extensions_regular(self):
def extension1(req, resp_obj):
def extension2(req, resp_obj):
def test_post_process_extensions_regular_response(self):
def extension1(req, resp_obj):
def extension2(req, resp_obj):
def test_post_process_extensions_generator(self):
def extension1(req):
def extension2(req):
def test_post_process_extensions_generator_response(self):
def extension1(req):
def extension2(req):
def test_resource_exception_handler_type_error(self):
def foo(a,):
def test_resource_headers_are_utf8(self):
def test_resource_valid_utf8_body(self):
def test_resource_invalid_utf8(self):
class ResponseObjectTest(test.NoDBTestCase):
def test_default_code(self):
def test_modified_code(self):
def test_override_default_code(self):
def test_override_modified_code(self):
def test_set_header(self):
def test_get_header(self):
def test_del_header(self):
def test_header_isolation(self):
def test_default_serializers(self):
def test_bind_serializers(self):
def test_get_serializer(self):
def test_get_serializer_defaults(self):
def test_serialize(self):
class ValidBodyTest(test.NoDBTestCase):
def setUp(self):
def test_is_valid_body(self):
def test_is_valid_body_none(self):
def test_is_valid_body_empty(self):
def test_is_valid_body_no_entity(self):
def test_is_valid_body_malformed_entity(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\test_xmlutil.py
class SelectorTest(test.NoDBTestCase):
def test_repr(self):
def test_empty_selector(self):
def test_dict_selector(self):
def test_datum_selector(self):
def test_list_selector(self):
def test_items_selector(self):
def test_missing_key_selector(self):
def test_constant_selector(self):
class TemplateElementTest(test.NoDBTestCase):
def test_element_initial_attributes(self):
def test_element_get_attributes(self):
def test_element_set_attributes(self):
def test_element_attribute_keys(self):
def test_element_attribute_items(self):
def test_element_selector_none(self):
def test_element_selector_string(self):
def test_element_selector(self):
def test_element_subselector_none(self):
def test_element_subselector_string(self):
def test_element_subselector(self):
def test_element_append_child(self):
def test_element_extend_children(self):
def test_element_insert_child(self):
def test_element_remove_child(self):
def get_key(elem, key):
def test_element_text(self):
def test_apply_attrs(self):
def test_apply_text(self):
def test__render(self):
def test_render(self):
def test_subelement(self):
def test_wrap(self):
def test_dyntag(self):
def test_tree(self):
class TemplateTest(test.NoDBTestCase):
def test_tree(self):
def test_wrap(self):
def test__siblings(self):
def test__nsmap(self):
def test_master_attach(self):
def test_master_copy(self):
def test_slave_apply(self):
def test__serialize(self):
def test_serialize_with_colon_tagname_support(self):
def test__serialize_with_empty_datum_selector(self):
class MasterTemplateBuilder(xmlutil.TemplateBuilder):
def construct(self):
class SlaveTemplateBuilder(xmlutil.TemplateBuilder):
def construct(self):
class TemplateBuilderTest(test.NoDBTestCase):
def test_master_template_builder(self):
def test_slave_template_builder(self):
class MiscellaneousXMLUtilTests(test.NoDBTestCase):
def test_validate_schema(self):
def test_make_links(self):
def test_make_flat_dict(self):
def test_make_flat_dict_with_colon_tagname_support(self):
def test_make_flat_dict_with_parent(self):
def test_make_flat_dict_with_dicts(self):
def test_safe_parse_xml(self):
class SafeParserTestCase(test.NoDBTestCase):
def test_external_dtd(self):
def test_external_file(self):
def test_notation(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\__init__.py
\OpenStack\nova-2014.1\nova\tests\api\test_auth.py
class TestNovaKeystoneContextMiddleware(test.NoDBTestCase):
def setUp(self):
def fake_app(req):
def test_no_user_or_user_id(self):
def test_user_only(self):
def test_user_id_only(self):
def test_user_id_trumps_user(self):
def test_invalid_service_catalog(self):
class TestKeystoneMiddlewareRoles(test.NoDBTestCase):
def setUp(self):
def role_check_app(req):
def test_roles(self):
def test_roles_empty(self):
def test_deprecated_role(self):
def test_role_empty(self):
def test_no_role_headers(self):
class TestPipeLineFactory(test.NoDBTestCase):
def _test_pipeline(self, pipeline, app):
def test_pipeline_factory(self):
def test_pipeline_factory_v3(self):
def test_pipeline_facotry_with_rate_limits(self):
def test_pipeline_facotry_without_rate_limits(self):
def test_pipeline_facotry_missing_nolimits_pipeline(self):
def test_pipeline_facotry_compatibility_with_v3(self):
\OpenStack\nova-2014.1\nova\tests\api\test_sizelimit.py
class TestLimitingReader(test.NoDBTestCase):
def test_limiting_reader(self):
def test_limiting_reader_fails(self):
def _consume_all_iter():
def _consume_all_read():
class TestRequestBodySizeLimiter(test.NoDBTestCase):
def setUp(self):
def fake_app(req):
def test_content_length_acceptable(self):
def test_content_length_too_large(self):
def test_request_too_large_no_content_length(self):
\OpenStack\nova-2014.1\nova\tests\api\test_validator.py
class ValidatorTestCase(test.NoDBTestCase):
def test_validate(self):
def test_only_tests_intersect(self):
def test_validate_str(self):
def test_validate_int(self):
def test_validate_ec2_id(self):
def test_validate_url_path(self):
def test_validate_image_path(self):
def test_validate_user_data(self):
def test_default_validator(self):
\OpenStack\nova-2014.1\nova\tests\api\test_wsgi.py
class Test(test.NoDBTestCase):
def test_debug(self):
def test_router(self):
\OpenStack\nova-2014.1\nova\tests\api\__init__.py
\OpenStack\nova-2014.1\nova\tests\cast_as_call.py
class CastAsCall(fixtures.Fixture):
def __init__(self, stubs):
def _stub_out(stubs, obj):
def prepare(self, *args, **kwargs):
def setUp(self):
\OpenStack\nova-2014.1\nova\tests\cells\fakes.py
class FakeDBApi(object):
def __init__(self, cell_db_entries):
def __getattr__(self, key):
def cell_get_all(self, ctxt):
def compute_node_get_all(self, ctxt):
def instance_get_all_by_filters(self, ctxt, *args, **kwargs):
def instance_get_by_uuid(self, ctxt, instance_uuid):
class FakeCellsDriver(driver.BaseCellsDriver):
class FakeCellState(cells_state.CellState):
def send_message(self, message):
class FakeCellStateManager(cells_state.CellStateManagerDB):
def __init__(self, *args, **kwargs):
class FakeCellsManager(cells_manager.CellsManager):
def __init__(self, *args, **kwargs):
class CellStubInfo(object):
def __init__(self, test_case, cell_name, db_entries):
def fake_base_init(_self, *args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_filters.py
class FiltersTestCase(test.NoDBTestCase):
def test_all_filters(self):
class _FilterTestClass(test.NoDBTestCase):
def setUp(self):
def _filter_cells(self, cells, filter_properties):
class ImagePropertiesFilter(_FilterTestClass):
def setUp(self):
def test_missing_image_properties(self):
def test_missing_hypervisor_version_requires(self):
def test_missing_hypervisor_version_in_cells(self):
def test_cells_matching_hypervisor_version(self):
class TestTargetCellFilter(_FilterTestClass):
def test_missing_scheduler_hints(self):
def test_no_target_cell_hint(self):
def test_target_cell_specified_me(self):
def test_target_cell_specified_me_but_not_admin(self):
def test_target_cell_specified_not_me(self):
def _fake_sched_run_instance(ctxt, cell, sched_kwargs):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_manager.py
class CellsManagerClassTestCase(test.NoDBTestCase):
def setUp(self):
def _get_fake_response(self, raw_response=None, exc=False):
def test_get_cell_info_for_neighbors(self):
def test_post_start_hook_child_cell(self):
def test_post_start_hook_middle_cell(self):
def test_update_our_parents(self):
def test_schedule_run_instance(self):
def test_build_instances(self):
def test_run_compute_api_method(self):
def test_instance_update_at_top(self):
def test_instance_destroy_at_top(self):
def test_instance_delete_everywhere(self):
def test_instance_fault_create_at_top(self):
def test_bw_usage_update_at_top(self):
def test_heal_instances(self):
def utcnow():
def get_instances_to_sync(context, **kwargs):
def instance_get_by_uuid(context, uuid):
def sync_instance(context, instance):
def test_sync_instances(self):
def test_service_get_all(self):
def test_service_get_by_compute_host(self):
def test_get_host_uptime(self):
def test_service_update(self):
def test_service_delete(self):
def test_proxy_rpc_to_manager(self):
def _build_task_log_responses(self, num):
def test_task_log_get_all(self):
def test_task_log_get_all_with_filters(self):
def test_task_log_get_all_with_cell_but_no_host_filters(self):
def test_compute_node_get_all(self):
def test_compute_node_stats(self):
def test_compute_node_get(self):
def test_actions_get(self):
def test_action_get_by_request_id(self):
def test_action_events_get(self):
def test_consoleauth_delete_tokens(self):
def test_get_capacities(self):
def test_validate_console_port(self):
def test_bdm_update_or_create_at_top(self):
def test_bdm_destroy_at_top(self):
def test_get_migrations(self):
def test_get_migrations_for_a_given_cell(self):
def test_instance_update_from_api(self):
def test_start_instance(self):
def test_stop_instance(self):
def test_cell_create(self):
def test_cell_update(self):
def test_cell_delete(self):
def test_cell_get(self):
def test_reboot_instance(self):
def test_suspend_instance(self):
def test_resume_instance(self):
def test_terminate_instance(self):
def test_soft_delete_instance(self):
def test_resize_instance(self):
def test_live_migrate_instance(self):
def test_revert_resize(self):
def test_confirm_resize(self):
def test_reset_network(self):
def test_inject_network_info(self):
def test_snapshot_instance(self):
def test_backup_instance(self):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_messaging.py
class CellsMessageClassesTestCase(test.TestCase):
def setUp(self):
def test_reverse_path(self):
def test_response_cell_name_from_path(self):
def test_response_cell_name_from_path_neighbor_only(self):
def test_targeted_message(self):
def test_create_targeted_message_with_response(self):
def test_targeted_message_when_target_is_cell_state(self):
def test_targeted_message_when_target_cell_state_is_me(self):
def test_create_broadcast_message(self):
def test_create_broadcast_message_with_response(self):
def test_self_targeted_message(self):
def our_fake_method(message, **kwargs):
def test_child_targeted_message(self):
def our_fake_method(message, **kwargs):
def test_child_targeted_message_with_object(self):
def our_fake_method(message, **kwargs):
def test_grandchild_targeted_message(self):
def our_fake_method(message, **kwargs):
def test_grandchild_targeted_message_with_response(self):
def our_fake_method(message, **kwargs):
def test_grandchild_targeted_message_with_error(self):
def our_fake_method(message, **kwargs):
def test_grandchild_targeted_message_max_hops(self):
def our_fake_method(message, **kwargs):
def test_targeted_message_invalid_cell(self):
def test_targeted_message_invalid_cell2(self):
def test_broadcast_routing(self):
def our_fake_method(message, **kwargs):
def test_broadcast_routing_up(self):
def our_fake_method(message, **kwargs):
def test_broadcast_routing_without_ourselves(self):
def our_fake_method(message, **kwargs):
def test_broadcast_routing_with_response(self):
def our_fake_method(message, **kwargs):
def test_broadcast_routing_with_response_max_hops(self):
def our_fake_method(message, **kwargs):
def test_broadcast_routing_with_all_erroring(self):
def our_fake_method(message, **kwargs):
def test_broadcast_routing_with_two_erroring(self):
def our_fake_method_failing(message, **kwargs):
def our_fake_method(message, **kwargs):
class CellsTargetedMethodsTestCase(test.TestCase):
def setUp(self):
def _setup_attrs(self, source_cell, target_cell):
def test_schedule_run_instance(self):
def test_build_instances(self):
def test_run_compute_api_method(self):
def test_run_compute_api_method_expects_obj(self):
def get_instance_mock():
def test_run_compute_api_method_unknown_instance(self):
def test_update_capabilities(self):
def test_update_capacities(self):
def test_announce_capabilities(self):
def test_announce_capacities(self):
def test_service_get_by_compute_host(self):
def test_service_update(self):
def test_service_delete(self):
def test_proxy_rpc_to_manager_call(self):
def test_proxy_rpc_to_manager_cast(self):
def test_task_log_get_all_targetted(self):
def test_compute_node_get(self):
def test_actions_get(self):
def test_action_get_by_request_id(self):
def test_action_events_get(self):
def test_validate_console_port(self):
def test_get_migrations_for_a_given_cell(self):
def test_get_migrations_for_an_invalid_cell(self):
def test_call_compute_api_with_obj(self):
def test_call_compute_with_obj_unknown_instance(self):
def _instance_update_helper(self, admin_state_reset):
def _check_object(*args, **kwargs):
def test_instance_update_from_api(self):
def test_instance_update_from_api_admin_state_reset(self):
def _test_instance_action_method(self, method, args, kwargs, expected_args, expected_kwargs, expect_result):
def test_start_instance(self):
def test_stop_instance_cast(self):
def test_stop_instance_call(self):
def test_reboot_instance(self):
def test_suspend_instance(self):
def test_resume_instance(self):
def test_get_host_uptime(self):
def test_terminate_instance(self):
def test_soft_delete_instance(self):
def test_pause_instance(self):
def test_unpause_instance(self):
def test_resize_instance(self):
def test_live_migrate_instance(self):
def test_revert_resize(self):
def test_confirm_resize(self):
def test_reset_network(self):
def test_inject_network_info(self):
def test_snapshot_instance(self):
def check_state(expected_task_state=None):
def test_backup_instance(self):
def check_state(expected_task_state=None):
class CellsBroadcastMethodsTestCase(test.TestCase):
def setUp(self):
def _setup_attrs(self, up=True):
def test_at_the_top(self):
def test_apply_expected_states_building(self):
def test_apply_expected_states_resize_finish(self):
def _test_instance_update_at_top(self, net_info, exists=True):
def test_instance_update_at_top(self):
def test_instance_update_at_top_netinfo_list(self):
def test_instance_update_at_top_netinfo_model(self):
def test_instance_update_at_top_doesnt_already_exist(self):
def test_instance_update_at_top_with_building_state(self):
def test_instance_destroy_at_top(self):
def test_instance_hard_delete_everywhere(self):
def test_instance_soft_delete_everywhere(self):
def test_instance_fault_create_at_top(self):
def test_bw_usage_update_at_top(self):
def test_sync_instances(self):
def test_service_get_all_with_disabled(self):
def test_service_get_all_without_disabled(self):
def test_task_log_get_all_broadcast(self):
def test_compute_node_get_all(self):
def test_compute_node_get_all_with_hyp_match(self):
def test_compute_node_stats(self):
def test_consoleauth_delete_tokens(self):
def test_bdm_update_or_create_with_none_create(self):
def test_bdm_update_or_create_with_true_create(self):
def test_bdm_update_or_create_with_false_create_vol_id(self):
def test_bdm_update_or_create_with_false_create_dev_name(self):
def test_bdm_destroy_by_volume(self):
def test_bdm_destroy_by_device(self):
def test_get_migrations(self):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_rpcapi.py
class CellsAPITestCase(test.NoDBTestCase):
def setUp(self):
def _stub_rpc_method(self, rpc_method, result):
def fake_rpc_prepare(**kwargs):
def fake_csv(version):
def fake_rpc_method(ctxt, method, **kwargs):
def _check_result(self, call_info, method, args, version=None):
def test_cast_compute_api_method(self):
def test_call_compute_api_method(self):
def test_schedule_run_instance(self):
def test_build_instances(self):
def test_get_capacities(self):
def test_instance_update_at_top(self):
def test_instance_destroy_at_top(self):
def test_instance_delete_everywhere(self):
def test_instance_fault_create_at_top(self):
def test_bw_usage_update_at_top(self):
def test_get_cell_info_for_neighbors(self):
def test_sync_instances(self):
def test_service_get_all(self):
def test_service_get_by_compute_host(self):
def test_get_host_uptime(self):
def test_service_update(self):
def test_service_delete(self):
def test_proxy_rpc_to_manager(self):
def test_task_log_get_all(self):
def test_compute_node_get_all(self):
def test_compute_node_stats(self):
def test_compute_node_get(self):
def test_actions_get(self):
def test_actions_get_no_cell(self):
def test_action_get_by_request_id(self):
def test_action_get_by_request_id_no_cell(self):
def test_action_events_get(self):
def test_action_events_get_no_cell(self):
def test_consoleauth_delete_tokens(self):
def test_validate_console_port(self):
def test_bdm_update_or_create_at_top(self):
def test_bdm_destroy_at_top(self):
def test_get_migrations(self):
def test_instance_update_from_api(self):
def test_start_instance(self):
def test_stop_instance_cast(self):
def test_stop_instance_call(self):
def test_cell_create(self):
def test_cell_update(self):
def test_cell_delete(self):
def test_cell_get(self):
def test_reboot_instance(self):
def test_pause_instance(self):
def test_unpause_instance(self):
def test_suspend_instance(self):
def test_resume_instance(self):
def test_terminate_instance(self):
def test_soft_delete_instance(self):
def test_resize_instance(self):
def test_live_migrate_instance(self):
def test_revert_resize(self):
def test_confirm_resize(self):
def test_reset_network(self):
def test_inject_network_info(self):
def test_snapshot_instance(self):
def test_backup_instance(self):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_rpc_driver.py
class CellsRPCDriverTestCase(test.NoDBTestCase):
def setUp(self):
def test_start_servers(self):
def test_stop_servers(self):
def test_send_message_to_cell_cast(self):
def check_transport_url(cell_state):
def test_send_message_to_cell_fanout_cast(self):
def check_transport_url(cell_state):
def test_rpc_topic_uses_message_type(self):
def check_transport_url(cell_state):
def test_process_message(self):
def _fake_message_from_json(json_message):
def _fake_process():
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_scheduler.py
class FakeFilterClass1(filters.BaseCellFilter):
class FakeFilterClass2(filters.BaseCellFilter):
class FakeWeightClass1(weights.BaseCellWeigher):
class FakeWeightClass2(weights.BaseCellWeigher):
class CellsSchedulerTestCase(test.TestCase):
def setUp(self):
def _init_cells_scheduler(self):
def test_create_instances_here(self):
def _fake_instance_update_at_top(_ctxt, instance):
def test_run_instance_selects_child_cell(self):
def msg_runner_schedule_run_instance(ctxt, target_cell, host_sched_kwargs):
def test_build_instances_selects_child_cell(self):
def msg_runner_build_instances(ctxt, target_cell, build_inst_kwargs):
def fake_build_request_spec(ctxt, image, instances):
def test_run_instance_selects_current_cell(self):
def fake_create_instances_here(ctxt, instance_uuids, instance_properties, instance_type, image, security_groups, block_device_mapping):
def fake_rpc_run_instance(ctxt, **host_sched_kwargs):
def test_build_instances_selects_current_cell(self):
def fake_create_instances_here(ctxt, instance_uuids, instance_properties, instance_type, image, security_groups, block_device_mapping):
def fake_rpc_build_instances(ctxt, **build_inst_kwargs):
def fake_build_request_spec(ctxt, image, instances):
def test_run_instance_retries_when_no_cells_avail(self):
def fake_grab_target_cells(filter_properties):
def fake_sleep(_secs):
def fake_instance_update(ctxt, instance_uuid, values):
def test_build_instances_retries_when_no_cells_avail(self):
def fake_grab_target_cells(filter_properties):
def fake_sleep(_secs):
def fake_instance_update(ctxt, instance_uuid, values):
def fake_build_request_spec(ctxt, image, instances):
def test_schedule_method_on_random_exception(self):
def fake_grab_target_cells(filter_properties):
def fake_instance_update(ctxt, instance_uuid, values):
def fake_instance_update_at_top(ctxt, instance):
def fake_build_request_spec(ctxt, image, instances):
def test_filter_schedule_skipping(self):
def _grab(filter_properties):
def _test(self, *args):
def test_cells_filter_args_correct(self):
def fake_create_instances_here(ctxt, instance_uuids, instance_properties, instance_type, image, security_groups, block_device_mapping):
def fake_rpc_run_instance(ctxt, **host_sched_kwargs):
def fake_get_filtered_objs(filter_classes, cells, filt_properties):
def test_cells_filter_returning_none(self):
def fake_create_instances_here(ctxt, request_spec):
def fake_get_filtered_objs(filter_classes, cells, filt_properties):
def test_cells_weight_args_correct(self):
def fake_create_instances_here(ctxt, instance_uuids, instance_properties, instance_type, image, security_groups, block_device_mapping):
def fake_rpc_run_instance(ctxt, **host_sched_kwargs):
def fake_get_weighed_objs(weight_classes, cells, filt_properties):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_state_manager.py
def _fake_compute_node_get_all(context):
def _node(host, total_mem, total_disk, free_mem, free_disk):
def _fake_instance_type_all(context):
def _type(mem, root, eph):
class TestCellsStateManager(test.TestCase):
def setUp(self):
def test_cells_config_not_found(self):
def test_capacity_no_reserve(self):
def test_capacity_full_reserve(self):
def test_capacity_part_reserve(self):
def _get_state_manager(self, reserve_percent=0.0):
def _capacity(self, reserve_percent):
class TestCellsGetCapacity(TestCellsStateManager):
def setUp(self):
def test_get_cell_capacity_for_all_cells(self):
def test_get_cell_capacity_for_the_parent_cell(self):
def test_get_cell_capacity_for_a_cell(self):
def test_get_cell_capacity_for_non_existing_cell(self):
class FakeCellStateManager(object):
def __init__(self):
def _cell_data_sync(self, force=False):
class TestSyncDecorators(test.TestCase):
def test_sync_before(self):
def test(inst, *args, **kwargs):
def test_sync_after(self):
def test(inst, *args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_utils.py
class CellsUtilsTestCase(test.NoDBTestCase):
def test_get_instances_to_sync(self):
def random_shuffle(_list):
def instance_get_all_by_filters(context, filters, sort_key, sort_order):
def test_split_cell_and_item(self):
\OpenStack\nova-2014.1\nova\tests\cells\test_cells_weights.py
class FakeCellState(state.CellState):
def __init__(self, cell_name):
def _update_ram_free(self, *args):
def _get_fake_cells():
class CellsWeightsTestCase(test.NoDBTestCase):
def test_all_weighers(self):
class _WeigherTestClass(test.NoDBTestCase):
def setUp(self):
def _get_weighed_cells(self, cells, weight_properties):
class RAMByInstanceTypeWeigherTestClass(_WeigherTestClass):
def test_default_spreading(self):
def test_negative_multiplier(self):
class WeightOffsetWeigherTestClass(_WeigherTestClass):
def test_weight_offset(self):
class MuteWeigherTestClass(_WeigherTestClass):
def setUp(self):
def tearDown(self):
def test_non_mute(self):
def test_mutes(self):
\OpenStack\nova-2014.1\nova\tests\cells\__init__.py
\OpenStack\nova-2014.1\nova\tests\cert\test_rpcapi.py
class CertRpcAPITestCase(test.NoDBTestCase):
def _test_cert_api(self, method, **kwargs):
def test_revoke_certs_by_user(self):
def test_revoke_certs_by_project(self):
def test_revoke_certs_by_user_and_project(self):
def test_generate_x509_cert(self):
def test_fetch_ca(self):
def test_fetch_crl(self):
def test_decrypt_text(self):
\OpenStack\nova-2014.1\nova\tests\cert\__init__.py
\OpenStack\nova-2014.1\nova\tests\compute\fake_resource_tracker.py
class FakeResourceTracker(resource_tracker.ResourceTracker):
def _create(self, context, values):
def _update(self, context, values, prune_stats=False):
def _get_service(self, context):
\OpenStack\nova-2014.1\nova\tests\compute\monitors\test_cpu_monitor.py
class FakeLibvirt(object):
def getCPUStats(self, cpuNum, flag):
def getInfo(self):
class ComputeDriverCPUMonitorTestCase(test.TestCase):
def setUp(self):
def test_get_metric_names(self):
def test_get_metrics(self):
OpenStack IndexPreviousNext
|