nova/nova/tests/unit/api/openstack/compute/contrib
jichenjc 6abb88befe Check flavor type before add tenant access
Currently we allow tenant access for public flavor, however,
we can't query it after that because flavor is public.
This patch adds check for add access function to raise exception
if the flavor is public.

Also, a nit change is use methods introduced in
793bcc07b9 to get flavor.

APIImpact: Adds new 2.7 API microversion due to new error condition
           in flavor access API
Implements blueprint check-flavor-type-before-add-tenant
Closes-Bug: #1361476

Change-Id: I461175e9969a0dd5b2b7ef75ea7d9f36f3a306d0
2015-07-24 15:36:29 +03:00
..
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_access_ips.py Remove accessips attribute from V2.1 POST server resp 2015-02-26 07:00:40 +00:00
test_admin_actions.py Merge "Rename and move the v2.1 api policy into separated files" 2015-03-20 00:03:58 +00:00
test_admin_password.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_agents.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_aggregates.py Remove db layer hard-code permission checks for service_get_by_compute_host 2015-05-11 21:36:37 +00:00
test_attach_interfaces.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_availability_zone.py Refactored test_availability_zone to work properly with random PYTHONHASHSEED 2015-03-26 09:59:11 +03:00
test_baremetal_nodes.py Merge "Handle 404 in os-baremetal-nodes GET" 2015-02-26 11:31:41 +00:00
test_block_device_mapping.py Use six.moves.range for Python 3 2015-05-20 15:19:51 -07:00
test_block_device_mapping_v1.py Removed unused methods and classes 2015-05-20 14:33:20 +03:00
test_cells.py Fix test cases still use v3 prefix 2015-03-22 16:45:35 +08:00
test_certificates.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_cloudpipe.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_cloudpipe_update.py Make test re-use HTTPRequest part 2 2015-01-23 02:17:47 +08:00
test_config_drive.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_console_auth_tokens.py Make ConsoleAuthTokensExtensionTestV21 inherit from test.NoDBTestCase 2015-03-02 13:18:07 +00:00
test_console_output.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_consoles.py Consolidate the APIs for getting consoles 2015-07-03 11:03:36 +03:00
test_create_backup.py Raise exception when backup volume-backed instance 2015-03-28 07:53:40 +13:00
test_createserverext.py Fixed test to work with random PYTHONHASHSEED 2015-03-26 09:52:38 +03:00
test_deferred_delete.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_disk_config.py fixed test in test_disk_config to work with random PYTHONHASHSEED 2015-03-26 09:59:11 +03:00
test_evacuate.py Remove db layer hard-code permission checks for service_get_by_compute_host 2015-05-11 21:36:37 +00:00
test_extended_availability_zone.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_extended_hypervisors.py Fix how service objects are looked up for Cells 2015-04-09 13:06:06 +02:00
test_extended_ips.py Replace dict.itervalues() with six.itervalues(dict) 2015-05-12 12:21:46 +02:00
test_extended_ips_mac.py Replace dict.itervalues() with six.itervalues(dict) 2015-05-12 12:21:46 +02:00
test_extended_rescue_with_image.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_extended_server_attributes.py Add info for Standalone EC2 API to cut access to Nova DB. 2015-03-05 19:19:23 +04:00
test_extended_status.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_extended_virtual_interfaces_net.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_extended_volumes.py Fix test cases still use v3 prefix 2015-03-22 16:45:35 +08:00
test_extension_info.py Add policy check for extension_info 2015-04-21 13:51:33 +00:00
test_fixed_ips.py Show 'reserved' status in os-fixed-ips 2015-05-15 10:38:47 -07:00
test_flavor_access.py Check flavor type before add tenant access 2015-07-24 15:36:29 +03:00
test_flavor_disabled.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_flavor_manage.py Replace unicode with six.text_type 2015-05-12 12:31:20 +02:00
test_flavor_rxtx.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_flavor_swap.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_flavorextradata.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_flavors_extra_specs.py Enable W292 2015-01-10 21:45:08 +00:00
test_floating_ip_dns.py Remove db layer hard-code permission checks for floating_ip_dns 2015-07-03 07:50:57 +00:00
test_floating_ip_pools.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_floating_ips.py Associate floating IPs with first v4 fixed IP if none specified 2015-04-24 15:09:11 -04:00
test_floating_ips_bulk.py Remove db layer hard-code permission checks for floating_ips_bulk 2015-04-23 22:55:16 +08:00
test_fping.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_hide_server_addresses.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_hosts.py API: remove admin require from compute_node_get_all_by_* from db layer 2015-05-12 03:13:32 +00:00
test_hypervisor_status.py Change calls to service information for Hypervisors API 2015-02-17 19:18:25 +00:00
test_hypervisors.py Merge "API: remove admin require for compute_node(get_all/search_by_hyperviso) from db" 2015-06-02 02:22:07 +00:00
test_image_size.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_instance_actions.py Replace dict.itervalues() with six.itervalues(dict) 2015-05-12 12:21:46 +02:00
test_instance_usage_audit_log.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_keypairs.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_lock_server.py Move unlock_override policy enforcement into V2.1 REST API layer 2015-05-18 17:48:00 +08:00
test_migrate_server.py Replace unicode with six.text_type 2015-05-12 12:31:20 +02:00
test_migrations.py Add migration_type to Migration object 2015-05-14 18:46:10 -07:00
test_multinic.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_multiple_create.py Send Instance object to cells instance_update_at_top 2015-06-10 21:48:57 +00:00
test_networks.py Merge "Remove db layer hard-code permission checks for network_create_safe" 2015-06-22 17:18:25 +00:00
test_neutron_security_groups.py Merge "Fix test_create_security_group_with_no_name" 2015-07-18 09:56:11 +00:00
test_pause_server.py Merge "Rename and move the v2.1 api policy into separated files" 2015-03-20 00:03:58 +00:00
test_pci.py Merge "Cleanups for pci stats in preparation for RT using ComputeNode" 2015-06-03 03:02:57 +00:00
test_quota_classes.py Cleanup quota_class unittest with appropriate request context 2015-07-14 22:10:28 +08:00
test_quotas.py Validate maximum limit for quota 2015-06-29 22:47:36 +08:00
test_rescue.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_scheduler_hints.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_security_group_default_rules.py Merge "Remove db layer hard-code permission checks for security_group_default_rule_destroy" 2015-06-23 21:00:24 +00:00
test_security_groups.py Fix test_create_security_group_with_no_name 2015-06-23 00:52:10 +00:00
test_server_diagnostics.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_server_external_events.py Set default event status to completed 2015-06-08 09:15:25 +00:00
test_server_group_quotas.py Merge "Change v3 import to v21 in 2.1 api unit test" 2015-03-06 11:52:30 +00:00
test_server_groups.py Expand valid server group name character set 2015-03-27 17:50:06 -05:00
test_server_password.py Fix up instance flavor usage in compute and network tests 2015-06-22 11:16:55 -07:00
test_server_reset_state.py Switch to uuidutils from oslo_utils library 2015-02-25 20:05:49 -05:00
test_server_start_stop.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_server_usage.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_services.py Use cells.utils.ServiceProxy object within cells_api 2015-04-07 23:09:38 +02:00
test_shelve.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_simple_tenant_usage.py Use six.moves.range for Python 3 2015-05-20 15:19:51 -07:00
test_snapshots.py Calling controller methods directly in test_snapshots 2015-01-21 11:02:05 +09:00
test_suspend_server.py Merge "Rename and move the v2.1 api policy into separated files" 2015-03-20 00:03:58 +00:00
test_tenant_networks.py Remove db layer hard-code permission checks for network_create_safe 2015-05-18 18:25:53 +08:00
test_used_limits.py Replace dict.iteritems() with six.iteritems(dict) 2015-05-22 11:33:18 -07:00
test_virtual_interfaces.py Rename and move the v2.1 api policy into separated files 2015-03-19 14:24:47 -04:00
test_volumes.py Merge "Catch SnapshotNotFound exception at os-volumes" 2015-05-29 01:44:01 +00:00