nova/nova/tests/integrated/api_samples
Santiago Baldassin daedfffd95 Do not add current tenant to private flavor access
Avoid adding the current tenant to the flavor access list when
a private flavor is created. In ordeir to add tenants to the
flavor access list we should use the add_tenant api.

Tempest has to be updated accordingly:
https://review.openstack.org/81551

Documentation has to be updated as well:
https://review.openstack.org/82175

Partially (just for the V2 API rather than V2 and V3)
reverts commit 6ba248635b

Fixes unittest which was added in the original commit so it checks
for the behaviour we have now rather than the behaviour after the
backwards incompatible change which is being reverted.

Change-Id: I731081b6df0d96df1bc1763d214d28c62bbbb51c
Closes-Bug: #1286297
2014-03-25 12:17:17 +10:30
..
NMN Add api-samples to multinic extension 2013-01-25 14:18:43 -05:00
OS-DCF Adds XML namespace example for disk config extension 2013-10-24 22:21:46 +10:30
OS-EXT-AZ Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
OS-EXT-IMG-SIZE Add an extension to show image size. 2013-02-19 18:53:10 -05:00
OS-EXT-IPS Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
OS-EXT-IPS-MAC Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
OS-EXT-SRV-ATTR Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
OS-EXT-STS Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
OS-EXT-VIF-NET Add an extension to show the network id of a virtual interface 2013-04-08 16:35:26 +08:00
OS-FLV-DISABLED 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
OS-FLV-EXT-DATA 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
OS-SCH-HNT Makes scheduler hints and disk config xml correct 2012-09-18 12:46:52 -07:00
OS-SRV-USG Launch_at and terminated_at on server(s) response 2013-05-31 15:50:40 -04:00
all_extensions Add REST API for instance group api extension 2014-03-06 23:30:44 -08:00
os-admin-actions Add API samples to Admin Actions 2012-10-29 07:17:32 -04:00
os-agents Add agent build API support for list/create/delete/modify agent build 2012-12-05 16:39:48 +08:00
os-aggregates Enable Aggregate based availability zones 2013-01-08 14:00:41 -08:00
os-assisted-volume-snapshots Fixes api samples for V2 os-assisted-volume-snapshots 2014-03-03 10:50:41 +10:30
os-attach-interfaces Add support for network adapter hotplug. 2013-02-19 14:12:54 -05:00
os-availability-zone Cleanup trailing whitespace in api samples. 2013-04-10 08:41:39 +10:00
os-baremetal-ext-status Expose additional status in baremetal API extension 2013-10-22 03:58:43 +00:00
os-baremetal-nodes baremetal: Change node api related to prov_mac_address 2013-04-11 16:31:11 +09:00
os-block-device-mapping-v2-boot Servers API for the new BDM format 2013-07-26 12:33:01 +02:00
os-cell-capacities API to get the Cell Capacity 2013-06-05 12:52:55 -05:00
os-cells Cells: Add cells API extension 2013-01-15 01:22:35 +00:00
os-certificates Add api samples to Certificates extension 2012-10-02 15:01:10 -07:00
os-cloudpipe Add api samples to cloudpipe extension 2012-09-28 10:03:16 -04:00
os-cloudpipe-update Add vpn ip/port setting support for CloudPipe 2012-11-30 19:24:32 +10:30
os-config-drive Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
os-console-auth-tokens Adds get_console_connect_info API 2014-02-28 22:05:29 +02:00
os-console-output Add console output extension to API samples test. 2012-09-18 10:03:27 -04:00
os-consoles Adds RDP console support 2014-02-07 21:20:08 +02:00
os-deferred-delete Added sample tests to deferred delete API. 2012-12-01 19:54:38 +00:00
os-evacuate Extension for rebuild-for-ha 2013-02-07 14:38:38 +02:00
os-extended-floating-ips Allow a floating IP to be associated to a specific fixed IP 2013-05-10 01:29:27 +01:00
os-extended-hypervisors Adds host_ip to hypervisor show API 2014-02-05 22:52:28 +08:00
os-extended-quotas Enhance the validation of the quotas update 2013-06-13 15:36:08 +08:00
os-extended-services-delete Add a new compute API method for deleting retired services 2014-02-21 16:50:23 -05:00
os-extended-volumes Add "ExtendedVolumes" API extension 2013-07-10 11:09:21 +04:00
os-fixed-ips Add API sample tests to FixedIPs extension 2012-12-29 16:39:53 +08:00
os-flavor-access Do not add current tenant to private flavor access 2014-03-25 12:17:17 +10:30
os-flavor-extra-specs Added sample tests to FlavorExtraSpecs API 2013-01-30 13:18:46 -05:00
os-flavor-manage Modified sample tests to FlavorExtraData API. 2012-12-10 22:43:43 -05:00
os-flavor-rxtx 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
os-flavor-swap 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
os-floating-ip-dns Adds API Sample tests for FloatingIPDNS extension. 2013-02-11 10:53:36 -02:00
os-floating-ip-pools Added sample tests to floating-ip-pools API. 2013-01-23 17:53:31 -05:00
os-floating-ips sample api testing for os-floating-ips extension 2012-09-18 15:15:13 -07:00
os-floating-ips-bulk Cleanup trailing whitespace in api samples. 2013-04-10 08:41:39 +10:00
os-fping Add api samples to fping extension 2013-01-29 22:24:22 -05:00
os-hide-server-addresses Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
os-hosts Fix spice/vnc console api samples tests 2013-08-23 14:42:38 +01:00
os-hypervisors Adds host_ip to hypervisor show API 2014-02-05 22:52:28 +08:00
os-instance-actions Fix instance actions testing 2013-08-07 08:11:08 -07:00
os-instance_usage_audit_log Adds API Sample tests for os-instance_usage_audit_log extension. 2013-01-29 13:39:06 -02:00
os-keypairs Add Keypairs extension to API samples test. 2012-09-18 20:49:59 -04:00
os-migrations List migrations through Admin API 2013-07-09 11:25:35 +05:30
os-multiple-create Add MultipleCreate template and fix conflict with other templates 2013-03-07 13:48:24 -05:00
os-networks Add API sample tests to os-network 2013-02-04 15:04:13 +08:00
os-networks-associate Add more association support to network API 2012-12-17 17:26:03 +10:30
os-preserve-ephemeral-rebuild Add preserve_ephemeral option to rebuild 2014-01-16 16:24:05 +02:00
os-quota-sets Set default fixed_ip quota to unlimited. 2013-03-29 14:23:13 +11:00
os-rescue Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
os-security-group-default-rules Default SG rules for the Security Group "Default" 2013-02-19 01:50:51 +00:00
os-security-groups Add SecurityGroups API sample tests 2013-04-04 23:05:12 -04:00
os-server-diagnostics Add Server diagnostics extension api samples 2012-10-22 07:14:49 -04:00
os-server-external-events Add os-server-external-events API 2014-03-06 07:40:43 -08:00
os-server-groups Instance groups: validate policy configuration 2014-03-06 23:51:15 -08:00
os-server-password Add api extension to get and reset password 2013-01-07 15:35:45 -08:00
os-server-start-stop Add ServerStartStop extension API test 2012-09-07 15:17:21 -07:00
os-services Give a way to save why a service has been disabled. 2013-06-12 11:27:25 +10:00
os-shelve Add API sample files of "unshelve a server" API 2014-03-19 08:26:40 +09:00
os-simple-tenant-usage 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
os-tenant-networks add xml api sample tests to os-tenant-network 2013-05-24 13:40:41 +08:00
os-used-limits Sane rest API rate limit defaults 2013-06-27 16:00:58 -07:00
os-used-limits-for-admin Sane rest API rate limit defaults 2013-06-27 16:00:58 -07:00
os-user-data Add user-data extension to API samples tests 2012-09-18 14:29:04 -04:00
os-user-quotas Per-project-user-quotas for more granularity 2013-07-24 12:23:32 +08:00
os-virtual-interfaces Integration tests virtual interfaces API extension 2012-09-24 17:31:07 +02:00
os-volume-attachment-update Add support for volume swap 2013-07-24 15:09:39 -07:00
os-volumes Fix response from snapshot create stub 2013-05-14 09:09:36 +01:00
README.rst add hints to api_samples documentation 2013-11-06 01:57:46 +00:00
flavor-get-resp.json.tpl 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
flavor-get-resp.xml.tpl 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
flavors-list-resp.json.tpl 'm1.tiny' now has root_gb=1 2013-05-16 23:18:22 +00:00
flavors-list-resp.xml.tpl Add api sample tests for flavors endpoint 2012-08-31 13:19:10 -07:00
image-get-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-get-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-meta-key-get.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-meta-key-get.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-meta-key-put-req.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-meta-key-put-req.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-meta-key-put-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-meta-key-put-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-get-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-get-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-post-req.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-post-req.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-post-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-post-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-put-req.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-put-req.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-put-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-put-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
image-metadata-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-details-get-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-details-get-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-details-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-details-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-list-get-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-list-get-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-list-resp.json.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
images-list-resp.xml.tpl Add API samples to images api 2012-09-03 08:17:44 -04:00
limit-get-resp.json.tpl Sane rest API rate limit defaults 2013-06-27 16:00:58 -07:00
limit-get-resp.xml.tpl Sane rest API rate limit defaults 2013-06-27 16:00:58 -07:00
server-action-changepassword.json.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-changepassword.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-confirmresize.json.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-confirmresize.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-createimage.json.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-createimage.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-reboot.json.tpl Cleanup trailing whitespace in api samples. 2013-04-10 08:41:39 +10:00
server-action-reboot.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-rebuild-resp.json.tpl Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
server-action-rebuild-resp.xml.tpl Compare lists in api samples against all matches 2012-10-02 14:03:56 -07:00
server-action-rebuild.json.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-rebuild.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-resize.json.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-resize.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-revertresize.json.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-action-revertresize.xml.tpl Add api_samples tests for servers actions 2012-09-14 10:32:27 -07:00
server-get-resp.json.tpl Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
server-get-resp.xml.tpl Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
server-ips-network-resp.json.tpl Add servers/ips api_samples tests 2012-09-25 09:41:36 -07:00
server-ips-network-resp.xml.tpl Add servers/ips api_samples tests 2012-09-25 09:41:36 -07:00
server-ips-resp.json.tpl Add servers/ips api_samples tests 2012-09-25 09:41:36 -07:00
server-ips-resp.xml.tpl Add servers/ips api_samples tests 2012-09-25 09:41:36 -07:00
server-metadata-all-req.json.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-all-req.xml.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-all-resp.json.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-all-resp.xml.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-req.json.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-req.xml.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-resp.json.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-metadata-resp.xml.tpl Add Server Detail and Metadata tests 2012-09-07 14:44:09 -07:00
server-post-req.json.tpl Adds integration testing for api samples 2012-08-23 18:02:05 -07:00
server-post-req.xml.tpl Adds integration testing for api samples 2012-08-23 18:02:05 -07:00
server-post-resp.json.tpl Adds integration testing for api samples 2012-08-23 18:02:05 -07:00
server-post-resp.xml.tpl Adds integration testing for api samples 2012-08-23 18:02:05 -07:00
servers-details-resp.json.tpl Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
servers-details-resp.xml.tpl Revert "Include list of attached volumes with instance info" 2013-05-15 20:10:00 -04:00
servers-list-resp.json.tpl Adds more servers list and servers details samples 2012-09-12 14:57:52 -07:00
servers-list-resp.xml.tpl Adds more servers list and servers details samples 2012-09-12 14:57:52 -07:00
versions-get-resp.json.tpl Adds API version discovery support for V3 2013-08-28 14:49:05 +09:30
versions-get-resp.xml.tpl Adds API version discovery support for V3 2013-08-28 14:49:05 +09:30

README.rst

Api Samples

This part of the tree contains templates for API samples. The documentation in doc/api_samples is completely autogenerated from the tests in this directory.

To add a new api sample, add tests for the common passing and failing cases in this directory for your extension, and modify test_samples.py for your tests. There should be both JSON and XML tests included.

Then run the following command:

GENERATE_SAMPLES=True tox -epy27 nova.tests.integrated

Which will create the files on doc/api_samples.

If new tests are added or the .tpl files are changed due to bug fixes, the samples must be regenerated so they are in sync with the templates, as there is an additional test which reloads the documentation and ensures that it's in sync.

Debugging sample generation

If a .tpl is changed, its matching .xml and .json must be removed else the samples won't be generated. If an entirely new extension is added, a directory for it must be created before its samples will be generated.