¡@

Home 

OpenStack Study: nova

OpenStack Index

Previous

Next

def fake_delete_snapshot(self, context, snapshot_id):

def fake_compute_volume_snapshot_delete(self, context, volume_id, snapshot_id, delete_info):

def fake_compute_volume_snapshot_create(self, context, volume_id, create_info):

def fake_bdms_get_all_by_instance(context, instance_uuid, use_slave=False):

class BootFromVolumeTest(test.TestCase):

    def setUp(self):

    def _get_fake_compute_api_create(self):

        def _fake_compute_api_create(cls, context, instance_type, image_href, **kwargs):

    def test_create_root_volume(self):

    def test_create_root_volume_bdm_v2(self):

class VolumeApiTest(test.TestCase):

    def setUp(self):

    def test_volume_create(self):

    def test_volume_create_bad(self):

        def fake_volume_create(self, context, size, name, description, snapshot, **param):

    def test_volume_index(self):

    def test_volume_detail(self):

    def test_volume_show(self):

    def test_volume_show_no_volume(self):

    def test_volume_delete(self):

    def test_volume_delete_no_volume(self):

class VolumeAttachTests(test.TestCase):

    def setUp(self):

    def test_show(self):

    def test_detach(self):

    def test_detach_vol_not_found(self):

    def test_detach_vol_root(self, mock_isroot):

    def test_detach_volume_from_locked_server(self):

        def fake_detach_volume_from_locked_server(self, context, instance, volume):

    def test_attach_volume(self):

    def test_attach_volume_to_locked_server(self):

        def fake_attach_volume_to_locked_server(self, context, instance, volume_id, device=None):

    def test_attach_volume_bad_id(self):

    def test_attach_volume_without_volumeId(self):

    def _test_swap(self, uuid=FAKE_UUID_A, fake_func=None, body=None):

    def test_swap_volume_for_locked_server(self):

        def fake_swap_volume_for_locked_server(self, context, instance, old_volume, new_volume):

    def test_swap_volume_no_extension(self):

    def test_swap_volume(self):

    def test_swap_volume_no_attachment(self):

    def test_swap_volume_without_volumeId(self):

class VolumeSerializerTest(test.TestCase):

    def _verify_volume_attachment(self, attach, tree):

    def _verify_volume(self, vol, tree):

    def test_attach_show_create_serializer(self):

    def test_attach_index_serializer(self):

    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):

class CommonUnprocessableEntityTestCase(object):

    def setUp(self):

    def _unprocessable_create(self, body):

    def test_create_no_body(self):

    def test_create_missing_volume(self):

    def test_create_malformed_entity(self):

class UnprocessableVolumeTestCase(CommonUnprocessableEntityTestCase, test.TestCase):

class UnprocessableAttachmentTestCase(CommonUnprocessableEntityTestCase, test.TestCase):

class UnprocessableSnapshotTestCase(CommonUnprocessableEntityTestCase, test.TestCase):

class ShowSnapshotTestCase(test.TestCase):

    def setUp(self):

    def test_show_snapshot_not_exist(self):

        def fake_get_snapshot(self, context, id):

class CreateSnapshotTestCase(test.TestCase):

    def setUp(self):

    def test_force_true(self):

    def test_force_false(self):

    def test_force_invalid(self):

class DeleteSnapshotTestCase(test.TestCase):

    def setUp(self):

    def test_normal_delete(self):

    def test_delete_snapshot_not_exists(self):

        def fake_delete_snapshot_not_exist(self, context, snapshot_id):

class AssistedSnapshotCreateTestCase(test.TestCase):

    def setUp(self):

    def test_assisted_create(self):

    def test_assisted_create_missing_create_info(self):

