Commit Graph

498 Commits

Author SHA1 Message Date
Sergey Nikitin a944838993 Standardization of VM diagnostics info API.
Before this patch, VM diagnostics response was just a
'blob' of data returned by each hypervisor. New API
version makes diagnostics response standardized.
New response has a set of fields which each hypervisor
will try to fill. If hypervisor unable to provide a
specific field then this field will be reported as 'None'.

Tempest tests: I7757c5beeea3d3b0bc15a51cafc5ea2ada65e76c

DocImpact: admin guide docs should be updated to mention
standardized version of the diagnostics response

blueprint: restore-vm-diagnostics

Change-Id: If0b1493cc5c1c7f0d9896dd68342ad4dea4f7da2
2017-06-05 07:45:51 +00:00
Chris Friesen 90636e0f33 show flavor info in server details
Add a new microversion to change the flavor field in the server
details to display a subset of the flavor information instead of
just a link to the original flavor.

This is more reliable since it shows the actual instance size, while
the flavor may have been deleted/recreated in the meantime or the
flavor extra-specs may have been modified.

Implements: blueprint instance-flavor-api
Change-Id: If646149efb7eec8c90bf7d07c39ff4c495349941
2017-06-02 12:09:24 -04:00
Chris Friesen 31d2e465e3 add new test fixture flavor with extra_specs
We support flavor extra_specs, so it would probably make sense to
have some in one of the test fixture flavors.

In order to make it compatible with the functional tests we'll make
it as small as m1.tiny.
Change-Id: Ic98d7dd2f44796279e18083a8c423aed0066d177
2017-06-01 22:43:13 -06:00
Sean Dague 99c690f57e Migrate to oslo request_id middleware - mv 2.46
In order to support cross project request_id tracking, we need to be
on oslo.middleware for request_id. This makes that change now that
oslo middleware can support compat headers.

api-ref is not updated yet because x-compute-request-id was apparently
never documented there, and the timing on landing this is narrow
because the moment a requirements update happens we'll have this new
behavior.

Part of bp:oslo-middleware-request-id

Change-Id: I4d9f91b01de12cd0a676fc649953f98473b6b416
2017-05-27 10:11:44 +00:00
Takashi NATSUME cbf83a01fb api-ref: Example verification for servers-actions.inc
* Example for the rebuild action

  The functional test is modified and
  the example is replaced with v2.26 examples.

* Example for the rescue action

  The example in API reference is replaced with
  the example with 'rescue_imgae_ref'.

Parameters for the rebuild action and the rescue action
are also fixed.

The patch completes the parameter verification and
the example verification of servers-actions.inc.

Change-Id: Iaf8808b13d1fdfead50da4cd447b3893578f76dd
Implements: blueprint api-ref-in-rst-pike
2017-05-22 00:19:19 +00:00
Takashi NATSUME 2376ae1687 api-ref: Fix examples for add/removeFixedIp action
The nova-network has been deprecated since Newton.
In neutron case, a network ID is a UUID.
So replace an integer network ID with a UUID
in the addFixedIp action example.

The format of removeFixedIp action example
is fixed.

Change-Id: Icaaf25e7648a75b66f6fcaddd759fdf243810db4
Implements: blueprint api-ref-in-rst-pike
2017-05-15 01:19:54 +00:00
Takashi NATSUME 5532d6f404 Add a functional test for 'removeFloatingIp' action
Add a functional test for 'removeFloatingIp' action.
Rename the example file for 'addFloatingIp' action
to clarify that it is a request body example.

Change-Id: Ic865318fa640eb17d1317fb3d5f064788ebf44e7
2017-05-08 19:32:53 +00:00
Matt Riedemann 66b0cf3337 2.45: Remove Location header from createImage and createBackup responses
This changes the response for the createImage and createBackup
server action APIs to no longer return a Location header and instead
returns a json dict body with the snapshot image ID. This is done
in a new microversion.

Implements blueprint remove-create-image-location-header-response

Closes-Bug: #1679285

