nova/nova/tests/integrated/api_samples
Vishvananda Ishaya 71fabdc8dc Add api extension for new network fields.
This uses the existing api extension to implement the actual control
of the fields, but the check is based on a new dummy extension
called os-extended-networks.

Api sample tests added for new extension.

DocImpact: Adds an extension that enables extra fields for network
create. The new fields are:
  mtu: int (default flag) if set, nova sets the mtu on bridge. This
       allows network_device_mtu flag to be set per network.
  dhcp_server: ip (default == gateway) if different from gateway, sets
                nova to assume gateway is external.
  enable_dhcp: bool (default true) false will disable dhcp on network.
  share_address: bool (default flag) if specifed, network will have
                 the same dhcp ip on every host. This allows
                 share_dhcp_address flag to be set per network.
  allowed_start: ip if specified, reserves all ips before allowed_start.
  allowed_end: ip if specified, reserves all ips after allowed_end.

Partially-implements blueprint better-support-for-multiple-networks

Change-Id: I577fe5f6560be50106f345a42a826e97d5e7d64c
2014-08-19 11:21:23 -07:00
..
NMN Add api-samples to multinic extension 2013-01-25 14:18:43 -05:00
OS-DCF Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
OS-EXT-AZ Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
OS-EXT-IMG-SIZE Use actual fake timestamp in API templates 2014-04-29 14:51:01 +01:00
OS-EXT-IPS Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
OS-EXT-IPS-MAC Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
OS-EXT-SRV-ATTR Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
OS-EXT-STS Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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 Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04:00
all_extensions Add api extension for new network fields. 2014-08-19 11:21:23 -07:00
os-admin-actions Add API samples to Admin Actions 2012-10-29 07:17:32 -04:00
os-agents Fix agent_id with string type in API samples files for os-agents v2 2014-06-26 08:46:41 -07:00
os-aggregates Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04: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 Verify created_at cloudpipe timestamp is isotime 2014-04-29 14:51:42 +01:00
os-cloudpipe-update Add vpn ip/port setting support for CloudPipe 2012-11-30 19:24:32 +10:30
os-config-drive Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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-evacuate-find-host Add APIv2 support to make host optional on evacuate 2014-07-21 10:58:54 -03: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 Make hypervisor_version an int in fakeVirt driver 2014-03-31 16:25:55 -07:00
os-extended-networks Add api extension for new network fields. 2014-08-19 11:21:23 -07:00
os-extended-quotas Enhance the validation of the quotas update 2013-06-13 15:36:08 +08:00
os-extended-rescue-with-image Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
os-extended-services-delete Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04:00
os-extended-volumes Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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 Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
os-hosts Fix spice/vnc console api samples tests 2013-08-23 14:42:38 +01:00
os-hypervisor-status Return status for compute node 2014-07-22 10:44:05 -07:00
os-hypervisors Make hypervisor_version an int in fakeVirt driver 2014-03-31 16:25:55 -07:00
os-instance-actions Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04:00
os-instance_usage_audit_log Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04:00
os-keypairs Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -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 specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04:00
os-networks-associate Add more association support to network API 2012-12-17 17:26:03 +10:30
os-preserve-ephemeral-rebuild Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
os-quota-class-sets Revert "Remove broken quota-classes API" 2014-06-10 06:26:50 -07:00
os-quota-sets Set default fixed_ip quota to unlimited. 2013-03-29 14:23:13 +11:00
os-rescue Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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-list-multi-status servers list API support specify multi-status 2014-07-23 00:24: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 Fix doc for service list 2014-06-16 16:57:23 +00:00
os-shelve Add API sample files of "unshelve a server" API 2014-03-19 08:26:40 +09:00
os-simple-tenant-usage Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04:00
os-tenant-networks add xml api sample tests to os-tenant-network 2013-05-24 13:40:41 +08:00
os-used-limits Verify next-available limit timestamps are isotime 2014-04-29 14:51:36 +01:00
os-used-limits-for-admin Verify next-available limit timestamps are isotime 2014-04-29 14:51:36 +01: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 Add specific regexp for timestamps in v2 xml 2014-05-11 16:28:50 -04: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 Use actual fake timestamp in API templates 2014-04-29 14:51:01 +01: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 Verify next-available limit timestamps are isotime 2014-04-29 14:51:36 +01:00
limit-get-resp.xml.tpl Verify next-available limit timestamps are isotime 2014-04-29 14:51:36 +01: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 Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
server-action-rebuild-resp.xml.tpl Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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 Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
server-get-resp.xml.tpl Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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 Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01:00
servers-details-resp.xml.tpl Verify created/updated timestamps are isotime 2014-04-29 14:51:27 +01: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.