nova/nova/tests/functional/api_sample_tests
Mohammed Naser d72f24569e Add 'path' query parameter to console access url
Starting in noVNC v1.1.0, the token query parameter is no longer
forwarded via cookie [1]. We must instead use the 'path' query
parameter to pass the token through to the websocketproxy [2].
This means that if someone deploys noVNC v1.1.0, VNC consoles will
break in nova because the code is relying on the cookie functionality
that v1.1.0 removed.

This modifies the ConsoleAuthToken.access_url property to include the
'path' query parameter as part of the returned access_url that the
client will use to call the console proxy service.

This change is backward compatible with noVNC < v1.1.0. The 'path' query
parameter is a long supported feature in noVNC.

Co-Authored-By: melanie witt <melwittt@gmail.com>

Closes-Bug: #1822676

 Conflicts:
	doc/source/admin/remote-console-access.rst
	nova/tests/unit/console/test_websocketproxy.py

NOTE(melwitt): The conflicts are due to the following changes not being
in Rocky:

  I08991796aaced2abc824f608108c0c786181eb65
  I7f5f08691ca3f73073c66c29dddb996fb2c2b266

[1] 51f9f0098d
[2] https://github.com/novnc/noVNC/pull/1220

Change-Id: I2ddf0f4d768b698e980594dd67206464a9cea37b
(cherry picked from commit 9606c80402)
(cherry picked from commit 186aff98b7)
2019-08-06 19:20:50 +00:00
..
api_samples Add 'path' query parameter to console access url 2019-08-06 19:20:50 +00:00
README.rst add api-samples tox target 2015-12-03 22:43:26 +00:00
__init__.py Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
api_sample_base.py Fix os-simple-tenant-usage result order 2018-10-29 08:15:47 +00:00
test_admin_actions.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_admin_password.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
test_agents.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_aggregates.py Return uuid attribute for aggregates 2017-01-05 14:32:43 -05:00
test_assisted_volume_snapshots.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_attach_interfaces.py API support for tagged device attachment 2017-06-30 09:05:34 +03:00
test_availability_zone.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_baremetal_nodes.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_block_device_mapping_boot.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_cells.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_console_auth_tokens.py Add 'path' query parameter to console access url 2019-08-06 19:20:50 +00:00
test_console_output.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_consoles.py Remove unused request API sample template 2018-08-03 07:00:13 +00:00
test_create_backup.py 2.45: Remove Location header from createImage and createBackup responses 2017-04-25 15:52:14 -04:00
test_deferred_delete.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_evacuate.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_extension_info.py policy: clean-up 2016-06-30 19:56:14 +00:00
test_fixed_ips.py Remove support for /os-fixed-ips REST API 2018-06-26 09:20:28 -04:00
test_flavor_access.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_flavor_extraspecs.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_flavor_manage.py Add microversion to allow setting flavor description 2017-11-15 22:10:39 +00:00
test_flavors.py Add microversion to support extra_specs in flavor API. 2018-04-11 17:47:57 +08:00
test_floating_ip_dns.py Remove support for /os-floating-ip-dns REST API 2018-07-18 22:23:45 -04:00
test_floating_ip_pools.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_floating_ips.py Remove unused request API sample template 2018-08-03 07:00:13 +00:00
test_floating_ips_bulk.py Remove support for /os-floating-ips-bulk REST API 2018-07-18 22:23:45 -04:00
test_fping.py Remove support for /os-fping REST API 2018-05-10 15:26:13 -04:00
test_hide_server_addresses.py conf: Move api options to a group 2016-11-25 16:32:31 -06:00
test_hosts.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_hypervisors.py Proper error handling by _ensure_resource_provider 2017-11-30 18:30:49 +00:00
test_images.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
test_instance_actions.py Add host/hostId to instance action events API 2018-04-26 14:17:02 +00:00
test_instance_usage_audit_log.py Fix invalid import order 2016-07-04 11:23:52 +05:30
test_keypairs.py Replace uuid4() with uuidsentinel 2016-10-05 18:27:50 +05:30
test_limits.py Deprecate file injection 2017-12-12 09:22:21 -05:00
test_lock_server.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_migrate_server.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_migrations.py Add pagination and Changes-since filter support for os-migrations. 2018-01-10 14:02:53 -05:00
test_multinic.py Fix functional tests for USE_NEUTRON 2017-12-21 19:11:46 -05:00
test_multiple_create.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_networks.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_networks_associate.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_pause_server.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_preserve_ephemeral_rebuild.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_quota_classes.py Deprecate file injection 2017-12-12 09:22:21 -05:00
test_quota_sets.py Deprecate file injection 2017-12-12 09:22:21 -05:00
test_remote_consoles.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_rescue.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_security_group_default_rules.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_security_groups.py Fix functional tests for USE_NEUTRON 2017-12-21 19:11:46 -05:00
test_server_diagnostics.py Standardization of VM diagnostics info API. 2017-06-05 07:45:51 +00:00
test_server_external_events.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_server_groups.py Microversion 2.64 - Use new format policy in server group 2018-07-13 10:43:42 +08:00
test_server_metadata.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
test_server_migrations.py Fix ServerMigrationSampleJsonTests to use sample files from version dir 2018-07-19 05:13:24 +00:00
test_server_password.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_server_tags.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_servers.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_servers_ips.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
test_services.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_shelve.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
test_simple_tenant_usage.py Fix os-simple-tenant-usage result order 2018-10-29 08:15:47 +00:00
test_suspend_server.py Enable all extension for all remaining sample tests 2016-06-10 06:03:02 +00:00
test_tenant_networks.py Count networks to check quota 2017-06-19 21:51:46 +00:00
test_versions.py parametrize max_api_version in tests 2016-02-05 18:54:58 -05:00
test_virtual_interfaces.py Remove support for /os-virtual-interfaces REST API 2018-06-06 21:14:39 +00:00
test_volumes.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00

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.

Then run the following command:

tox -e api-samples

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 .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.