Change-Id: Idc899ee76b8265b1c9e0871b6c7c277424cdd442
2017-04-25 15:52:14 -04:00
He Jie Xu 03ce169884 Deprecate Multinic, floatingip action and os-virtual-interface API
The following APIs which are considered as proxies of Neutron networking
API, are deprecated and will result in a 404 error response in new
Microversion:

     POST /servers/{server_uuid}/action
     {
         "addFixedIp": {...}
     }
     POST /servers/{server_uuid}/action
     {
         "removeFixedIp": {...}
     }
     POST /servers/{server_uuid}/action
     {
         "addFloatingIp": {...}
     }
     POST /servers/{server_uuid}/action
     {
         "removeFloatingIp": {...}

And the nova-network specific API for query server's interfaces is
deprecated also:

     GET /servers/{server_uuid}/os-virtual-interfaces

Partial implement blueprint deprecate-multinic-proxy-api

Change-Id: I1848db384a825d3b166f113b30ebad92113af8e5
2017-04-25 12:04:05 -04:00
jichenjc aad4be2e3d Deprecate os-hosts API
This patch deprecates os-hosts APIs including:

GET /os-hosts - list hosts
GET /os-hosts/{host_name} - show host details
PUT /os-hosts/{host_name} - update host status
GET /os-hosts/{host_name}/reboot - reboot host
GET /os-hosts/{host_name}/shutdown - shutdown host
GET /os-hosts/{host_name}/startup - start host

Much of the ``os-hosts`` API is duplicated with the ``os-services`` and
``os-hypervisors`` APIs. It's not a good idea to make nova have the
compute related API, so this patch deprecated them.

Implements blueprint deprecate-os-hosts

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Change-Id: Ieb85653b85a1eff38a9fb0c9ff05e4cd39150ecc
2017-04-20 11:58:26 -04:00
Matt Riedemann 75a7e6fc7d Remove unused os-pci API
The os-pci API was never part of the v2.0 API and was added
to the v3 API, but when the v3 API turned into the v2.1 API
which is backward compatible with the v2.0 API, the os-pci
API was removed from v2.1. The original intent was to enable
it in a microversion but that never happened.

We should just delete this API since it has a number of issues
anyway:

1. It's not documented (which makes sense since it's not enabled).
2. The PciHypervisorController just takes the compute_nodes.pci_stats
   dict and dumps it to json out of the REST API with no control over
   the keys in the response. That means if we ever change the fields
   in the PciDevicePool object, we implicitly introduce a backward
   incompatible change in the REST API.
3. We don't want to be reporting host stats out of the API [1].
4. To make the os-hypervisors extension work in a multi-cell environment
   we'd have to add uuids to the PciDevices model and change the API to
   return and take in uuids to identify the devices for GET requests.
5. And last but not least, no one has asked for this in over two years.

As a result of removing this API we can also remove the join on the
pci_devices table when showing details about an instance or listing
instances, which were added years ago because of the PciServerController:

Id3c8a0b187e399ce2acecd4aaa37ac95e731d46c

Id3e60c3c56c2eb4209e8aca8a2c26881ca86b435

[1] https://docs.openstack.org/developer/nova/policies.html?#metrics-gathering

Closes-Bug: #1426241
Closes-Bug: #1673869

Change-Id: I9099744264eeec175672d10d04da69648dec1a9d
2017-04-18 23:47:40 -04:00
Jenkins b5a9ebf4f2 Merge "Add server-action-removefloatingip.json file and update servers-actions.inc" 2017-04-07 18:34:30 +00:00
libing e0582bf174 Add server-action-removefloatingip.json file and update servers-actions.inc
Part of bp:api-ref-in-rst-pike

Change-Id: I6a7dbbd5d999fef557a110a6828a317e2e8da3c0
2017-03-31 14:12:38 +00:00
Jenkins 7f5dd33a70 Merge "Complete verification of servers-action-fixed-ip.inc" 2017-03-28 10:58:37 +00:00
Andreas Jaeger 7ad3807500 Fix api-ref with Sphinx 1.5
Sphinx 1.5 is more picky about highlighting and currently building of
api-ref fails with:

Warning, treated as error:
/home/aj/Software/vcs/OpenStack/openstack/nova/api-ref/source/index.rst:4:
WARNING: Could not lex literal_block as "json". Highlighting skipped.

