OpenStack Study: nova
OpenStack IndexPreviousNext
class FloatingIpDNSTest(test.TestCase):
def _create_floating_ip(self):
def _delete_floating_ip(self):
def setUp(self):
def tearDown(self):
def test_dns_domains_list(self):
def _test_get_dns_entries_by_address(self, address):
def test_get_dns_entries_by_ipv4_address(self):
def test_get_dns_entries_by_ipv6_address(self):
def test_get_dns_entries_by_invalid_ipv4_or_ipv6(self):
def fake_get_dns_entries_by_name(self, context, address, domain):
def test_get_dns_entries_by_name(self):
def test_dns_entries_not_found(self):
def fake_get_dns_entries_by_name(self, context, address, domain):
def test_create_entry(self):
def test_create_domain(self):
def test_delete_entry(self):
def network_delete_dns_entry(fakeself, context, name, domain):
def test_delete_entry_notfound(self):
def delete_dns_entry_notfound(fakeself, context, name, domain):
def test_delete_domain(self):
def network_delete_dns_domain(fakeself, context, fqdomain):
def test_delete_domain_notfound(self):
def delete_dns_domain_notfound(fakeself, context, fqdomain):
def test_modify(self):
class FloatingIpDNSSerializerTest(test.TestCase):
def test_domains(self):
def test_domain_serializer(self):
def test_entries_serializer(self):
def test_entry_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_floating_ip_pools.py
def fake_get_floating_ip_pools(self, context):
class FloatingIpPoolTest(test.NoDBTestCase):
def setUp(self):
def test_translate_floating_ip_pools_view(self):
def test_floating_ips_pools_list(self):
class FloatingIpPoolSerializerTest(test.NoDBTestCase):
def test_index_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_fping.py
def execute(*cmd, **args):
class FpingTest(test.TestCase):
def setUp(self):
def test_fping_index(self):
def test_fping_index_policy(self):
def test_fping_index_include(self):
def test_fping_index_exclude(self):
def test_fping_show(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\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):
class HideAddressesXmlTest(HideServerAddressesTest):
def _get_server(body):
def _get_servers(body):
def _get_addresses(server):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\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 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_disable_host(self):
def test_enable_host(self):
def test_enable_maintenance(self):
def test_disable_maintenance(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_notimpl(self, method):
def test_host_startup_notimpl(self):
def test_host_shutdown_notimpl(self):
def test_host_reboot_notimpl(self):
def test_host_status_bad_host(self):
def test_host_maintenance_bad_host(self):
def test_host_power_action_bad_host(self):
def test_bad_status_value(self):
def test_bad_update_key(self):
def test_bad_update_key_and_correct_update_key(self):
def test_good_update_keys(self):
def test_show_forbidden(self):
def test_show_host_not_exist(self):
def _create_compute_service(self):
def test_show_no_project(self):
def test_show_works_correctly(self):
class HostSerializerTest(test.TestCase):
def setUp(self):
def test_index_serializer(self):
def test_update_serializer_with_status(self):
def test_update_serializer_with_maintenance_mode(self):
def test_update_serializer_with_maintenance_mode_and_status(self):
def test_action_serializer(self):
def test_update_deserializer(self):
def test_corrupt_xml(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_hypervisors.py
def fake_compute_node_get_all(context):
def fake_compute_node_search_by_hypervisor(context, hypervisor_re):
def fake_compute_node_get(context, compute_id):
def fake_compute_node_statistics(context):
def fake_instance_get_all_by_host(context, host):
class HypervisorsTest(test.NoDBTestCase):
def setUp(self):
def test_view_hypervisor_nodetail_noservers(self):
def test_view_hypervisor_detail_noservers(self):
def test_view_hypervisor_servers(self):
def test_index(self):
def test_detail(self):
def test_show_noid(self):
def test_show_withid(self):
def test_uptime_noid(self):
def test_uptime_notimplemented(self):
def fake_get_host_uptime(context, hyp):
def test_uptime_implemented(self):
def fake_get_host_uptime(context, hyp):
def test_search(self):
def test_servers(self):
def test_statistics(self):
class HypervisorsSerializersTest(test.NoDBTestCase):
def compare_to_exemplar(self, exemplar, hyper):
def test_index_serializer(self):
def test_detail_serializer(self):
def test_show_serializer(self):
def test_uptime_serializer(self):
def test_servers_serializer(self):
def test_statistics_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_image_size.py
def fake_show(*args, **kwargs):
def fake_detail(*args, **kwargs):
class ImageSizeTest(test.NoDBTestCase):
def setUp(self):
def _make_request(self, url):
def _get_image(self, body):
def _get_images(self, body):
def assertImageSize(self, image, size):
def test_show(self):
def test_detail(self):
class ImageSizeXmlTest(ImageSizeTest):
def _get_image(self, body):
def _get_images(self, body):
def assertImageSize(self, image, size):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_instance_actions.py
def format_action(action):
def format_event(event):
class InstanceActionsPolicyTest(test.NoDBTestCase):
def setUp(self):
def test_list_actions_restricted_by_project(self):
def fake_instance_get_by_uuid(context, instance_id, columns_to_join=None, use_slave=False):
def test_get_action_restricted_by_project(self):
def fake_instance_get_by_uuid(context, instance_id, columns_to_join=None, use_slave=False):
class InstanceActionsTest(test.NoDBTestCase):
def setUp(self):
def fake_get(self, context, instance_uuid):
def fake_instance_get_by_uuid(context, instance_id, use_slave=False):
def test_list_actions(self):
def fake_get_actions(context, uuid):
def test_get_action_with_events_allowed(self):
def fake_get_action(context, uuid, request_id):
def fake_get_events(context, action_id):
def test_get_action_with_events_not_allowed(self):
def fake_get_action(context, uuid, request_id):
def fake_get_events(context, action_id):
def test_action_not_found(self):
def fake_no_action(context, uuid, action_id):
def test_instance_not_found(self):
def fake_get(self, context, instance_uuid):
class InstanceActionsSerializerTest(test.NoDBTestCase):
def setUp(self):
def _verify_instance_action_attachment(self, attach, tree):
def _verify_instance_action_event_attachment(self, attach, tree):
def test_instance_action_serializer(self):
def test_instance_action_events_serializer(self):
def test_instance_actions_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_instance_usage_audit_log.py
def fake_task_log_get_all(context, task_name, begin, end, host=None, state=None):
def fake_last_completed_audit_period(unit=None, before=None):
class InstanceUsageAuditLogTest(test.NoDBTestCase):
def setUp(self):
def fake_service_get_all(context, disabled):
def tearDown(self):
def test_index(self):
def test_show(self):
def test_show_with_running(self):
def test_show_with_errors(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_keypairs.py
def fake_keypair(name):
def db_key_pair_get_all_by_user(self, user_id):
def db_key_pair_create(self, keypair):
def db_key_pair_destroy(context, user_id, name):
def db_key_pair_create_duplicate(context, keypair):
class KeypairsTest(test.TestCase):
def setUp(self):
def test_keypair_list(self):
def test_keypair_create(self):
def test_keypair_create_with_empty_name(self):
def test_keypair_create_with_name_too_long(self):
def test_keypair_create_with_non_alphanumeric_name(self):
def test_keypair_import(self):
def test_keypair_import_quota_limit(self):
def fake_quotas_count(self, context, resource, *args, **kwargs):
def test_keypair_create_quota_limit(self):
def fake_quotas_count(self, context, resource, *args, **kwargs):
def test_keypair_create_duplicate(self):
def test_keypair_import_bad_key(self):
def test_keypair_delete(self):
def test_keypair_get_keypair_not_found(self):
def test_keypair_delete_not_found(self):
def db_key_pair_get_not_found(context, user_id, name):
def test_keypair_show(self):
def _db_key_pair_get(context, user_id, name):
def test_keypair_show_not_found(self):
def _db_key_pair_get(context, user_id, name):
def test_show_server(self):
def test_detail_servers(self):
def test_keypair_create_with_invalid_keypair_body(self):
class KeypairPolicyTest(test.TestCase):
def setUp(self):
def _db_key_pair_get(context, user_id, name):
def test_keypair_list_fail_policy(self):
def test_keypair_list_pass_policy(self):
def test_keypair_show_fail_policy(self):
def test_keypair_show_pass_policy(self):
def test_keypair_create_fail_policy(self):
def test_keypair_create_pass_policy(self):
def test_keypair_delete_fail_policy(self):
def test_keypair_delete_pass_policy(self):
class KeypairsXMLSerializerTest(test.TestCase):
def setUp(self):
def test_default_serializer(self):
def test_index_serializer(self):
def test_deserializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_migrations.py
class FakeRequest(object):
class MigrationsTestCase(test.NoDBTestCase):
def setUp(self):
def test_index(self):
def test_index_needs_authorization(self):
class MigrationsTemplateTest(test.NoDBTestCase):
def setUp(self):
def test_index_serialization(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_multinic_xs.py
def compute_api_add_fixed_ip(self, context, instance, network_id):
def compute_api_remove_fixed_ip(self, context, instance, address):
def compute_api_get(self, context, instance_id, want_objects=False):
class FixedIpTest(test.NoDBTestCase):
def setUp(self):
def test_add_fixed_ip(self):
def test_add_fixed_ip_no_network(self):
def test_remove_fixed_ip(self):
def test_remove_fixed_ip_no_address(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_networks.py
class FakeNetworkAPI(object):
def __init__(self):
def disable_vlan(self):
def delete(self, context, network_id):
def disassociate(self, context, network_uuid):
def associate(self, context, network_uuid, host=_sentinel, project=_sentinel):
def add_network_to_project(self, context, project_id, network_uuid=None):
def get_all(self, context):
def _fake_db_network_get_all(self, context, project_only="allow_none"):
def get(self, context, network_id):
def create(self, context, **kwargs):
class NetworksTest(test.NoDBTestCase):
def setUp(self):
def network_uuid_to_id(network):
def test_network_list_all_as_user(self):
def test_network_list_all_as_admin(self):
def test_network_disassociate(self):
def test_network_disassociate_host_only(self):
def test_network_disassociate_project_only(self):
def test_network_disassociate_not_found(self):
def test_network_get_as_user(self):
def test_network_get_as_admin(self):
def test_network_get_not_found(self):
def test_network_delete(self):
def test_network_delete_not_found(self):
def test_network_add_vlan_disabled(self):
def test_network_add(self):
def test_network_associate_with_host(self):
def test_network_create(self):
def test_network_create_large(self):
def test_network_neutron_associate_not_implemented(self):
def test_network_neutron_disassociate_project_not_implemented(self):
def test_network_neutron_disassociate_host_not_implemented(self):
def test_network_neutron_disassociate_not_implemented(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_neutron_security_groups.py
class TestNeutronSecurityGroupsTestCase(test.TestCase):
def setUp(self):
def tearDown(self):
class TestNeutronSecurityGroups(
test_security_groups.TestSecurityGroups,
TestNeutronSecurityGroupsTestCase):
def _create_sg_template(self, **kwargs):
def _create_network(self):
def _create_port(self, **kwargs):
def _create_security_group(self, **kwargs):
def test_create_security_group_with_no_description(self):
def test_create_security_group_with_blank_name(self):
def test_create_security_group_with_whitespace_name(self):
def test_create_security_group_with_blank_description(self):
def test_create_security_group_with_whitespace_description(self):
def test_create_security_group_with_duplicate_name(self):
def test_create_security_group_non_string_name(self):
def test_create_security_group_non_string_description(self):
def test_create_security_group_quota_limit(self):
def test_update_security_group(self):
def test_get_security_group_list(self):
def test_get_security_group_list_all_tenants(self):
def test_get_security_group_by_instance(self):
def test_get_security_group_by_id(self):
def test_delete_security_group_by_id(self):
def test_delete_security_group_by_admin(self):
def test_delete_security_group_in_use(self):
def test_associate_non_running_instance(self):
def test_associate_already_associated_security_group_to_instance(self):
def test_associate(self):
def test_associate_duplicate_names(self):
def test_associate_port_security_enabled_true(self):
def test_associate_port_security_enabled_false(self):
def test_disassociate_by_non_existing_security_group_name(self):
def test_disassociate_non_running_instance(self):
def test_disassociate_already_associated_security_group_to_instance(self):
def test_disassociate(self):
def test_get_raises_no_unique_match_error(self):
def fake_find_resourceid_by_name_or_id(client, param, name):
def test_get_instances_security_groups_bindings(self):
def test_get_instance_security_groups(self):
def test_create_port_with_sg_and_port_security_enabled_true(self):
def test_create_port_with_sg_and_port_security_enabled_false(self):
class TestNeutronSecurityGroupRulesTestCase(TestNeutronSecurityGroupsTestCase):
def setUp(self):
def tearDown(self):
class TestNeutronSecurityGroupRules(
test_security_groups.TestSecurityGroupRules,
TestNeutronSecurityGroupRulesTestCase):
def test_create_add_existing_rules_by_cidr(self):
def test_create_add_existing_rules_by_group_id(self):
def test_delete(self):
def test_create_rule_quota_limit(self):
class TestNeutronSecurityGroupsXMLDeserializer(
test_security_groups.TestSecurityGroupXMLDeserializer,
TestNeutronSecurityGroupsTestCase):
class TestNeutronSecurityGroupsXMLSerializer(
test_security_groups.TestSecurityGroupXMLSerializer,
TestNeutronSecurityGroupsTestCase):
class TestNeutronSecurityGroupsOutputTest(TestNeutronSecurityGroupsTestCase):
def setUp(self):
def _make_request(self, url, body=None):
def _encode_body(self, body):
def _get_server(self, body):
def _get_servers(self, body):
def _get_groups(self, server):
def test_create(self):
def test_create_server_get_default_security_group(self):
def test_show(self):
def fake_get_instance_security_groups(inst, context, id):
def test_detail(self):
def test_no_instance_passthrough_404(self):
def fake_compute_get(*args, **kwargs):
class TestNeutronSecurityGroupsOutputXMLTest(
TestNeutronSecurityGroupsOutputTest):
def _encode_body(self, body):
def _get_server(self, body):
def _get_servers(self, body):
def _get_groups(self, server):
def get_client(context=None, admin=False):
class MockClient(object):
def __init__(self):
def _reset(self):
def create_security_group(self, body=None):
def create_network(self, body):
def create_subnet(self, body):
def create_port(self, body):
def create_security_group_rule(self, body):
def show_security_group(self, security_group, **_params):
def show_security_group_rule(self, security_group_rule, **_params):
def show_network(self, network, **_params):
def show_port(self, port, **_params):
def show_subnet(self, subnet, **_params):
def list_security_groups(self, **_params):
def list_networks(self, **_params):
def list_ports(self, **_params):
def list_subnets(self, **_params):
def list_floatingips(self, **_params):
def delete_security_group(self, security_group):
def delete_security_group_rule(self, security_group_rule):
def delete_network(self, network):
def delete_subnet(self, subnet):
def delete_port(self, port):
def update_port(self, port, body=None):
def list_extensions(self, **_parms):
def _check_ports_on_network(self, network):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_quotas.py
def quota_set(id):
class QuotaSetsTest(test.TestCase):
def setUp(self):
def test_format_quota_set(self):
def test_quotas_defaults(self):
def test_quotas_show_as_admin(self):
def test_quotas_show_as_unauthorized_user(self):
def test_quotas_update_as_admin(self):
def test_quotas_update_zero_value_as_admin(self):
def test_quotas_update_as_user(self):
def test_quotas_update_invalid_key(self):
def test_quotas_update_invalid_limit(self):
def test_quotas_update_empty_body(self):
def test_quotas_update_invalid_value_json_fromat_empty_string(self):
def test_quotas_update_invalid_value_xml_fromat_empty_string(self):
def test_quotas_update_invalid_value_non_int(self):
def test_quotas_update_invalid_value_with_float(self):
def test_quotas_update_invalid_value_with_unicode(self):
def test_delete_quotas_when_extension_not_loaded(self):
def test_quotas_delete_as_unauthorized_user(self):
def test_quotas_delete_as_admin(self):
class QuotaXMLSerializerTest(test.TestCase):
def setUp(self):
def test_serializer(self):
def test_deserializer(self):
def fake_get_quotas(self, context, id, user_id=None, usages=False):
class ExtendedQuotasTest(test.TestCase):
def setUp(self):
def test_quotas_update_exceed_in_used(self):
def test_quotas_force_update_exceed_in_used(self):
class UserQuotasTest(test.TestCase):
def setUp(self):
def test_user_quotas_show_as_admin(self):
def test_user_quotas_show_as_unauthorized_user(self):
def test_user_quotas_update_as_admin(self):
def test_user_quotas_update_as_user(self):
def test_user_quotas_update_exceed_project(self):
def test_delete_user_quotas_when_extension_not_loaded(self):
def test_user_quotas_delete_as_unauthorized_user(self):
def test_user_quotas_delete_as_admin(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_rescue.py
def rescue(self, context, instance, rescue_password=None):
def unrescue(self, context, instance):
class RescueTest(test.NoDBTestCase):
def setUp(self):
def fake_compute_get(*args, **kwargs):
def test_rescue_with_preset_password(self):
def test_rescue_generates_password(self):
def test_rescue_of_rescued_instance(self):
def fake_rescue(*args, **kwargs):
def test_unrescue(self):
def test_unrescue_of_active_instance(self):
def fake_unrescue(*args, **kwargs):
def test_rescue_raises_unrescuable(self):
def fake_rescue(*args, **kwargs):
def test_rescue_raises_not_implemented(self, rescue_mock):
def fake_rescue(*args, **kwargs):
def test_unrescue_raises_not_implemented(self, unrescue_mock):
def fake_unrescue(*args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_scheduler_hints.py
class SchedulerHintsTestCase(test.TestCase):
def setUp(self):
def test_create_server_without_hints(self):
def fake_create(*args, **kwargs):
def test_create_server_with_hints(self):
def fake_create(*args, **kwargs):
def test_create_server_bad_hints(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_security_groups.py
class AttrDict(dict):
def __getattr__(self, k):
def security_group_template(**kwargs):
def security_group_db(security_group, id=None):
def security_group_rule_template(**kwargs):
def security_group_rule_db(rule, id=None):
def return_server(context, server_id, columns_to_join=None, use_slave=False):
def return_server_by_uuid(context, server_uuid, columns_to_join=None, use_slave=False):
def return_non_running_server(context, server_id, columns_to_join=None):
def return_security_group_by_name(context, project_id, group_name):
def return_security_group_without_instances(context, project_id, group_name):
def return_server_nonexistent(context, server_id, columns_to_join=None):
class TestSecurityGroups(test.TestCase):
def setUp(self):
def _assert_no_security_groups_reserved(self, context):
def _assert_security_groups_in_use(self, project_id, user_id, in_use):
def test_create_security_group(self):
def test_create_security_group_with_no_name(self):
def test_create_security_group_with_no_description(self):
def test_create_security_group_with_blank_name(self):
def test_create_security_group_with_whitespace_name(self):
def test_create_security_group_with_blank_description(self):
def test_create_security_group_with_whitespace_description(self):
def test_create_security_group_with_duplicate_name(self):
def test_create_security_group_with_no_body(self):
def test_create_security_group_with_no_security_group(self):
def test_create_security_group_above_255_characters_name(self):
def test_create_security_group_above_255_characters_description(self):
def test_create_security_group_non_string_name(self):
def test_create_security_group_non_string_description(self):
def test_create_security_group_quota_limit(self):
def test_get_security_group_list(self):
def return_security_groups(context, project_id):
def test_get_security_group_list_all_tenants(self):
def return_all_security_groups(context):
def return_tenant_security_groups(context, project_id):
def test_get_security_group_by_instance(self):
def return_instance(context, server_id, columns_to_join=None, use_slave=False):
def return_security_groups(context, instance_uuid):
def test_get_security_group_by_instance_non_existing(self):
def test_get_security_group_by_instance_invalid_id(self):
def test_get_security_group_by_id(self):
def return_security_group(context, group_id):
def test_get_security_group_by_invalid_id(self):
def test_get_security_group_by_non_existing_id(self):
def test_update_security_group(self):
def return_security_group(context, group_id):
def return_update_security_group(context, group_id, values, columns_to_join=None):
def test_update_security_group_name_to_default(self):
def return_security_group(context, group_id):
def test_update_default_security_group_fail(self):
def test_delete_security_group_by_id(self):
def security_group_destroy(context, id):
def return_security_group(context, group_id):
def test_delete_security_group_by_admin(self):
def test_delete_security_group_by_invalid_id(self):
def test_delete_security_group_by_non_existing_id(self):
def test_delete_security_group_in_use(self):
def security_group_in_use(context, id):
def return_security_group(context, group_id):
def test_associate_by_non_existing_security_group_name(self):
def test_associate_by_invalid_server_id(self):
def test_associate_without_body(self):
def test_associate_no_security_group_name(self):
def test_associate_security_group_name_with_whitespaces(self):
def test_associate_non_existing_instance(self):
def test_associate_non_running_instance(self):
def test_associate_already_associated_security_group_to_instance(self):
def test_associate(self):
def test_disassociate_by_non_existing_security_group_name(self):
def test_disassociate_by_invalid_server_id(self):
def test_disassociate_without_body(self):
def test_disassociate_no_security_group_name(self):
def test_disassociate_security_group_name_with_whitespaces(self):
def test_disassociate_non_existing_instance(self):
def test_disassociate_non_running_instance(self):
def test_disassociate_already_associated_security_group_to_instance(self):
def test_disassociate(self):
class TestSecurityGroupRules(test.TestCase):
def setUp(self):
def return_security_group(context, group_id, columns_to_join=None):
def test_create_by_cidr(self):
def test_create_by_group_id(self):
def test_create_by_same_group_id(self):
def test_create_none_value_from_to_port(self):
def test_create_none_value_from_to_port_icmp(self):
def test_create_none_value_from_to_port_tcp(self):
def test_create_by_invalid_cidr_json(self):
def test_create_by_invalid_tcp_port_json(self):
def test_create_by_invalid_icmp_port_json(self):
def test_create_add_existing_rules_by_cidr(self):
def test_create_add_existing_rules_by_group_id(self):
def test_create_with_no_body(self):
def test_create_with_no_security_group_rule_in_body(self):
def test_create_with_invalid_parent_group_id(self):
def test_create_with_non_existing_parent_group_id(self):
def test_create_with_invalid_protocol(self):
def test_create_with_no_protocol(self):
def test_create_with_invalid_from_port(self):
def test_create_with_invalid_to_port(self):
def test_create_with_non_numerical_from_port(self):
def test_create_with_non_numerical_to_port(self):
def test_create_with_no_from_port(self):
def test_create_with_no_to_port(self):
def test_create_with_invalid_cidr(self):
def test_create_with_no_cidr_group(self):
def test_create_with_invalid_group_id(self):
def test_create_with_empty_group_id(self):
def test_create_with_nonexist_group_id(self):
def test_create_with_same_group_parent_id_and_group_id(self):
def _test_create_with_no_ports_and_no_group(self, proto):
def _test_create_with_no_ports(self, proto):
def test_create_with_no_ports_icmp(self):
def test_create_with_no_ports_tcp(self):
def test_create_with_no_ports_udp(self):
def _test_create_with_ports(self, proto, from_port, to_port):
def test_create_with_ports_icmp(self):
def test_create_with_ports_tcp(self):
def test_create_with_ports_udp(self):
def test_delete(self):
def security_group_rule_get(context, id):
def security_group_rule_destroy(context, id):
def test_delete_invalid_rule_id(self):
def test_delete_non_existing_rule_id(self):
def test_create_rule_quota_limit(self):
def test_create_rule_cidr_allow_all(self):
def test_create_rule_cidr_ipv6_allow_all(self):
def test_create_rule_cidr_allow_some(self):
def test_create_rule_cidr_bad_netmask(self):
class TestSecurityGroupRulesXMLDeserializer(test.TestCase):
def setUp(self):
def test_create_request(self):
def test_create_no_protocol_request(self):
def test_corrupt_xml(self):
class TestSecurityGroupXMLDeserializer(test.TestCase):
def setUp(self):
def test_create_request(self):
def test_create_no_description_request(self):
def test_create_no_name_request(self):
def test_corrupt_xml(self):
class TestSecurityGroupXMLSerializer(test.TestCase):
def setUp(self):
def _tag(self, elem):
def _verify_security_group_rule(self, raw_rule, tree):
def _verify_security_group(self, raw_group, tree):
def test_rule_serializer(self):
def test_group_serializer(self):
def test_groups_serializer(self):
def fake_compute_get_all(*args, **kwargs):
def fake_compute_get(*args, **kwargs):
def fake_compute_create(*args, **kwargs):
def fake_get_instances_security_groups_bindings(inst, context, servers):
class SecurityGroupsOutputTest(test.TestCase):
def setUp(self):
def _make_request(self, url, body=None):
def _encode_body(self, body):
def _get_server(self, body):
def _get_servers(self, body):
def _get_groups(self, server):
def test_create(self):
def test_show(self):
def test_detail(self):
def test_no_instance_passthrough_404(self):
def fake_compute_get(*args, **kwargs):
class SecurityGroupsOutputXmlTest(SecurityGroupsOutputTest):
def _encode_body(self, body):
def _get_server(self, body):
def _get_servers(self, body):
def _get_groups(self, server):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_security_group_default_rules.py
class AttrDict(dict):
def __getattr__(self, k):
def security_group_default_rule_template(**kwargs):
def security_group_default_rule_db(security_group_default_rule, id=None):
class TestSecurityGroupDefaultRules(test.TestCase):
def setUp(self):
def test_create_security_group_default_rule(self):
def test_create_security_group_default_rule_with_no_to_port(self):
def test_create_security_group_default_rule_with_no_from_port(self):
def test_create_security_group_default_rule_with_no_ip_protocol(self):
def test_create_security_group_default_rule_with_no_cidr(self):
def test_create_security_group_default_rule_with_blank_to_port(self):
def test_create_security_group_default_rule_with_blank_from_port(self):
def test_create_security_group_default_rule_with_blank_ip_protocol(self):
def test_create_security_group_default_rule_with_blank_cidr(self):
def test_create_security_group_default_rule_non_numerical_to_port(self):
def test_create_security_group_default_rule_non_numerical_from_port(self):
def test_create_security_group_default_rule_invalid_ip_protocol(self):
def test_create_security_group_default_rule_invalid_cidr(self):
def test_create_security_group_default_rule_invalid_to_port(self):
def test_create_security_group_default_rule_invalid_from_port(self):
def test_create_security_group_default_rule_with_no_body(self):
def test_create_duplicate_security_group_default_rule(self):
def test_security_group_default_rules_list(self):
def test_default_security_group_default_rule_show(self):
def test_delete_security_group_default_rule(self):
def security_group_default_rule_destroy(context, id):
def return_security_group_default_rule(context, id):
def test_security_group_ensure_default(self):
class TestSecurityGroupDefaultRulesXMLDeserializer(test.TestCase):
def setUp(self):
def test_create_request(self):
def test_create_no_to_port_request(self):
def test_create_no_from_port_request(self):
def test_create_no_ip_protocol_request(self):
def test_create_no_cidr_request(self):
class TestSecurityGroupDefaultRuleXMLSerializer(test.TestCase):
def setUp(self):
def _tag(self, elem):
def _verify_security_group_default_rule(self, raw_rule, tree):
def test_rule_serializer(self):
def test_index_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_server_diagnostics.py
def fake_get_diagnostics(self, _context, instance_uuid):
def fake_instance_get(self, _context, instance_uuid, want_objects=False):
class ServerDiagnosticsTest(test.NoDBTestCase):
def setUp(self):
def test_get_diagnostics(self):
class TestServerDiagnosticsXMLSerializer(test.NoDBTestCase):
def _tag(self, elem):
def test_index_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_server_external_events.py
def fake_get_by_uuid(cls, context, uuid):
class ServerExternalEventsTest(test.NoDBTestCase):
def setUp(self):
def _create_req(self, body):
def _assert_call(self, req, body, expected_uuids, expected_events):
def test_create(self):
def test_create_one_bad_instance(self):
def test_create_no_good_instances(self):
def test_create_bad_status(self):
def test_create_extra_gorp(self):
def test_create_bad_events(self):
def test_create_bad_body(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_server_groups.py
class AttrDict(dict):
def __getattr__(self, k):
def server_group_template(**kwargs):
def server_group_resp_template(**kwargs):
def server_group_db(sg):
class ServerGroupTest(test.TestCase):
def setUp(self):
def test_create_server_group_with_no_policies(self):
def test_create_server_group_normal(self):
def _create_instance(self, context):
def _create_instance_group(self, context, members):
def _create_groups_and_instances(self, ctx):
def test_display_members(self):
def test_display_active_members_only(self):
def test_create_server_group_with_illegal_name(self):
def test_create_server_group_with_illegal_policies(self):
def test_create_server_group_conflicting_policies(self):
def test_create_server_group_not_supported(self):
def test_create_server_group_with_no_body(self):
def test_create_server_group_with_no_server_group(self):
def test_list_server_group_by_tenant(self):
def return_server_groups(context, project_id):
def test_list_server_group_all(self):
def return_all_server_groups(context):
def return_tenant_server_groups(context, project_id):
def test_delete_server_group_by_id(self):
def server_group_delete(context, id):
def return_server_group(context, group_id):
def test_delete_non_existing_server_group(self):
class TestServerGroupXMLDeserializer(test.TestCase):
def setUp(self):
def test_create_request(self):
def test_update_request(self):
def test_create_request_no_name(self):
def test_corrupt_xml(self):
class TestServerGroupXMLSerializer(test.TestCase):
def setUp(self):
def _tag(self, elem):
def _verify_server_group(self, raw_group, tree):
def _verify_server_group_brief(self, raw_group, tree):
def test_group_serializer(self):
def test_groups_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_server_password.py
class ServerPasswordTest(test.TestCase):
def setUp(self):
def fake_extract_password(instance):
def fake_convert_password(context, password):
def _make_request(self, url, method='GET'):
def _get_pass(self, body):
def test_get_password(self):
def test_reset_password(self):
class ServerPasswordXmlTest(ServerPasswordTest):
def _get_pass(self, body):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_server_start_stop.py
def fake_instance_get(context, instance_id, columns_to_join=None, use_slave=False):
def fake_start_stop_not_ready(self, context, instance):
def fake_start_stop_locked_server(self, context, instance):
def fake_start_stop_invalid_state(self, context, instance):
class ServerStartStopTest(test.TestCase):
def setUp(self):
def test_start(self):
def test_start_policy_failed(self):
def test_start_not_ready(self):
def test_start_locked_server(self):
def test_start_invalid_state(self):
def test_stop(self):
def test_stop_policy_failed(self):
def test_stop_not_ready(self):
def test_stop_locked_server(self):
def test_stop_invalid_state(self):
def test_start_with_bogus_id(self):
def test_stop_with_bogus_id(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_server_usage.py
def fake_compute_get(*args, **kwargs):
def fake_compute_get_all(*args, **kwargs):
class ServerUsageTest(test.TestCase):
def setUp(self):
def _make_request(self, url):
def _get_server(self, body):
def _get_servers(self, body):
def assertServerUsage(self, server, launched_at, terminated_at):
def test_show(self):
def test_detail(self):
def test_no_instance_passthrough_404(self):
def fake_compute_get(*args, **kwargs):
class ServerUsageXmlTest(ServerUsageTest):
def _get_server(self, body):
def _get_servers(self, body):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_services.py
class FakeRequest(object):
class FakeRequestWithService(object):
class FakeRequestWithHost(object):
class FakeRequestWithHostService(object):
def service_get_all(context, filters=None, set_zones=False):
def fake_db_api_service_get_all(context, disabled=None):
def fake_db_service_get_by_host_binary(services):
def service_get_by_host_binary(context, host, binary):
def fake_service_get_by_host_binary(context, host, binary):
def _service_get_by_id(services, value):
def fake_db_service_update(services):
def service_update(context, service_id, values):
def fake_service_update(context, service_id, values):
def fake_utcnow():
def fake_utcnow_ts():
class ServicesTest(test.TestCase):
def setUp(self):
def test_services_list(self):
def test_services_list_with_host(self):
def test_services_list_with_service(self):
def test_services_list_with_host_service(self):
def test_services_detail(self):
def test_service_detail_with_host(self):
def test_service_detail_with_service(self):
def test_service_detail_with_host_service(self):
def test_services_detail_with_delete_extension(self):
def test_services_enable(self):
def _service_update(context, service_id, values):
def test_services_enable_with_invalid_host(self):
def test_services_enable_with_invalid_binary(self):
def test_services_with_exception(self):
def dummy_is_up(self, dummy):
def test_services_disable(self):
def test_services_disable_with_invalid_host(self):
def test_services_disable_with_invalid_binary(self):
def test_services_disable_log_reason(self):
def test_mandatory_reason_field(self):
def test_invalid_reason_field(self):
def test_services_delete(self):
def test_services_delete_not_found(self):
def test_services_delete_not_enabled(self):
class ServicesCellsTest(test.TestCase):
def setUp(self):
def test_services_detail(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_shelve.py
def fake_instance_get_by_uuid(context, instance_id, columns_to_join=None, use_slave=False):
def fake_auth_context(context):
class ShelvePolicyTest(test.NoDBTestCase):
def setUp(self):
def test_shelve_restricted_by_role(self):
def test_shelve_allowed(self):
def test_shelve_locked_server(self):
def test_unshelve_restricted_by_role(self):
def test_unshelve_allowed(self):
def test_unshelve_locked_server(self):
def test_shelve_offload_restricted_by_role(self):
def test_shelve_offload_allowed(self):
def test_shelve_offload_locked_server(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_simple_tenant_usage.py
def get_fake_db_instance(start, end, instance_id, tenant_id, vm_state=vm_states.ACTIVE):
def fake_instance_get_active_by_window_joined(context, begin, end, project_id, host):
class SimpleTenantUsageTest(test.TestCase):
def setUp(self):
def _test_verify_index(self, start, stop):
def test_verify_index(self):
def test_verify_index_future_end_time(self):
def test_verify_show(self):
def test_verify_show_future_end_time(self):
def _get_tenant_usages(self, detailed=''):
def test_verify_detailed_index(self):
def test_verify_simple_index(self):
def test_verify_simple_index_empty_param(self):
def _test_verify_show(self, start, stop):
def test_verify_show_cant_view_other_tenant(self):
def test_get_tenants_usage_with_bad_start_date(self):
class SimpleTenantUsageSerializerTest(test.TestCase):
def _verify_server_usage(self, raw_usage, tree):
def _verify_tenant_usage(self, raw_usage, tree):
def test_serializer_show(self):
def test_serializer_index(self):
class SimpleTenantUsageControllerTest(test.TestCase):
def setUp(self):
def test_get_flavor_from_sys_meta(self):
def test_get_flavor_from_non_deleted_with_id_fails(self):
def test_get_flavor_from_deleted_with_id(self):
def test_get_flavor_from_deleted_with_id_of_deleted(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_snapshots.py
class SnapshotApiTest(test.NoDBTestCase):
def setUp(self):
def test_snapshot_create(self):
def test_snapshot_create_force(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):
class SnapshotSerializerTest(test.NoDBTestCase):
def _verify_snapshot(self, snap, tree):
def test_snapshot_show_create_serializer(self):
def test_snapshot_index_detail_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_used_limits.py
class FakeRequest(object):
def __init__(self, context, reserved=False):
class UsedLimitsTestCase(test.NoDBTestCase):
def setUp(self):
def _do_test_used_limits(self, reserved):
def stub_get_project_quotas(context, project_id, usages=True):
def test_used_limits_basic(self):
def test_used_limits_with_reserved(self):
def test_admin_can_fetch_limits_for_a_given_tenant_id(self):
def test_admin_can_fetch_used_limits_for_own_project(self):
def test_non_admin_cannot_fetch_used_limits_for_any_other_project(self):
def test_used_limits_fetched_for_context_project_id(self):
def test_used_ram_added(self):
def stub_get_project_quotas(context, project_id, usages=True):
def test_no_ram_quota(self):
def stub_get_project_quotas(context, project_id, usages=True):
def test_used_limits_xmlns(self):
def stub_get_project_quotas(context, project_id, usages=True):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_virtual_interfaces.py
def compute_api_get(self, context, instance_id, expected_attrs=None, want_objects=False):
def get_vifs_by_instance(self, context, instance_id):
class FakeRequest(object):
def __init__(self, context):
class ServerVirtualInterfaceTest(test.NoDBTestCase):
def setUp(self):
def test_get_virtual_interfaces_list(self):
def test_vif_instance_not_found(self):
class ServerVirtualInterfaceSerializerTest(test.NoDBTestCase):
def setUp(self):
def _tag(self, elem):
def test_serializer(self):
\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_volumes.py
def fake_get_instance(self, context, instance_id, want_objects=False):
def fake_get_volume(self, context, id):
def fake_attach_volume(self, context, instance, volume_id, device):
def fake_detach_volume(self, context, instance, volume):
def fake_swap_volume(self, context, instance, old_volume_id, new_volume_id):
def fake_create_snapshot(self, context, volume, name, description):
OpenStack IndexPreviousNext
|