OpenStack Study: cinder
OpenStack IndexPreviousNext
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):
class TemplateTest(test.TestCase):
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_delimiter(self):
class MasterTemplateBuilder(xmlutil.TemplateBuilder):
def construct(self):
class SlaveTemplateBuilder(xmlutil.TemplateBuilder):
def construct(self):
class TemplateBuilderTest(test.TestCase):
def test_master_template_builder(self):
def test_slave_template_builder(self):
class MiscellaneousXMLUtilTests(test.TestCase):
def test_make_flat_dict(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\stubs.py
def stub_volume(id, **kwargs):
def stub_volume_create(self, context, size, name, description, snapshot, **param):
def stub_volume_create_from_image(self, context, size, name, description, snapshot, volume_type, metadata, availability_zone):
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_get_notfound(self, context, volume_id):
def stub_volume_get_all(context, search_opts=None):
def stub_volume_get_all_by_project(self, context, search_opts=None):
def stub_snapshot(id, **kwargs):
def stub_snapshot_get_all(self):
def stub_snapshot_get_all_by_project(self, context):
def stub_snapshot_update(self, context, *args, **param):
def stub_service_get_all_by_topic(context, topic):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\test_limits.py
class BaseLimitTestSuite(test.TestCase):
def setUp(self):
def stub_get_project_quotas(context, project_id, usages=True):
def _get_time(self):
class LimitsControllerTest(BaseLimitTestSuite):
def setUp(self):
def _get_index_request(self, accept_header="application/json"):
def _populate_limits(self, request):
def test_empty_index_json(self):
def test_index_json(self):
def _populate_limits_diff_regex(self, request):
def test_index_diff_regex(self):
def _test_index_absolute_limits_json(self, expected):
def test_index_ignores_extra_absolute_limits_json(self):
class TestLimiter(limits.Limiter):
class LimitMiddlewareTest(BaseLimitTestSuite):
def _empty_app(self, request):
def setUp(self):
def test_limit_class(self):
def test_good_request(self):
def test_limited_request_json(self):
def test_limited_request_xml(self):
class LimitTest(BaseLimitTestSuite):
def test_GET_no_delay(self):
def test_GET_delay(self):
class ParseLimitsTest(BaseLimitTestSuite):
def test_invalid(self):
def test_bad_rule(self):
def test_missing_arg(self):
def test_bad_value(self):
def test_bad_unit(self):
def test_multiple_rules(self):
class LimiterTest(BaseLimitTestSuite):
def setUp(self):
def _check(self, num, verb, url, username=None):
def _check_sum(self, num, verb, url, username=None):
def test_no_delay_GET(self):
def test_no_delay_PUT(self):
def test_delay_PUT(self):
def test_delay_POST(self):
def test_delay_GET(self):
def test_delay_PUT_volumes(self):
def test_delay_PUT_wait(self):
def test_multiple_delays(self):
def test_user_limit(self):
def test_multiple_users(self):
class WsgiLimiterTest(BaseLimitTestSuite):
def setUp(self):
def _request_data(self, verb, path):
def _request(self, verb, url, username=None):
def test_invalid_methods(self):
def test_good_url(self):
def test_escaping(self):
def test_response_to_delays(self):
def test_response_to_delays_usernames(self):
class FakeHttplibSocket(object):
def __init__(self, response_string):
def makefile(self, _mode, _other):
class FakeHttplibConnection(object):
def __init__(self, app, host):
def request(self, method, path, body="", headers=None):
def getresponse(self):
def __init__(self, wrapped):
def __call__(self, connection_host, *args, **kwargs):
class WsgiLimiterProxyTest(BaseLimitTestSuite):
def setUp(self):
def test_200(self):
def test_403(self):
def tearDown(self):
class LimitsViewBuilderTest(test.TestCase):
def setUp(self):
def test_build_limits(self):
def test_build_limits_empty_limits(self):
class LimitsXMLSerializationTest(test.TestCase):
def test_xml_declaration(self):
def test_index(self):
def test_index_no_limits(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\test_snapshots.py
def _get_default_snapshot_param():
def stub_snapshot_create(self, context, volume_id, name, description, metadata):
def stub_snapshot_delete(self, context, snapshot):
def stub_snapshot_get(self, context, snapshot_id):
def stub_snapshot_get_all(self, context, search_opts=None):
class SnapshotApiTest(test.TestCase):
def setUp(self):
def test_snapshot_create(self):
def test_snapshot_create_force(self):
def test_snapshot_create_without_volume_id(self):
def test_snapshot_update(self):
def test_snapshot_update_missing_body(self):
def test_snapshot_update_invalid_body(self):
def test_snapshot_update_not_found(self):
def test_snapshot_delete(self):
def test_snapshot_delete_invalid_id(self):
def test_snapshot_show(self):
def test_snapshot_show_invalid_id(self):
def test_snapshot_detail(self):
def test_snapshot_list_by_status(self):
def stub_snapshot_get_all_by_project(context, project_id):
def test_snapshot_list_by_volume(self):
def stub_snapshot_get_all_by_project(context, project_id):
def test_snapshot_list_by_name(self):
def stub_snapshot_get_all_by_project(context, project_id):
def test_admin_list_snapshots_limited_to_project(self):
def test_list_snapshots_with_limit_and_offset(self):
def list_snapshots_with_limit_and_offset(is_admin):
def test_admin_list_snapshots_all_tenants(self):
def test_all_tenants_non_admin_gets_all_tenants(self):
def test_non_admin_get_by_project(self):
class SnapshotSerializerTest(test.TestCase):
def _verify_snapshot(self, snap, tree):
def test_snapshot_show_create_serializer(self):
def test_snapshot_index_detail_serializer(self):
class SnapshotsUnprocessableEntityTestCase(test.TestCase):
def setUp(self):
def _unprocessable_snapshot_create(self, body):
def test_create_no_body(self):
def test_create_missing_snapshot(self):
def test_create_malformed_entity(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\test_snapshot_metadata.py
def return_create_snapshot_metadata_max(context, snapshot_id, metadata, delete):
def return_create_snapshot_metadata(context, snapshot_id, metadata, delete):
def return_create_snapshot_metadata_insensitive(context, snapshot_id, metadata, delete):
def return_new_snapshot_metadata(context, snapshot_id, metadata, delete):
def return_snapshot_metadata(context, snapshot_id):
def return_empty_snapshot_metadata(context, snapshot_id):
def return_empty_container_metadata(context, snapshot_id, metadata, delete):
def delete_snapshot_metadata(context, snapshot_id, key):
def stub_snapshot_metadata():
def stub_snapshot_metadata_insensitive():
def stub_new_snapshot_metadata():
def stub_max_snapshot_metadata():
def return_snapshot(context, snapshot_id):
def return_volume(context, volume_id):
def return_snapshot_nonexistent(context, snapshot_id):
def fake_update_snapshot_metadata(self, context, snapshot, diff):
class SnapshotMetaDataTest(test.TestCase):
def setUp(self):
def test_index(self):
def test_index_nonexistent_snapshot(self):
def test_index_no_data(self):
def test_show(self):
def test_show_nonexistent_snapshot(self):
def test_show_meta_not_found(self):
def test_delete(self):
def test_delete_nonexistent_snapshot(self):
def test_delete_meta_not_found(self):
def test_create(self):
def test_create_with_keys_in_uppercase_and_lowercase(self):
def test_create_empty_body(self):
def test_create_item_empty_key(self):
def test_create_item_key_too_long(self):
def test_create_nonexistent_snapshot(self):
def test_update_all(self):
def test_update_all_with_keys_in_uppercase_and_lowercase(self):
def test_update_all_empty_container(self):
def test_update_all_malformed_container(self):
def test_update_all_malformed_data(self):
def test_update_all_nonexistent_snapshot(self):
def test_update_item(self):
def test_update_item_nonexistent_snapshot(self):
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_invalid_metadata_items_on_create(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\test_types.py
def stub_volume_type(id):
def return_volume_types_get_all_types(context):
def return_empty_volume_types_get_all_types(context):
def return_volume_types_get_volume_type(context, id):
def return_volume_types_get_by_name(context, name):
class VolumeTypesApiTest(test.TestCase):
def setUp(self):
def test_volume_types_index(self):
def test_volume_types_index_no_data(self):
def test_volume_types_show(self):
def test_volume_types_show_not_found(self):
def test_view_builder_show(self):
def test_view_builder_list(self):
class VolumeTypesSerializerTest(test.TestCase):
def _verify_volume_type(self, vtype, tree):
def test_index_serializer(self):
def test_voltype_serializer(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\test_volumes.py
def stub_snapshot_get(self, context, snapshot_id):
class VolumeApiTest(test.TestCase):
def setUp(self):
def tearDown(self):
def test_volume_create(self):
def test_volume_create_with_type(self):
def test_volume_creation_fails_with_bad_size(self):
def test_volume_creation_fails_with_bad_availability_zone(self):
def test_volume_create_with_image_id(self):
def test_volume_create_with_image_id_is_integer(self):
def test_volume_create_with_image_id_not_uuid_format(self):
def test_volume_update(self):
def test_volume_update_metadata(self):
def test_volume_update_with_admin_metadata(self):
def test_update_empty_body(self):
def test_update_invalid_body(self):
def test_update_not_found(self):
def test_volume_list(self):
def test_volume_list_with_admin_metadata(self):
def test_volume_list_detail(self):
def test_volume_list_detail_with_admin_metadata(self):
def test_volume_show(self):
def test_volume_show_no_attachments(self):
def stub_volume_get(self, context, volume_id):
def test_volume_show_bootable(self):
def stub_volume_get(self, context, volume_id):
def test_volume_show_no_volume(self):
def test_volume_detail_limit_offset(self):
def volume_detail_limit_offset(is_admin):
def test_volume_show_with_admin_metadata(self):
def test_volume_show_with_encrypted_volume(self):
def stub_volume_get(self, context, volume_id):
def test_volume_show_with_unencrypted_volume(self):
def stub_volume_get(self, context, volume_id):
def test_volume_delete(self):
def test_volume_delete_no_volume(self):
def test_admin_list_volumes_limited_to_project(self):
def test_admin_list_volumes_all_tenants(self):
def test_all_tenants_non_admin_gets_all_tenants(self):
def test_non_admin_get_by_project(self):
def test_add_visible_admin_metadata_visible_key_only(self):
class VolumeSerializerTest(test.TestCase):
def _verify_volume_attachment(self, attach, tree):
def _verify_volume(self, vol, tree):
def test_volume_show_create_serializer(self):
def test_volume_index_detail_serializer(self):
class TestVolumeCreateRequestXMLDeserializer(test.TestCase):
def setUp(self):
def test_minimal_volume(self):
def test_display_name(self):
def test_display_description(self):
def test_volume_type(self):
def test_availability_zone(self):
def test_metadata(self):
def test_full_volume(self):
def test_imageref(self):
def test_snapshot_id(self):
def test_source_volid(self):
class VolumesUnprocessableEntityTestCase(test.TestCase):
def setUp(self):
def _unprocessable_volume_create(self, body):
def test_create_no_body(self):
def test_create_missing_volume(self):
def test_create_malformed_entity(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\test_volume_metadata.py
def return_create_volume_metadata_max(context, volume_id, metadata, delete):
def return_create_volume_metadata(context, volume_id, metadata, delete):
def return_new_volume_metadata(context, volume_id, metadata, delete):
def return_create_volume_metadata_insensitive(context, snapshot_id, metadata, delete):
def return_volume_metadata(context, volume_id):
def return_empty_volume_metadata(context, volume_id):
def return_empty_container_metadata(context, volume_id, metadata, delete):
def delete_volume_metadata(context, volume_id, key):
def stub_volume_metadata():
def stub_new_volume_metadata():
def stub_volume_metadata_insensitive():
def stub_max_volume_metadata():
def return_volume(context, volume_id):
def return_volume_nonexistent(context, volume_id):
def fake_update_volume_metadata(self, context, volume, diff):
class volumeMetaDataTest(test.TestCase):
def setUp(self):
def test_index(self):
def test_index_nonexistent_volume(self):
def test_index_no_data(self):
def test_show(self):
def test_show_nonexistent_volume(self):
def test_show_meta_not_found(self):
def test_delete(self):
def test_delete_nonexistent_volume(self):
def test_delete_meta_not_found(self):
def test_create(self):
def test_create_with_keys_in_uppercase_and_lowercase(self):
def test_create_empty_body(self):
def test_create_item_empty_key(self):
def test_create_item_key_too_long(self):
def test_create_nonexistent_volume(self):
def test_update_all(self):
def test_update_all_with_keys_in_uppercase_and_lowercase(self):
def test_update_all_empty_container(self):
def test_update_all_malformed_container(self):
def test_update_all_malformed_data(self):
def test_update_all_nonexistent_volume(self):
def test_update_item(self):
def test_update_item_nonexistent_volume(self):
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_invalid_metadata_items_on_create(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v1\__init__.py
\OpenStack\cinder-2014.1\cinder\tests\api\v2\stubs.py
def stub_volume(id, **kwargs):
def stub_volume_create(self, context, size, name, description, snapshot, **param):
def stub_volume_create_from_image(self, context, size, name, description, snapshot, volume_type, metadata, availability_zone):
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_get_notfound(self, context, volume_id):
def stub_volume_get_db(context, volume_id):
def stub_volume_get_all(context, search_opts=None, marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None):
def stub_volume_get_all_by_project(self, context, marker, limit, sort_key, sort_dir, filters={}):
def stub_snapshot(id, **kwargs):
def stub_snapshot_get_all(self):
def stub_snapshot_get_all_by_project(self, context):
def stub_snapshot_update(self, context, *args, **param):
def stub_service_get_all_by_topic(context, topic):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\test_limits.py
class BaseLimitTestSuite(test.TestCase):
def setUp(self):
def stub_get_project_quotas(context, project_id, usages=True):
def _get_time(self):
class LimitsControllerTest(BaseLimitTestSuite):
def setUp(self):
def _get_index_request(self, accept_header="application/json"):
def _populate_limits(self, request):
def test_empty_index_json(self):
def test_index_json(self):
def _populate_limits_diff_regex(self, request):
def test_index_diff_regex(self):
def _test_index_absolute_limits_json(self, expected):
def test_index_ignores_extra_absolute_limits_json(self):
class TestLimiter(limits.Limiter):
class LimitMiddlewareTest(BaseLimitTestSuite):
def _empty_app(self, request):
def setUp(self):
def test_limit_class(self):
def test_good_request(self):
def test_limited_request_json(self):
def test_limited_request_xml(self):
class LimitTest(BaseLimitTestSuite):
def test_GET_no_delay(self):
def test_GET_delay(self):
class ParseLimitsTest(BaseLimitTestSuite):
def test_invalid(self):
def test_bad_rule(self):
def test_missing_arg(self):
def test_bad_value(self):
def test_bad_unit(self):
def test_multiple_rules(self):
class LimiterTest(BaseLimitTestSuite):
def setUp(self):
def _check(self, num, verb, url, username=None):
def _check_sum(self, num, verb, url, username=None):
def test_no_delay_GET(self):
def test_no_delay_PUT(self):
def test_delay_PUT(self):
def test_delay_POST(self):
def test_delay_GET(self):
def test_delay_PUT_volumes(self):
def test_delay_PUT_wait(self):
def test_multiple_delays(self):
def test_user_limit(self):
def test_multiple_users(self):
class WsgiLimiterTest(BaseLimitTestSuite):
def setUp(self):
def _request_data(self, verb, path):
def _request(self, verb, url, username=None):
def test_invalid_methods(self):
def test_good_url(self):
def test_escaping(self):
def test_response_to_delays(self):
def test_response_to_delays_usernames(self):
class FakeHttplibSocket(object):
def __init__(self, response_string):
def makefile(self, _mode, _other):
class FakeHttplibConnection(object):
def __init__(self, app, host):
def request(self, method, path, body="", headers=None):
def getresponse(self):
def __init__(self, wrapped):
def __call__(self, connection_host, *args, **kwargs):
class WsgiLimiterProxyTest(BaseLimitTestSuite):
def setUp(self):
def _restore(self, oldHTTPConnection):
def test_200(self):
def test_403(self):
class LimitsViewBuilderTest(test.TestCase):
def setUp(self):
def test_build_limits(self):
def test_build_limits_empty_limits(self):
class LimitsXMLSerializationTest(test.TestCase):
def test_xml_declaration(self):
def test_index(self):
def test_index_no_limits(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\test_snapshots.py
def _get_default_snapshot_param():
def stub_snapshot_create(self, context, volume_id, name, description, metadata):
def stub_snapshot_delete(self, context, snapshot):
def stub_snapshot_get(self, context, snapshot_id):
def stub_snapshot_get_all(self, context, search_opts=None):
class SnapshotApiTest(test.TestCase):
def setUp(self):
def test_snapshot_create(self):
def test_snapshot_create_force(self):
def test_snapshot_create_without_volume_id(self):
def test_snapshot_update(self):
def test_snapshot_update_missing_body(self):
def test_snapshot_update_invalid_body(self):
def test_snapshot_update_not_found(self):
def test_snapshot_delete(self):
def test_snapshot_delete_invalid_id(self):
def test_snapshot_show(self):
def test_snapshot_show_invalid_id(self):
def test_snapshot_detail(self):
def test_snapshot_list_by_status(self):
def stub_snapshot_get_all_by_project(context, project_id):
def test_snapshot_list_by_volume(self):
def stub_snapshot_get_all_by_project(context, project_id):
def test_snapshot_list_by_name(self):
def stub_snapshot_get_all_by_project(context, project_id):
def test_admin_list_snapshots_limited_to_project(self):
def test_list_snapshots_with_limit_and_offset(self):
def list_snapshots_with_limit_and_offset(is_admin):
def test_admin_list_snapshots_all_tenants(self):
def test_all_tenants_non_admin_gets_all_tenants(self):
def test_non_admin_get_by_project(self):
def _create_snapshot_bad_body(self, body):
def test_create_no_body(self):
def test_create_missing_snapshot(self):
def test_create_malformed_entity(self):
class SnapshotSerializerTest(test.TestCase):
def _verify_snapshot(self, snap, tree):
def test_snapshot_show_create_serializer(self):
def test_snapshot_index_detail_serializer(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\test_snapshot_metadata.py
def return_create_snapshot_metadata_max(context, snapshot_id, metadata, delete):
def return_create_snapshot_metadata(context, snapshot_id, metadata, delete):
def return_create_snapshot_metadata_insensitive(context, snapshot_id, metadata, delete):
def return_new_snapshot_metadata(context, snapshot_id, metadata, delete):
def return_snapshot_metadata(context, snapshot_id):
def return_empty_snapshot_metadata(context, snapshot_id):
def return_empty_container_metadata(context, snapshot_id, metadata, delete):
def delete_snapshot_metadata(context, snapshot_id, key):
def stub_snapshot_metadata():
def stub_snapshot_metadata_insensitive():
def stub_new_snapshot_metadata():
def stub_max_snapshot_metadata():
def return_snapshot(context, snapshot_id):
def return_volume(context, volume_id):
def return_snapshot_nonexistent(context, snapshot_id):
def fake_update_snapshot_metadata(self, context, snapshot, diff):
class SnapshotMetaDataTest(test.TestCase):
def setUp(self):
def test_index(self):
def test_index_nonexistent_snapshot(self):
def test_index_no_data(self):
def test_show(self):
def test_show_nonexistent_snapshot(self):
def test_show_meta_not_found(self):
def test_delete(self):
def test_delete_nonexistent_snapshot(self):
def test_delete_meta_not_found(self):
def test_create(self):
def test_create_with_keys_in_uppercase_and_lowercase(self):
def test_create_empty_body(self):
def test_create_item_empty_key(self):
def test_create_item_key_too_long(self):
def test_create_nonexistent_snapshot(self):
def test_update_all(self):
def test_update_all_with_keys_in_uppercase_and_lowercase(self):
def test_update_all_empty_container(self):
def test_update_all_malformed_container(self):
def test_update_all_malformed_data(self):
def test_update_all_nonexistent_snapshot(self):
def test_update_item(self):
def test_update_item_nonexistent_snapshot(self):
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_invalid_metadata_items_on_create(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\test_types.py
def stub_volume_type(id):
def return_volume_types_get_all_types(context):
def return_empty_volume_types_get_all_types(context):
def return_volume_types_get_volume_type(context, id):
def return_volume_types_get_by_name(context, name):
class VolumeTypesApiTest(test.TestCase):
def setUp(self):
def test_volume_types_index(self):
def test_volume_types_index_no_data(self):
def test_volume_types_show(self):
def test_volume_types_show_not_found(self):
def test_view_builder_show(self):
def test_view_builder_list(self):
class VolumeTypesSerializerTest(test.TestCase):
def _verify_volume_type(self, vtype, tree):
def test_index_serializer(self):
def test_voltype_serializer(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\test_volumes.py
def stub_snapshot_get(self, context, snapshot_id):
class VolumeApiTest(test.TestCase):
def setUp(self):
def tearDown(self):
def test_volume_create(self):
def test_volume_create_with_type(self):
def test_volume_creation_fails_with_bad_size(self):
def test_volume_creation_fails_with_bad_availability_zone(self):
def test_volume_create_with_image_id(self):
def test_volume_create_with_image_id_is_integer(self):
def test_volume_create_with_image_id_not_uuid_format(self):
def test_volume_update(self):
def test_volume_update_deprecation(self):
def test_volume_update_deprecation_key_priority(self):
def test_volume_update_metadata(self):
def test_volume_update_with_admin_metadata(self):
def test_update_empty_body(self):
def test_update_invalid_body(self):
def test_update_not_found(self):
def test_volume_list_summary(self):
def test_volume_list_detail(self):
def test_volume_list_detail_with_admin_metadata(self):
def test_volume_index_with_marker(self):
def stub_volume_get_all_by_project(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def test_volume_index_limit(self):
def test_volume_index_limit_negative(self):
def test_volume_index_limit_non_int(self):
def test_volume_index_limit_marker(self):
def test_volume_index_limit_offset(self):
def stub_volume_get_all_by_project(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def test_volume_detail_with_marker(self):
def stub_volume_get_all_by_project(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def test_volume_detail_limit(self):
def test_volume_detail_limit_negative(self):
def test_volume_detail_limit_non_int(self):
def test_volume_detail_limit_marker(self):
def test_volume_detail_limit_offset(self):
def stub_volume_get_all_by_project(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def test_volume_with_limit_zero(self):
def stub_volume_get_all(context, marker, limit, sort_key, sort_dir):
def test_volume_default_limit(self):
def stub_volume_get_all(context, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all2(context, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all3(context, marker, limit, sort_key, sort_dir, filters=None):
def test_volume_list_default_filters(self):
def stub_volume_get_all_by_project(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all(context, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all_by_project2(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all2(context, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all_by_project3(context, project_id, marker, limit, sort_key, sort_dir, filters=None):
def stub_volume_get_all3(context, marker, limit, sort_key, sort_dir, filters=None):
def test_volume_show(self):
def test_volume_show_no_attachments(self):
def stub_volume_get(self, context, volume_id):
def test_volume_show_no_volume(self):
def test_volume_show_with_admin_metadata(self):
def test_volume_show_with_encrypted_volume(self):
def stub_volume_get(self, context, volume_id):
def test_volume_show_with_unencrypted_volume(self):
def stub_volume_get(self, context, volume_id):
def test_volume_delete(self):
def test_volume_delete_attached(self):
def stub_volume_attached(self, context, volume, force=False):
def test_volume_delete_no_volume(self):
def test_admin_list_volumes_limited_to_project(self):
def test_admin_list_volumes_all_tenants(self):
def test_all_tenants_non_admin_gets_all_tenants(self):
def test_non_admin_get_by_project(self):
def _create_volume_bad_request(self, body):
def test_create_no_body(self):
def test_create_missing_volume(self):
def test_create_malformed_entity(self):
def test_add_visible_admin_metadata_visible_key_only(self):
class VolumeSerializerTest(test.TestCase):
def _verify_volume_attachment(self, attach, tree):
def _verify_volume(self, vol, tree):
def test_volume_show_create_serializer(self):
def test_volume_index_detail_serializer(self):
class TestVolumeCreateRequestXMLDeserializer(test.TestCase):
def setUp(self):
def test_minimal_volume(self):
def test_name(self):
def test_description(self):
def test_volume_type(self):
def test_availability_zone(self):
def test_metadata(self):
def test_full_volume(self):
def test_imageref(self):
def test_snapshot_id(self):
def test_source_volid(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\test_volume_metadata.py
def return_create_volume_metadata_max(context, volume_id, metadata, delete):
def return_create_volume_metadata(context, volume_id, metadata, delete):
def return_new_volume_metadata(context, volume_id, metadata, delete):
def return_create_volume_metadata_insensitive(context, snapshot_id, metadata, delete):
def return_volume_metadata(context, volume_id):
def return_empty_volume_metadata(context, volume_id):
def return_empty_container_metadata(context, volume_id, metadata, delete):
def delete_volume_metadata(context, volume_id, key):
def stub_volume_metadata():
def stub_new_volume_metadata():
def stub_volume_metadata_insensitive():
def stub_max_volume_metadata():
def return_volume(context, volume_id):
def return_volume_nonexistent(context, volume_id):
def fake_update_volume_metadata(self, context, volume, diff):
class volumeMetaDataTest(test.TestCase):
def setUp(self):
def test_index(self):
def test_index_nonexistent_volume(self):
def test_index_no_data(self):
def test_show(self):
def test_show_nonexistent_volume(self):
def test_show_meta_not_found(self):
def test_delete(self):
def test_delete_nonexistent_volume(self):
def test_delete_meta_not_found(self):
def test_create(self):
def test_create_with_keys_in_uppercase_and_lowercase(self):
def test_create_empty_body(self):
def test_create_item_empty_key(self):
def test_create_item_key_too_long(self):
def test_create_nonexistent_volume(self):
def test_update_all(self):
def test_update_all_with_keys_in_uppercase_and_lowercase(self):
def test_update_all_empty_container(self):
def test_update_all_malformed_container(self):
def test_update_all_malformed_data(self):
def test_update_all_nonexistent_volume(self):
def test_update_item(self):
def test_update_item_nonexistent_volume(self):
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_invalid_metadata_items_on_create(self):
\OpenStack\cinder-2014.1\cinder\tests\api\v2\__init__.py
\OpenStack\cinder-2014.1\cinder\tests\api\__init__.py
\OpenStack\cinder-2014.1\cinder\tests\backup\fake_service.py
class FakeBackupService(BackupDriver):
def __init__(self, context, db_driver=None):
def backup(self, backup, volume_file):
def restore(self, backup, volume_id, volume_file):
def delete(self, backup):
def get_backup_driver(context):
\OpenStack\cinder-2014.1\cinder\tests\backup\fake_swift_client.py
class FakeSwiftClient(object):
def __init__(self, *args, **kwargs):
def Connection(self, *args, **kargs):
class FakeSwiftConnection(object):
def __init__(self, *args, **kwargs):
def head_container(self, container):
def put_container(self, container):
def get_container(self, container, **kwargs):
def head_object(self, container, name):
def get_object(self, container, name):
def put_object(self, container, name, reader, content_length=None, etag=None, chunk_size=None, content_type=None, headers=None, query_string=None):
def delete_object(self, container, name):
\OpenStack\cinder-2014.1\cinder\tests\backup\__init__.py
\OpenStack\cinder-2014.1\cinder\tests\brick\fake_lvm.py
class FakeBrickLVM(object):
def __init__(self, vg_name, create, pv_list, vtype, execute=None):
def supports_thin_provisioning():
def get_all_volumes(vg_name=None):
def get_volumes(self):
def get_volume(self, name):
def get_all_physical_volumes(vg_name=None):
def get_physical_volumes(self):
def get_all_volume_groups(vg_name=None):
def update_volume_group_info(self):
def create_thin_pool(self, name=None, size_str=0):
def create_volume(self, name, size_str, lv_type='default', mirror_count=0):
def create_lv_snapshot(self, name, source_lv_name, lv_type='default'):
def delete(self, name):
def revert(self, snapshot_name):
def lv_has_snapshot(self, name):
def activate_lv(self, lv, is_snapshot=False):
def rename_volume(self, lv_name, new_name):
\OpenStack\cinder-2014.1\cinder\tests\brick\test_brick_connector.py
class ConnectorTestCase(test.TestCase):
def setUp(self):
def fake_execute(self, *cmd, **kwargs):
def test_connect_volume(self):
def test_disconnect_volume(self):
def test_factory(self):
def test_check_valid_device_with_wrong_path(self):
def test_check_valid_device(self):
def test_check_valid_device_with_cmd_error(self):
def raise_except(*args, **kwargs):
class HostDriverTestCase(test.TestCase):
def setUp(self):
def test_host_driver(self):
class ISCSIConnectorTestCase(ConnectorTestCase):
def setUp(self):
def tearDown(self):
def iscsi_connection(self, volume, location, iqn):
def test_get_initiator(self):
def initiator_no_file(*args, **kwargs):
def initiator_get_text(*arg, **kwargs):
def test_connect_volume(self):
def test_connect_volume_with_multipath(self):
def test_connect_volume_with_not_found_device(self):
def test_get_target_portals_from_iscsiadm_output(self):
def test_get_multipath_device_name(self):
def test_get_iscsi_devices(self):
def test_get_iscsi_devices_with_empty_dir(self):
def test_get_multipath_iqn(self):
def test_disconnect_volume_multipath_iscsi(self):
def fake_disconnect_from_iscsi_portal(properties):
def test_disconnect_volume_multipath_iscsi_without_other_mp_devices(self):
def fake_disconnect_from_iscsi_portal(properties):
class FibreChannelConnectorTestCase(ConnectorTestCase):
def setUp(self):
def fake_get_fc_hbas(self):
def fake_get_fc_hbas_info(self):
def fibrechan_connection(self, volume, location, wwn):
def test_connect_volume(self):
class FakeFixedIntervalLoopingCall(object):
def __init__(self, f=None, *args, **kw):
def stop(self):
def wait(self):
def start(self, interval, initial_delay=None):
class AoEConnectorTestCase(ConnectorTestCase):
def setUp(self):
def tearDown(self):
def _mock_path_exists(self, aoe_path, mock_values=[]):
def test_connect_volume(self):
def test_connect_volume_without_path(self):
def test_connect_volume_could_not_discover_path(self):
def test_disconnect_volume(self):
class RemoteFsConnectorTestCase(ConnectorTestCase):
def setUp(self):
def tearDown(self):
def test_connect_volume(self):
def test_disconnect_volume(self):
class LocalConnectorTestCase(test.TestCase):
def setUp(self):
def test_connect_volume(self):
def test_connect_volume_with_invalid_connection_data(self):
\OpenStack\cinder-2014.1\cinder\tests\brick\test_brick_exception.py
class BrickExceptionTestCase(test.TestCase):
def test_default_error_msg(self):
def test_error_msg(self):
def test_default_error_msg_with_kwargs(self):
def test_error_msg_exception_with_kwargs(self):
def test_default_error_code(self):
def test_error_code_from_kwarg(self):
\OpenStack\cinder-2014.1\cinder\tests\brick\test_brick_linuxfc.py
class LinuxFCTestCase(test.TestCase):
def setUp(self):
def fake_execute(self, *cmd, **kwargs):
def test_rescan_hosts(self):
def test_get_fc_hbas_fail(self):
def fake_exec1(a, b, c, d, run_as_root=True, root_helper='sudo'):
def fake_exec2(a, b, c, d, run_as_root=True, root_helper='sudo'):
def test_get_fc_hbas(self):
def fake_exec(a, b, c, d, run_as_root=True, root_helper='sudo'):
def test_get_fc_hbas_info(self):
def fake_exec(a, b, c, d, run_as_root=True, root_helper='sudo'):
def test_get_fc_wwpns(self):
def fake_exec(a, b, c, d, run_as_root=True, root_helper='sudo'):
def test_get_fc_wwnns(self):
def fake_exec(a, b, c, d, run_as_root=True, root_helper='sudo'):
\OpenStack\cinder-2014.1\cinder\tests\brick\test_brick_linuxscsi.py
class LinuxSCSITestCase(test.TestCase):
def setUp(self):
def fake_execute(self, *cmd, **kwargs):
def test_echo_scsi_command(self):
def test_get_name_from_path(self):
def test_remove_scsi_device(self):
def test_flush_multipath_device(self):
def test_flush_multipath_devices(self):
def test_remove_multipath_device(self):
def fake_find_multipath_device(device):
def test_find_multipath_device_3par(self):
def fake_execute(*cmd, **kwargs):
def fake_execute2(*cmd, **kwargs):
def test_find_multipath_device_svc(self):
def fake_execute(*cmd, **kwargs):
def test_find_multipath_device_ds8000(self):
def fake_execute(*cmd, **kwargs):
\OpenStack\cinder-2014.1\cinder\tests\brick\test_brick_lvm.py
def create_configuration():
class BrickLvmTestCase(test.TestCase):
def setUp(self):
def failed_fake_execute(obj, *cmd, **kwargs):
def fake_pretend_lvm_version(obj, *cmd, **kwargs):
def fake_old_lvm_version(obj, *cmd, **kwargs):
def fake_customised_lvm_version(obj, *cmd, **kwargs):
def fake_execute(obj, *cmd, **kwargs):
def test_create_lv_snapshot(self):
def test_vg_exists(self):
def test_get_vg_uuid(self):
def test_get_all_volumes(self):
def test_get_volume(self):
def test_get_all_physical_volumes(self):
def test_get_physical_volumes(self):
def test_get_volume_groups(self):
def test_thin_support(self):
def test_snapshot_lv_activate_support(self):
def test_lvchange_ignskipact_support_yes(self):
def test_thin_pool_creation(self):
def test_thin_pool_free_space(self):
def test_volume_create_after_thin_creation(self):
def executor(obj, *cmd, **kwargs):
def test_lv_has_snapshot(self):
def test_activate_lv(self):
def test_get_mirrored_available_capacity(self):
\OpenStack\cinder-2014.1\cinder\tests\brick\test_brick_remotefs.py
class BrickRemoteFsTestCase(test.TestCase):
def setUp(self):
def test_get_hash_str(self):
def test_get_mount_point(self):
def test_mount_nfs_should_mount_correctly(self):
def test_mount_nfs_with_specific_vers(self):
def test_mount_nfs_with_fallback_no_vers(self):
def execute(*args, **kwargs):
def test_mount_nfs_with_fallback_all_fail(self):
def execute(*args, **kwargs):
def test_mount_nfs_should_not_remount(self):
def test_nfs_mount_options(self):
def test_nfs_mount_point_base(self):
def test_glusterfs_mount_point_base(self):
\OpenStack\cinder-2014.1\cinder\tests\brick\__init__.py
\OpenStack\cinder-2014.1\cinder\tests\cast_as_call.py
def mock_cast_as_call(obj=None):
\OpenStack\cinder-2014.1\cinder\tests\compute\test_nova.py
class FakeNovaClient(object):
def __init__(self):
def create_volume_snapshot(self, *args, **kwargs):
def delete_volume_snapshot(self, *args, **kwargs):
class NovaApiTestCase(test.TestCase):
def setUp(self):
def test_update_server_volume(self):
\OpenStack\cinder-2014.1\cinder\tests\compute\__init__.py
\OpenStack\cinder-2014.1\cinder\tests\conf_fixture.py
def set_defaults(conf):
\OpenStack\cinder-2014.1\cinder\tests\db\fakes.py
class FakeModel(object):
def __init__(self, values):
def __getattr__(self, name):
def __getitem__(self, key):
def __repr__(self):
def stub_out(stubs, funcs):
\OpenStack\cinder-2014.1\cinder\tests\db\test_finish_migration.py
class FinishVolumeMigrationTestCase(test.TestCase):
def setUp(self):
def tearDown(self):
def test_finish_volume_migration(self):
\OpenStack\cinder-2014.1\cinder\tests\db\test_name_id.py
class NameIDsTestCase(test.TestCase):
def setUp(self):
def tearDown(self):
def test_name_id_same(self):
def test_name_id_diff(self):
def test_name_id_snapshot_volume_name(self):
\OpenStack\cinder-2014.1\cinder\tests\db\test_qos_specs.py
def fake_qos_specs_get_by_name(context, name, session=None, inactive=False):
class QualityOfServiceSpecsTableTestCase(test.TestCase):
def setUp(self):
def tearDown(self):
def _create_qos_specs(self, name, values=None):
def test_qos_specs_create(self):
def test_qos_specs_get(self):
def test_qos_specs_get_all(self):
def test_qos_specs_get_by_name(self):
def test_qos_specs_delete(self):
def test_qos_specs_item_delete(self):
def test_associate_type_with_qos(self):
def test_qos_associations_get(self):
def test_qos_specs_disassociate(self):
def test_qos_specs_disassociate_all(self):
def test_qos_specs_update(self):
\OpenStack\cinder-2014.1\cinder\tests\db\test_transfers.py
class TransfersTableTestCase(test.TestCase):
def setUp(self):
def tearDown(self):
def _create_transfer(self, volume_id=None):
def test_transfer_create(self):
def test_transfer_create_not_available(self):
def test_transfer_get(self):
def test_transfer_get_all(self):
def test_transfer_destroy(self):
OpenStack IndexPreviousNext
|