Fix problems found:
Remove duplicate "progress: 0" from
os-rescue/server-get-resp-unrescue.json,
os-server-tags/v2.26/servers-tags-details-resp.json,
os-server-tags/v2.26/server-tags-show-details-resp.json.

Change json to javascript for highlighting of delete_info.

Change-Id: I7cd969fb4c9d4bff995c34725cfb739cccaba12c
2017-03-03 11:58:50 +01:00
stewie925 5c574cf31c Complete verification of servers-action-fixed-ip.inc
This includes the parameter, body, and example verifications for
api-ref servers-action-fixed-ip.

part of bp:api-ref-in-rst-pike

Change-Id: I2b9971d7ff3716f330b55020bf37489dbc9e9b2c
2017-02-28 09:28:59 -08:00
Artom Lifshitz e80e2511cf Fix tag attribute disappearing in 2.33 and 2.37
In the context of device tagging, bugs have caused the tag attribute
to disappear starting with version 2.33 for block_devices and starting
with version 2.37 for network interfaces. In other words, block
devices could only be tagged in 2.32 and network interfaces between
2.32 and 2.36 inclusively.

This patch documents this behaviour in api-ref and introduces
microversion 2.42, which re-adds the tag in all the right places.

Change-Id: Ia0869dc6f7f5bd347ccbd0930d1d668d37695a22
Closes-bug: 1658571
Implements: blueprint fix-tag-attribute-disappearing
2017-01-30 19:38:46 -05:00
Jay Pipes 03c2776e49 Return uuid attribute for aggregates
Adds a Compute API microversion that triggers returning an aggregate's UUID
field. This field is necessary for scripts that must populate the placement API
with resource provider to aggregate relationships, which rely on UUIDs for
global identification.

APIImpact
blueprint: return-uuid-from-os-aggregates-api
Change-Id: I4112ccd508eb85403933fec8b52efd468e866772
Closes-bug: #1652642
2017-01-05 14:32:43 -05:00
Diana Clarke 83404013cb Simple tenant usage pagination
Add optional parameters 'limit' and 'marker' to the
os-simple-tenant-usage endpoints for pagaination.

  /os-simple-tenant-usage?limit={limit}&marker={instance_uuid}
  /os-simple-tenant-usage/{tenant}?limit={limit}&marker={instance_uuid}

The aggregate usage totals may no longer reflect all instances for a
tenant, but rather just the instances for a given page. API consumers
will need to stitch the aggregate data back together (add the totals)
if a tenant's instances span several pages.

Implements blueprint paginate-simple-tenant-usage
Change-Id: Ic8e9f869f1b855f968967bedbf77542f287f26c0
2016-12-14 03:33:50 +00:00
Pavel Kholkin df6e2d37f2 [proxy-api] microversion 2.39 deprecates image-metadata proxy API
Almost all proxy APIs were deprecated in microversion 2.36.
But the sub-resource image-metadata of image was forgotten to deprecate.
This patch deprecates the image-metdata API from 2.39.

Implements blueprint deprecate-image-meta-proxy-api
Closes-bug: #1614578

Change-Id: I5507337ab6fe4a377f66dec3fe275d75618cd7b4
2016-12-07 19:22:43 +03:00
Jenkins 6a2b1e2c99 Merge "Fix data error in api samples doc" 2016-11-17 01:11:26 +00:00
int32bit 512ebfb186 Fix data error in api samples doc
Change-Id: I8c4f49d18968636da7e76b51acc6053f169e3ae0
Closes-Bug: #1641988
2016-11-16 20:58:06 +08:00
Matt Riedemann 1e4178b6a0 Add functional api_samples test for addFloatingIp action
This is needed for filling the gap in the api-ref docs.

Change-Id: Ib21e4ae25780c1780678074b4ccc5a86944ce992
Related-Bug: #1636185
2016-11-07 11:30:08 -05:00
Jenkins f5c0b59fd6 Merge "Adding functional tests for 2.3 microversion" 2016-09-07 13:49:56 +00:00
Sarafraj Singh 47b19ffb54 Adding functional tests for 2.3 microversion
Change-Id: Id5cf7ef5c3c7049e36da42f59fd67a61cd3df2d9
Closes-Bug: #1602797
2016-07-27 14:59:28 -05:00
He Jie Xu 1794fae8f3 Bump Microversion to 2.36 for Proxy API deprecation
This is the final patch in this series. This patch bumps the
microversion to 2.36, all the proxy APIs were deprecated.