class AssistedSnapshotDeleteTestCase(test.TestCase):

    def setUp(self):

    def test_assisted_delete(self):

    def test_assisted_delete_missing_delete_info(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\__init__.py

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\extensions\foxinsocks.py

class FoxInSocksController(object):

    def index(self, req):

class FoxInSocksServerControllerExtension(wsgi.Controller):

    def _add_tweedle(self, req, id, body):

    def _delete_tweedle(self, req, id, body):

    def _fail(self, req, id, body):

class FoxInSocksFlavorGooseControllerExtension(wsgi.Controller):

    def show(self, req, resp_obj, id):

class FoxInSocksFlavorBandsControllerExtension(wsgi.Controller):

    def show(self, req, resp_obj, id):

class Foxinsocks(extensions.ExtensionDescriptor):

    def __init__(self, ext_mgr):

    def get_resources(self):

    def get_controller_extensions(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\extensions\__init__.py

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\admin_only_action_common.py

class CommonMixin(object):

    def setUp(self):

    def _make_request(self, url, body):

    def _stub_instance_get(self, uuid=None):

    def _stub_instance_get_failure(self, exc_info, uuid=None):

    def _test_non_existing_instance(self, action, body_map=None):

    def _test_action(self, action, body=None, method=None, compute_api_args_map={}):

    def _test_invalid_state(self, action, method=None, body_map=None, compute_api_args_map=None):

    def _test_locked_instance(self, action, method=None, body=None, compute_api_args_map={}):

class CommonTests(CommonMixin, test.NoDBTestCase):

    def _test_actions(self, actions, method_translations={}, body_map={}, args_map={}):

    def _test_actions_with_non_existed_instance(self, actions, body_map={}):

    def _test_actions_raise_conflict_on_invalid_state( self, actions, method_translations={}, body_map={}, args_map={}):

    def _test_actions_with_locked_instance(self, actions, method_translations={}, body_map={}, args_map={}):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_access_ips.py

class AccessIPsExtTest(test.NoDBTestCase):

    def setUp(self):

    def _test(self, func):

    def _test_with_ipv4_only(self, func):

    def _test_with_ipv6_only(self, func):

    def _test_without_ipv4_and_ipv6(self, func):

    def _test_with_invalid_ipv4(self, func):

    def _test_with_invalid_ipv6(self, func):

    def _test_with_ipv4_null(self, func):

    def _test_with_ipv6_null(self, func):

    def _test_with_ipv4_blank(self, func):

    def _test_with_ipv6_blank(self, func):

    def test_server_create(self):

    def test_server_create_with_ipv4_only(self):

    def test_server_create_with_ipv6_only(self):

    def test_server_create_without_ipv4_and_ipv6(self):

    def test_server_create_with_invalid_ipv4(self):

    def test_server_create_with_invalid_ipv6(self):

    def test_server_create_with_ipv4_null(self):

    def test_server_create_with_ipv6_null(self):

    def test_server_create_with_ipv4_blank(self):

    def test_server_create_with_ipv6_blank(self):

    def test_server_update(self):

    def test_server_update_with_ipv4_only(self):

    def test_server_update_with_ipv6_only(self):

    def test_server_update_without_ipv4_and_ipv6(self):

    def test_server_update_with_invalid_ipv4(self):

    def test_server_update_with_invalid_ipv6(self):

    def test_server_update_with_ipv4_null(self):

    def test_server_update_with_ipv6_null(self):

    def test_server_update_with_ipv4_blank(self):

    def test_server_update_with_ipv6_blank(self):

    def test_server_rebuild(self):

    def test_server_rebuild_with_ipv4_only(self):

    def test_server_rebuild_with_ipv6_only(self):

    def test_server_rebuild_without_ipv4_and_ipv6(self):

    def test_server_rebuild_with_invalid_ipv4(self):

    def test_server_rebuild_with_invalid_ipv6(self):

    def test_server_rebuild_with_ipv4_null(self):

    def test_server_rebuild_with_ipv6_null(self):

    def test_server_rebuild_with_ipv4_blank(self):

    def test_server_rebuild_with_ipv6_blank(self):

class AccessIPsControllerTest(test.NoDBTestCase):

    def setUp(self):

    def _test_with_access_ips(self, func, kwargs={'id':

    def _test_without_access_ips(self, func, kwargs={'id':

    def test_create(self):

    def test_create_without_access_ips(self):

    def test_create_with_reservation_id(self):

    def test_show(self):

    def test_show_without_access_ips(self):

    def test_detail(self):

    def test_detail_without_access_ips(self):

    def test_update(self):

    def test_update_without_access_ips(self):

    def test_rebuild(self):

    def test_rebuild_without_access_ips(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_admin_actions.py

class CommonMixin(object):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def _make_request(self, url, body):

    def _stub_instance_get(self, uuid=None):

    def _stub_instance_get_failure(self, exc_info, uuid=None):

    def _test_non_existing_instance(self, action, body_map=None):

    def _test_action(self, action, body=None, method=None):

    def _test_invalid_state(self, action, method=None, body_map=None, compute_api_args_map=None):

    def _test_locked_instance(self, action, method=None):

class AdminActionsTest(CommonMixin, test.NoDBTestCase):

    def test_actions(self):

    def test_actions_with_non_existed_instance(self):

    def test_actions_with_locked_instance(self):

class ResetStateTests(test.NoDBTestCase):

    def setUp(self):

    def test_no_state(self):

    def test_bad_state(self):

    def test_no_instance(self):

    def _setup_mock(self, expected):

        def check_state(admin_state_reset=True):

    def test_reset_active(self):

    def test_reset_error(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_admin_password.py

def fake_get(self, context, id, expected_attrs=None, want_objects=False):

def fake_get_non_existent(self, context, id, expected_attrs=None, want_objects=False):

def fake_set_admin_password(self, context, instance, password=None):

def fake_set_admin_password_failed(self, context, instance, password=None):

def fake_set_admin_password_not_implemented(self, context, instance, password=None):

class AdminPasswordTest(test.NoDBTestCase):

    def setUp(self):

    def _make_request(self, url, body):

    def test_change_password(self):

    def test_change_password_empty_string(self):

    def test_change_password_with_non_implement(self):

    def test_change_password_with_non_existed_instance(self):

    def test_change_password_with_non_string_password(self):

    def test_change_password_failed(self):

    def test_change_password_without_admin_password(self):

    def test_change_password_none(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_agents.py

def fake_agent_build_get_all(context, hypervisor):

def fake_agent_build_update(context, agent_build_id, values):

def fake_agent_build_destroy(context, agent_update_id):

def fake_agent_build_create(context, values):

class FakeRequest(object):

class FakeRequestWithHypervisor(object):

def fake_agent_build_create_with_exited_agent(context, values):

class AgentsTest(test.NoDBTestCase):

    def setUp(self):

    def test_agents_create(self):

    def test_agents_create_with_existed_agent(self):

    def test_agents_create_without_md5hash(self):

    def test_agents_create_without_url(self):

    def test_agents_create_without_version(self):

    def test_agents_create_without_architecture(self):

    def test_agents_create_without_os(self):

    def test_agents_create_without_hypervisor(self):

    def test_agents_create_with_wrong_type(self):

    def test_agents_create_with_empty_type(self):

    def _test_agents_create_with_invalid_length(self, key):

    def test_agents_create_with_invalid_length_hypervisor(self):

    def test_agents_create_with_invalid_length_os(self):

    def test_agents_create_with_invalid_length_architecture(self):

    def test_agents_create_with_invalid_length_version(self):

    def test_agents_create_with_invalid_length_url(self):

    def test_agents_create_with_invalid_length_md5hash(self):

    def test_agents_delete(self):

    def test_agents_list(self):

    def test_agents_list_with_hypervisor(self):

    def test_agents_update(self):

    def test_agents_update_without_md5hash(self):

    def test_agents_update_without_url(self):

    def test_agents_update_without_version(self):

    def test_agents_update_with_wrong_type(self):

    def test_agents_update_with_empty(self):

    def _test_agents_update_with_invalid_length(self, key):

    def test_agents_update_with_invalid_length_version(self):

    def test_agents_update_with_invalid_length_url(self):

    def test_agents_update_with_invalid_length_md5hash(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_aggregates.py

class AggregateTestCase(test.NoDBTestCase):

    def setUp(self):

    def test_index(self):

        def stub_list_aggregates(context):

    def test_index_no_admin(self):

    def test_create(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_no_admin(self):

    def test_create_with_duplicate_aggregate_name(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_with_incorrect_availability_zone(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_with_no_aggregate(self):

    def test_create_with_no_name(self):

    def test_create_with_no_availability_zone(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_with_null_name(self):

    def test_create_with_name_too_long(self):

    def test_show(self):

        def stub_get_aggregate(context, id):

    def test_show_no_admin(self):

    def test_show_with_invalid_id(self):

        def stub_get_aggregate(context, id):

    def test_update(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_update_no_admin(self):

    def test_update_with_only_name(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_update_with_only_availability_zone(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_update_with_no_updates(self):

    def test_update_with_wrong_updates(self):

    def test_update_with_null_name(self):

    def test_update_with_name_too_long(self):

    def test_update_with_bad_aggregate(self):

        def stub_update_aggregate(context, aggregate, metadata):

    def test_update_with_duplicated_name(self):

        def stub_update_aggregate(context, aggregate, metadata):

    def test_update_with_invalid_request(self):

    def test_add_host(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_no_admin(self):

    def test_add_host_with_already_added_host(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_with_bad_aggregate(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_with_bad_host(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_with_missing_host(self):

    def test_add_host_with_invalid_request(self):

    def test_add_host_with_non_string(self):

    def test_remove_host(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_no_admin(self):

    def test_remove_host_with_host_not_in_aggregate(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_with_bad_host(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_with_invalid_request(self):

    def test_remove_host_with_missing_host(self):

    def test_remove_host_with_missing_host(self):

    def test_set_metadata(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_set_metadata_no_admin(self):

    def test_set_metadata_with_bad_aggregate(self):

        def stub_update_aggregate(context, aggregate, metadata):

    def test_set_metadata_with_missing_metadata(self):

    def test_set_metadata_with_invalid_request(self):

    def test_set_metadata_without_dict(self):

    def test_delete_aggregate(self):

        def stub_delete_aggregate(context, aggregate):

    def test_delete_aggregate_no_admin(self):

    def test_delete_aggregate_with_bad_aggregate(self):

        def stub_delete_aggregate(context, aggregate):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_attach_interfaces.py

def fake_list_ports(self, *args, **kwargs):

def fake_show_port(self, context, port_id, **kwargs):

def fake_attach_interface(self, context, instance, network_id, port_id, requested_ip='192.168.1.3'):

def fake_detach_interface(self, context, instance, port_id):

def fake_get_instance(self, *args, **kwargs):

class InterfaceAttachTests(test.NoDBTestCase):

    def setUp(self):

    def test_item_instance_not_found(self):

        def fake_get_instance_exception(self, context, instance_uuid, **kwargs):

    def test_show(self):

    def test_show_instance_not_found(self):

        def fake_get_instance_exception(self, context, instance_uuid, **kwargs):

    def test_show_invalid(self):

    def test_delete(self):

    def test_delete_interface_not_found(self):

    def test_delete_instance_not_found(self):

        def fake_get_instance_exception(self, context, instance_uuid, **kwargs):

    def test_attach_interface_without_network_id(self):

    def test_attach_interface_with_network_id(self):

    def test_attach_interface_with_port_and_network_id(self):

    def test_attach_interface_instance_not_found(self):

        def fake_get_instance_exception(self, context, instance_uuid, **kwargs):

    def test_attach_interface_with_invalid_data(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_availability_zone.py

def fake_gen_uuid():

def fake_get_availability_zones(context):

def return_security_group(context, instance_id, security_group_id):

def fake_service_get_all(context, disabled=None):

 def __fake_service(binary, availability_zone, created_at, updated_at, host, disabled):

def fake_service_is_up(self, service):

def fake_set_availability_zones(context, services):

class AvailabilityZoneApiTest(test.TestCase):

    def setUp(self):

    def test_filtered_availability_zones(self):

    def test_availability_zone_index(self):

    def test_availability_zone_detail(self):

        def _formatZone(zone_dict):

        def _assertZone(zone, name, status):

    def test_availability_zone_detail_no_services(self):

class ServersControllerCreateTest(test.TestCase):

    def setUp(self):

        def instance_create(context, inst):

        def instance_get(context, instance_id):

        def instance_update(context, uuid, values):

        def server_update(context, instance_uuid, params):

        def fake_method(*args, **kwargs):

        def project_get_networks(context, user_id):

        def queue_get_for(context, *args):

    def _test_create_extra(self, params, no_image=False, override_controller=None):

    def test_create_instance_with_availability_zone_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_availability_zone(self):

        def create(*args, **kwargs):

    def test_create_instance_without_availability_zone(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_block_device_mapping.py

class BlockDeviceMappingTest(test.TestCase):

    def setUp(self):

    def _test_create(self, params, no_image=False, override_controller=None):

    def test_create_instance_with_block_device_mapping_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_volumes_enabled_no_image(self):

        def create(*args, **kwargs):

    def test_create_instance_with_bdms_and_no_image(self):

        def create(*args, **kwargs):

    def test_create_instance_with_device_name_not_string(self):

        def create(*args, **kwargs):

    def test_create_instance_with_device_name_empty(self):

        def create(*args, **kwargs):

    def test_create_instance_with_device_name_too_long(self):

        def create(*args, **kwargs):

    def test_create_instance_with_space_in_device_name(self):

        def create(*args, **kwargs):

    def test_create_instance_with_invalid_size(self):

        def create(*args, **kwargs):

    def test_create_instance_bdm(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_bdm_missing_device_name(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_bdm_validation_error(self):

        def _validate(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_cells.py

class BaseCellsTest(test.NoDBTestCase):

    def setUp(self):

        def fake_cell_get(_self, context, cell_name):

        def fake_cell_create(_self, context, values):

        def fake_cell_update(_self, context, cell_id, values):

        def fake_cells_api_get_all_cell_info(*args):

    def _get_all_cell_info(self, *args):

        def insecure_transport_url(url):

class CellsTest(BaseCellsTest):

    def setUp(self):

    def _get_request(self, resource):

    def test_index(self):

    def test_detail(self):

    def test_show_bogus_cell_raises(self):

    def test_get_cell_by_name(self):

    def test_cell_delete(self):

        def fake_cell_delete(inst, context, cell_name):

    def test_delete_bogus_cell_raises(self):

        def fake_cell_delete(inst, context, cell_name):

    def test_cell_create_parent(self):

    def test_cell_create_child(self):

    def test_cell_create_no_name_raises(self):

    def test_cell_create_name_empty_string_raises(self):

    def test_cell_create_name_with_bang_raises(self):

    def test_cell_create_name_with_dot_raises(self):

    def test_cell_create_name_with_invalid_type_raises(self):

    def test_cell_update(self):

    def test_cell_update_empty_name_raises(self):

    def test_cell_update_invalid_type_raises(self):

    def test_cell_update_without_type_specified(self):

    def test_cell_update_with_type_specified(self):

    def test_cell_info(self):

    def test_show_capacities(self):

    def test_show_capacity_fails_with_non_admin_context(self):

    def test_show_capacities_for_invalid_cell(self):

    def test_show_capacities_for_cell(self):

    def test_sync_instances(self):

        def sync_instances(self, context, **kwargs):

    def test_cells_disabled(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_certificates.py

class CertificatesTest(test.NoDBTestCase):

    def setUp(self):

    def test_translate_certificate_view(self):

    def test_certificates_show_root(self):

    def test_certificates_show_policy_failed(self):

    def test_certificates_create_certificate(self):

    def test_certificates_create_policy_failed(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_config_drive.py

def fake_gen_uuid():

def return_security_group(context, instance_id, security_group_id):

class ConfigDriveTest(test.TestCase):

    def setUp(self):

    def test_show(self):

    def test_detail_servers(self):

class ServersControllerCreateTest(test.TestCase):

    def setUp(self):

        def instance_create(context, inst):

        def instance_get(context, instance_id):

        def instance_update(context, uuid, values):

        def server_update(context, instance_uuid, params):

        def fake_method(*args, **kwargs):

        def project_get_networks(context, user_id):

        def queue_get_for(context, *args):

    def _test_create_extra(self, params, no_image=False, override_controller=None):

    def test_create_instance_with_config_drive_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_config_drive(self):

        def create(*args, **kwargs):

    def test_create_instance_with_bad_config_drive(self):

    def test_create_instance_without_config_drive(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_consoles.py

class FakeInstanceDB(object):

    def __init__(self):

    def return_server_by_id(self, context, id):

    def return_server_by_uuid(self, context, uuid):

    def _add_server(self, id=None, uuid=None):

def stub_instance(id, user_id='fake', project_id='fake', host=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):

class ConsolesControllerTest(test.NoDBTestCase):

    def setUp(self):

    def test_create_console(self):

        def fake_create_console(cons_self, context, instance_id):

    def test_create_console_unknown_instance(self):

        def fake_create_console(cons_self, context, instance_id):

    def test_show_console(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

    def test_show_console_unknown_console(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

    def test_show_console_unknown_instance(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

    def test_list_consoles(self):

        def fake_get_consoles(cons_self, context, instance_id):

    def test_list_consoles_unknown_instance(self):

        def fake_get_consoles(cons_self, context, instance_id):

    def test_delete_console(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

        def fake_delete_console(cons_self, context, instance_id, console_id):

    def test_delete_console_unknown_console(self):

        def fake_delete_console(cons_self, context, instance_id, console_id):

    def test_delete_console_unknown_instance(self):

        def fake_delete_console(cons_self, context, instance_id, console_id):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_console_auth_tokens.py

def _fake_check_token(self, context, token):

def _fake_check_token_not_found(self, context, token):

def _fake_check_token_unauthorized(self, context, token):

class ConsoleAuthTokensExtensionTest(test.TestCase):

    def setUp(self):

    def _get_admin_context(self):

    def _create_request(self):

    def test_get_console_connect_info(self):

    def test_get_console_connect_info_token_not_found(self):

    def test_get_console_connect_info_unauthorized_console_type(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_console_output.py

def fake_get_console_output(self, _context, _instance, tail_length):

def fake_get_console_output_not_ready(self, _context, _instance, tail_length):

def fake_get_console_output_all_characters(self, _ctx, _instance, _tail_len):

def fake_get(self, context, instance_uuid, expected_attrs=None, want_objects=False):

def fake_get_not_found(*args, **kwargs):

class ConsoleOutputExtensionTest(test.NoDBTestCase):

    def setUp(self):

    def _create_request(self, length_dict={}):

    def test_get_text_console_instance_action(self):

    def test_get_console_output_with_tail(self):

    def test_get_console_output_with_length_as_str(self):

    def test_get_console_output_with_non_integer_length(self):

    def test_get_text_console_no_instance(self):

    def test_get_text_console_bad_body(self):

    def test_get_console_output_not_ready(self):

    def test_get_console_output_with_length_as_float(self):

    def test_get_console_output_not_implemented(self):

    def test_get_console_output_with_negative_length(self):

    def test_get_console_output_with_boolean_length(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_create_backup.py

class CreateBackupTests(admin_only_action_common.CommonMixin, test.NoDBTestCase):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def _make_url(self, uuid=None):

    def test_create_backup_with_metadata(self):

    def test_create_backup_no_name(self):

    def test_create_backup_no_rotation(self):

    def test_create_backup_negative_rotation(self):

    def test_create_backup_no_backup_type(self):

    def test_create_backup_bad_entity(self):

    def test_create_backup_rotation_is_zero(self):

    def test_create_backup_rotation_is_positive(self):

    def test_create_backup_raises_conflict_on_invalid_state(self):

    def test_create_backup_with_non_existed_instance(self):

    def test_create_backup_with_invalid_create_backup(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_deferred_delete.py

class FakeRequest(object):

    def __init__(self, context):

class DeferredDeleteExtensionTest(test.NoDBTestCase):

    def setUp(self):

    def test_force_delete(self):

    def test_force_delete_instance_not_found(self):

    def test_force_delete_raises_conflict_on_invalid_state(self):

    def test_restore(self):

    def test_restore_instance_not_found(self):

    def test_restore_raises_conflict_on_invalid_state(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_evacuate.py

def fake_compute_api(*args, **kwargs):

def fake_compute_api_get(self, context, instance_id, expected_attrs=None, want_objects=False):

def fake_service_get_by_compute_host(self, context, host):

class EvacuateTest(test.NoDBTestCase):

    def setUp(self):

    def _fake_update(self, context, instance, task_state, expected_task_state):

    def _gen_request_with_app(self, json_load, is_admin=True):

    def test_evacuate_instance_with_no_target(self):

    def test_evacuate_instance_with_empty_host(self):

    def test_evacuate_instance_with_too_long_host(self):

    def test_evacuate_instance_with_invalid_characters_host(self):

    def test_evacuate_instance_with_invalid_on_shared_storage(self):

    def test_evacuate_instance_without_on_shared_storage(self):

    def test_evacuate_instance_with_bad_host(self):

    def test_evacuate_instance_with_target(self):

    def test_evacuate_instance_with_underscore_in_hostname(self):

    def test_evacuate_shared_and_pass(self):

    def test_evacuate_not_shared_pass_generated(self):

    def test_evacuate_shared(self):

    def test_evacuate_with_active_service(self):

        def fake_evacuate(*args, **kwargs):

    def test_not_admin(self):

    def test_evacuate_disable_password_return(self):

    def test_evacuate_enable_password_return(self):

    def _test_evacuate_enable_instance_password_conf(self, enable_pass):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_extended_availability_zone.py

def fake_compute_get_az(*args, **kwargs):

def fake_compute_get_empty(*args, **kwargs):

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

def fake_get_host_availability_zone(context, host):

def fake_get_no_host_availability_zone(context, host):

class ExtendedAvailabilityZoneTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertAvailabilityZone(self, server, az):

    def test_show_no_host_az(self):

    def test_show_empty_host_az(self):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_extended_server_attributes.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ExtendedServerAttributesTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertServerAttributes(self, server, host, node, instance_name):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_extended_status.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ExtendedStatusTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertServerStates(self, server, vm_state, power_state, task_state, locked_by):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_extended_volumes.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_not_found(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

def fake_bdms_get_all_by_instance(*args, **kwargs):

def fake_attach_volume(self, context, instance, volume_id, device, disk_bus, device_type):

def fake_attach_volume_not_found_vol(self, context, instance, volume_id, device, disk_bus, device_type):

def fake_attach_volume_invalid_device_path(self, context, instance, volume_id, device, disk_bus, device_type):

def fake_attach_volume_instance_invalid_state(self, context, instance, volume_id, device, disk_bus, device_type):

def fake_attach_volume_invalid_volume(self, context, instance, volume_id, device, disk_bus, device_type):

def fake_detach_volume(self, context, instance, volume):

def fake_swap_volume(self, context, instance, old_volume_id, new_volume_id):

def fake_swap_volume_invalid_volume(self, context, instance, volume_id, device):

def fake_swap_volume_unattached_volume(self, context, instance, volume_id, device):

def fake_detach_volume_invalid_volume(self, context, instance, volume):

def fake_swap_volume_instance_invalid_state(self, context, instance, volume_id, device):

def fake_volume_get(*args, **kwargs):

def fake_volume_get_not_found(*args, **kwargs):

class ExtendedVolumesTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url, body=None):

    def _get_server(self, body):

    def _get_servers(self, body):

    def test_show(self):

    def test_detail(self):

    def test_detach(self):

    def test_detach_volume_from_locked_server(self):

    def test_detach_with_non_existed_vol(self):

    def test_detach_with_non_existed_instance(self):

    def test_detach_with_invalid_vol(self):

    def test_detach_with_bad_id(self):

    def test_detach_without_id(self):

    def test_detach_volume_with_invalid_request(self):

    def test_detach_volume_root(self, mock_isroot):

    def test_attach_volume(self):

    def test_attach_volume_to_locked_server(self):

    def test_attach_volume_disk_bus_and_disk_dev(self):

    def test_attach_volume_with_bad_id(self):

    def test_attach_volume_without_id(self):

    def test_attach_volume_with_invalid_request(self):

    def test_attach_volume_with_non_existe_vol(self):

    def test_attach_volume_with_non_existed_instance(self):

    def test_attach_volume_with_invalid_device_path(self):

    def test_attach_volume_with_instance_invalid_state(self):

    def test_attach_volume_with_invalid_volume(self):

    def test_attach_volume_with_invalid_request_body(self):

    def _test_swap(self, uuid=UUID1, body=None):

    def test_swap_volume(self):

    def test_swap_volume_for_locked_server(self):

        def fake_swap_volume_for_locked_server(self, context, instance, old_volume, new_volume):

    def test_swap_volume_for_locked_server_new(self):

    def test_swap_volume_instance_not_found(self):

    def test_swap_volume_with_bad_action(self):

    def test_swap_volume_with_invalid_body(self):

    def test_swap_volume_with_invalid_volume(self):

    def test_swap_volume_with_unattached_volume(self):

    def test_swap_volume_with_bad_state_instance(self):

    def test_swap_volume_no_attachment(self):

    def test_swap_volume_not_found(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_extension_info.py

class fake_extension(object):

    def __init__(self, name, alias, description, version):

def fake_policy_enforce(context, action, target, do_raise=True):

def fake_policy_enforce_selective(context, action, target, do_raise=True):

class ExtensionInfoTest(test.NoDBTestCase):

    def setUp(self):

    def test_extension_info_list(self):

    def test_extension_info_show(self):

    def test_extension_info_list_not_all_discoverable(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_flavors.py

def fake_flavor_get_by_flavor_id(flavorid, ctxt=None):

def fake_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

 def reject_min(db_attr, filter_attr):

def empty_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

def return_flavor_not_found(flavor_id, ctxt=None):

class FlavorsTest(test.TestCase):

    def setUp(self):

    def test_get_flavor_by_invalid_id(self):

    def test_get_flavor_by_id(self):

    def test_get_flavor_with_custom_link_prefix(self):

    def test_get_flavor_list(self):

    def test_get_flavor_list_with_marker(self):

    def test_get_flavor_list_with_invalid_marker(self):

    def test_get_flavor_detail_with_limit(self):

    def test_get_flavor_with_limit(self):

    def test_get_flavor_list_detail(self):

    def test_get_empty_flavor_list(self):

    def test_get_flavor_list_filter_min_ram(self):

    def test_get_flavor_list_filter_invalid_min_ram(self):

    def test_get_flavor_list_filter_min_disk(self):

    def test_get_flavor_list_filter_invalid_min_disk(self):

    def test_get_flavor_list_detail_min_ram_and_min_disk(self):

class FlavorDisabledTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

    def assertFlavorDisabled(self, flavor, disabled):

    def test_show(self):

    def test_detail(self):

class DisabledFlavorsWithRealDBTest(test.TestCase):

    def setUp(self):

    def tearDown(self):

    def _create_disabled_instance_type(self):

    def test_index_should_not_list_disabled_flavors_to_user(self):

    def test_index_should_list_disabled_flavors_to_admin(self):

    def test_show_should_include_disabled_flavor_for_user(self):

    def test_show_should_include_disabled_flavor_for_admin(self):

class ParseIsPublicTest(test.TestCase):

    def setUp(self):

    def assertPublic(self, expected, is_public):

    def test_None(self):

    def test_truthy(self):

    def test_falsey(self):

    def test_string_none(self):

    def test_other(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_flavors_extra_specs.py

def return_create_flavor_extra_specs(context, flavor_id, extra_specs):

def return_flavor_extra_specs(context, flavor_id):

def return_flavor_extra_specs_item(context, flavor_id, key):

def return_empty_flavor_extra_specs(context, flavor_id):

def delete_flavor_extra_specs(context, flavor_id, key):

def stub_flavor_extra_specs():

class FlavorsExtraSpecsTest(test.TestCase):

    def setUp(self):

    def test_index(self):

    def test_index_no_data(self):

    def test_show(self):

    def test_show_spec_not_found(self):

    def test_delete(self):

    def test_delete_no_admin(self):

    def test_delete_spec_not_found(self):

    def test_create(self):

    def test_create_no_admin(self):

    def test_create_empty_body(self):

    def test_create_flavor_not_found(self):

        def fake_instance_type_extra_specs_update_or_create(*args, **kwargs):

    def test_create_flavor_db_duplicate(self):

        def fake_instance_type_extra_specs_update_or_create(*args, **kwargs):

    def test_create_invalid_specs_key(self, mock_flavor_extra_specs):

    def test_create_valid_specs_key(self, mock_flavor_extra_specs):

    def test_update_item(self):

    def test_update_item_no_admin(self):

    def test_update_item_empty_body(self):

    def test_update_item_too_many_keys(self):

    def test_update_item_body_uri_mismatch(self):

    def test_update_flavor_not_found(self):

        def fake_instance_type_extra_specs_update_or_create(*args, **kwargs):

    def test_update_flavor_db_duplicate(self):

        def fake_instance_type_extra_specs_update_or_create(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_flavor_access.py

def generate_flavor(flavorid, ispublic):

def fake_get_flavor_access_by_flavor_id(context, flavorid):

def fake_get_flavor_by_flavor_id(context, flavorid, read_deleted):

def _has_flavor_access(flavorid, projectid):

def fake_get_all_flavors_sorted_list(context, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FakeRequest(object):

    def get_db_flavor(self, flavor_id):

class FakeResponse(object):

    def attach(self, **kwargs):

class FlavorAccessTest(test.NoDBTestCase):

    def setUp(self):

    def _verify_flavor_list(self, result, expected):

    def test_list_flavor_access_public(self):

    def test_list_flavor_access_private(self):

    def test_list_with_no_context(self):

        def fake_authorize(context, target=None, action=None):

    def test_list_flavor_with_admin_default_proj1(self):

    def test_list_flavor_with_admin_default_proj2(self):

    def test_list_flavor_with_admin_ispublic_true(self):

    def test_list_flavor_with_admin_ispublic_false(self):

    def test_list_flavor_with_admin_ispublic_false_proj2(self):

    def test_list_flavor_with_admin_ispublic_none(self):

    def test_list_flavor_with_no_admin_default(self):

    def test_list_flavor_with_no_admin_ispublic_true(self):

    def test_list_flavor_with_no_admin_ispublic_false(self):

    def test_list_flavor_with_no_admin_ispublic_none(self):

    def test_show(self):

    def test_detail(self):

    def test_create(self):

    def test_add_tenant_access(self):

        def stub_add_flavor_access(context, flavorid, projectid):

    def test_add_tenant_access_with_non_existed_flavor(self):

        def stub_flavor_access_add(context, flavorid, project_id):

    def test_add_tenant_access_with_no_admin_user(self):

    def test_add_tenant_access_without_policy_check(self):

        def fake_authorize(context, target=None, action=None):

    def test_add_tenant_access_without_tenant_id(self):

        def stub_add_flavor_access(context, flavorid, projectid):

    def test_add_tenant_access_with_invalid_request(self):

        def stub_add_flavor_access(context, flavorid, projectid):

    def test_add_tenant_access_with_already_added_access(self):

        def stub_add_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_with_bad_access(self):

        def stub_remove_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_with_non_existed_flavor(self):

        def stub_remove_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_without_tenant_id(self):

        def stub_remove_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_with_invalid_request(self):

        def stub_remove_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_with_no_admin_user(self):

    def test_remove_tenant_access_without_policy_check(self):

        def fake_authorize(context, target=None, action=None):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_flavor_manage.py

def fake_get_flavor_by_flavor_id(flavorid, ctxt=None, read_deleted='yes'):

def fake_destroy(flavorname):

def fake_create(context, kwargs):

class FlavorManageTest(test.NoDBTestCase):

    def setUp(self):

    def test_delete(self):

    def test_create(self):

    def test_create_public_default(self):

    def test_create_without_flavorid(self):

    def test_flavor_exists_exception_returns_409(self):

        def fake_create(name, memory_mb, vcpus, root_gb, ephemeral_gb, flavorid, swap, rxtx_factor, is_public):

    def test_invalid_memory_mb(self):

    def test_all_whitespace_flavor_names_are_rejected(self):

    def test_create_flavor_name_with_leading_trailing_whitespaces(self):

class FakeRequest(object):

class PrivateFlavorManageTest(test.TestCase):

    def setUp(self):

    def test_create_private_flavor_should_create_flavor_access(self):

    def test_create_public_flavor_should_not_create_flavor_access(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_flavor_rxtx.py

def fake_flavor_get_by_flavor_id(flavorid, ctxt=None):

def fake_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FlavorRxtxTest(test.NoDBTestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

    def assertFlavorRxtx(self, flavor, rxtx):

    def test_show(self):

    def test_detail(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_hide_server_addresses.py

def fake_compute_get(*args, **kwargs):

 def _return_server(*_args, **_kwargs):

class HideServerAddressesTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(body):

    def _get_servers(body):

    def _get_addresses(server):

    def _check_addresses(self, addresses, exists):

    def test_show_hides_in_building(self):

    def test_show(self):

    def test_detail_hides_building_server_addresses(self):

        def get_all(*args, **kwargs):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_hosts.py

def stub_service_get_all(context, disabled=None):

def stub_service_get_by_host_and_topic(context, host_name, topic):

def stub_set_host_enabled(context, host_name, enabled):

def stub_set_host_maintenance(context, host_name, mode):

def stub_host_power_action(context, host_name, action):

def _create_instance(**kwargs):

def _create_instance_dict(**kwargs):

class FakeRequest(object):

class FakeRequestWithNovaZone(object):

class FakeRequestWithNovaService(object):

class FakeRequestWithInvalidNovaService(object):

class HostTestCase(test.TestCase):

    def setUp(self):

    def _test_host_update(self, host, key, val, expected_value):

    def test_list_hosts(self):

    def test_list_hosts_with_zone(self):

    def test_list_hosts_with_service(self):

    def test_list_hosts_with_invalid_service(self):

    def test_disable_host(self):

    def test_enable_host(self):

    def test_enable_maintenance(self):

    def test_disable_maintenance(self):

    def _test_host_update_service_unavailable(self, key, val):

    def test_enable_host_service_unavailable(self):

    def test_enable_maintenance_service_unavaliable(self):

    def _test_host_update_notimpl(self, key, val):

        def stub_service_get_all_notimpl(self, req):

    def test_disable_host_notimpl(self):

    def test_enable_maintenance_notimpl(self):

    def test_host_startup(self):

    def test_host_shutdown(self):

    def test_host_reboot(self):

    def _test_host_power_action_service_unavailable(self, method):

    def test_host_startup_service_unavailable(self):

    def test_host_shutdown_service_unavailable(self):

    def test_host_reboot_service_unavailable(self):

    def _test_host_power_action_notimpl(self, method):

OpenStack Index

Previous

Next