Partially implements blueprint deprecate-api-proxies

Change-Id: I1a8a44530be29292561e90d6f7bd7ed512a88ee3
2016-07-26 19:26:37 +08:00
Jenkins ab1563a273 Merge "Fix wrong JSON format in API samples" 2016-07-13 04:26:42 +00:00
Pavel Kholkin 47358449d3 Microversion 2.35 adds keypairs pagination support
After this microversion Nova API allows to get several keypairs
with the help of new optional parameters 'limit' and 'marker'
which were added to GET /os-keypairs request.

Partial-Bug: #1599904

Implements blueprint: keypairs-pagination

Change-Id: Idd3757f5be90ec4af1bd1a7ca3f9c20319dbfd33
2016-07-12 19:48:05 +03:00
Timofey Durakov 452be384cd rest api version bumped for async pre live migration checks
pre live-migration checks now are done in async way. This patch
updates rest api version to keep this tracked.

bp: async-live-migration-rest-check

Change-Id: I9fed3079d0f1b7de3ad1b3ecd309c93785fd11fe
2016-07-11 14:57:54 -07:00
Takashi NATSUME 31ad01f0f1 Fix wrong JSON format in API samples
Fix wrong JSON format in snapshot-create-assisted-req.json.

Change-Id: I0817171bd7bc67384d4c40854ce5dc2952b38cfa
Closes-Bug: #1600070
2016-07-08 10:15:29 +09:00
Jenkins 94c96f226a Merge "api-ref: verify assisted-volume-snapshots.inc" 2016-07-04 14:51:03 +00:00
ghanshyam 26d4c055cc api-ref: verify assisted-volume-snapshots.inc
This completes the verification of os-assisted-volume-snapshots.inc
for all required area(parameter, example, body)

Part of bp:api-ref-in-rst

Change-Id: I9544e9681bcdd83ca5d2bf6b8722db0a71665b8b
2016-07-01 07:23:33 +00:00
liyingjun ec53c6c0ec Microversion 2.33 adds pagination support for hypervisors
When there are thousands of compute nodes, it would be slow to get the
whole hypervisor list, and it is bad for user experience to display
thousands of items in a table in horizon. This patch is proposed to
support pagination for hypervisor by adding `limit` and `marker` to
the list api.

Implements blueprint: pagination-for-hypervisor

Change-Id: Ie7f8b5c733b383f3e69fa23188e56257e503b5f7
2016-07-01 08:47:50 +08:00
Jenkins 7ffb5aac90 Merge "api-ref: Example verification for os-agents.inc" 2016-06-30 23:10:16 +00:00
Artom Lifshitz e83e114e1b Device tagging API support
This patch allows the user to specify a tag for a virtual network
interface and/or block device mapping when booting an instance.

Implements: blueprint bp/virt-device-role-tagging
Change-Id: I89247200f4cf1f644daf476727b4a6acb22b0cf6
2016-06-29 20:55:16 -07:00
Takashi NATSUME ba71b8d9ab api-ref: Example verification for os-agents.inc
Currently only 'xen' is supported for the 'hypervisor'
parameter. So examples are changed to 'xen'
instead of 'hypervisor'.

Change-Id: Ibd40dcfd3801c7a4165e299a1232ea46f2f17cf4
Implements: blueprint api-ref-in-rst
2016-06-27 21:29:26 +09:00
Jenkins 491613e3f3 Merge "Fix ConsoleAuthTokens to work for all console types" 2016-06-24 15:58:21 +00:00
Radoslav Gerganov 3c3925e71a Fix ConsoleAuthTokens to work for all console types
The current API allows getting connection info only for tokens which
correspond to RDP consoles. It should work for all types of tokens. This
patch introduces a new microversion which fixes this problem.

APIImpact

blueprint fix-console-auth-tokens

Change-Id: I27a65e0cd8b5eb51ecdc84cbf310ae107ff131dc
2016-06-22 17:11:09 +03:00
Takashi NATSUME a7cbc90fb1 api-ref: Improve os-instance_usage_audit_log samples
Improve api samples for os-instance_usage_audit_log
and fix a parameter.

Change-Id: I8436a6ab0610e41d8c6c95c55a263fdfbbf58476
Implements: blueprint api-ref-in-rst
2016-06-21 20:30:11 +09:00
Jenkins 2b0557e4ee Merge "Added missed response to test_server_tags" 2016-06-16 01:51:55 +00:00
Sergey Nikitin a7aafd99c3 TrivialFix: Remove extra comma from json
JSON standard does not allow trailing comma.
Because of this comma my local tox -e docs failed.
It's strange that it works in gate and check jobs.

Change-Id: I58bf48c248b1722a730667ec7c5e792e6929d2df
2016-06-14 17:35:35 +03:00
Sergey Nikitin 15a94581a6 Added missed response to test_server_tags
Also other server tags templates were modified
to improve future api ref docs.

Change-Id: Idab0328f9cdbe0d85880209a2b22ffc7df2201a0
2016-06-14 17:06:47 +03:00
Sean Dague d8673cb256 remove processing of blacklist/whitelist/corelist extensions
This removes the facility in the API router to have limited lists of
extensions. From this point forward, what is in Nova is loaded, no
exceptions.

A number of unit tests and fakes have to be updated to pass after
this, as many unit tests were sending small lists of extensions to the
API router to simplify the responses they were getting back. This also
required stubbing out the request db cache in some cases, because
extensions later get content from there to avoid additional db
hits. As well as adjusting a few samples tests which now return more
data because all the extensions are always loaded.

There is much cleanup to happen after this, but this is the smallest
unit to get us over this boundary which will start letting us to
refold extensions back into the base views (and massively simplify the
API code).

This does not yet remove the config options because there is another
place those get used in servers.py and the testing fallout of that is
much bigger.

The reno will come with that patch.

Change-Id: I3e72f5e23ce39148f31dfdb76d18f403c6d04842
2016-06-10 11:37:09 -04:00
Sean Dague 43f69041e9 fix OS-SCH-HNT:scheduler_hints location in sample
OS-SCH-HNT:scheduler_hint is actually a top level attribute, because
of historical accident in the yesteryear of v1 (and thus v2 and
v2.1). One day we should fix this.

Change-Id: I34c105628e274dcc2f8101514f95b9032b2b9f71
2016-06-10 11:37:09 -04:00
ghanshyam f44d1aff9d Enable all extension for all remaining sample tests
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for all the remaining sample tests
and remove extensions specific tests and sample files.

Also remove extension setting specific logic from base test class
along with TODOs.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I66b593760789e5b3b92137a672246f8d91e44cba
2016-06-10 06:03:02 +00:00
ghanshyam 08f18502b4 Enable all extension for remaining server API tests
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for remaining server API tests
and remove its specific extensions tests and sample files.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I3cf5762477b8b77bec4e6cb8f7119c62df7c706a
2016-06-09 08:53:32 -04:00
ghanshyam f26f18e20c Enable all extension for server API tests part-1
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for server API tests and remove its specific
extensions tests and sample files.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I7e12a4491738c2908c1dd134c05f38e0db497ee7
2016-06-09 08:53:30 -04:00
ghanshyam 30cfa1db47 Enable all extension for server actions sample tests
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for server actions tests and
remove its specific extensions tests and sample files.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I88a293958c4c8a1b2c50a837c23bcdda8010e075
2016-06-09 11:13:19 +09:00
ghanshyam 8291e5e247 Enable all extension for Flavor API sample tests
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for Flavor API tests and remove its specific
extensions tests and sample files.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I9fc496a6a05f794a31b0b361cc98d2f4b2f79818
2016-06-09 10:25:21 +09:00
Sylvain Bauza 7aa2285e72 API change for verifying the scheduler when live migrating
After modifying the evacuate action, we now add a new microversion
change for modifying the live-migrate call so that the scheduler is
called when the admin user provides an hostname unless the force
field is provided.

APIImpact

Implements: blueprint check-destination-on-migrations-newton

Change-Id: I212cbb44f46d7cb36b5d8c74a79065d38fc526d8
2016-06-06 11:44:06 +02:00