90 Commits

Author SHA1 Message Date
Stephen Finucane
5e2c31ab78 api: Add support for 'hostname' parameter
Add microversion 2.90, which allows allows users to configure the
hostname that will be exposed via the nova metadata service when
creating their instance.

Change-Id: I95047c1689ac14fa73eba48e19dc438988b78aad
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-01-14 11:42:43 +00:00
Victor Coutellier
4018d6fb71 Non-Admin user can filter their instances by more filters
Microversion bump to allow non-admin user to use more filters key
when listing instances.

In order to stay coherent, all existing instance filters who are
related to a field readable by default to non admin users when showing
instance details, should be allowed by default without policy
modification.

Implements: blueprint non-admin-filter-instance-by-az

Change-Id: Ia66d3a1ceb74ed521cf44922929b2a502f3ee935
2020-03-15 17:35:49 +01:00
Matt Riedemann
2d91a8463f docs: update SUSPENDED server status wrt supported drivers
Two things here:

1. The API guide was missing the hyper-v driver which supports
   the suspend operation. Rather than hard-code a list of supported
   drivers in the doc, this change just links to the entry in the
   feature support matrix.

2. The supported hypervisors mention in the API reference is removed
   because the end user using the API should not need to know or care
   what backend hypervisor on which their server is running. They can
   either suspend or not, but we don't need to mention the supporting
   drivers for that in the API reference.

Change-Id: Ib76779a8e34b2c68b0f4af190f71576180360d0f
Related-Bug: #1815403
2019-11-14 10:25:06 -05:00
Zuul
bd0eab8ff5 Merge ""SUSPENDED" description changed in server_concepts guide and API REF" 2019-11-14 03:08:11 +00:00
Sharat Sharma
3badb674f6 "SUSPENDED" description changed in server_concepts guide and API REF
The description of "SUSPENDED" server status was misguiding. Rewording
it to make it more accurate.

Change-Id: Ie93b3b38c2000f7e9caa3ca89dea4ec04ed15067
Closes-Bug: #1815403
2019-11-13 17:11:27 +00:00
Takashi NATSUME
a7c3108bf7 api-ref: Fix security groups parameters
The security groups parameters are optional
in the response of the following APIs.

- GET /servers/detail
- GET /servers/{server_id}
- PUT /servers/{server_id}
- POST /servers/{server_id}/action (rebuild)

So fix them.

Change-Id: Icc2315fd8b8c085de9d560de6ddf4c05aaaf6acb
Closes-Bug: #1846656
2019-10-07 10:25:02 +09:00
Ghanshyam Mann
f7e672d302 Update api-ref for 2.75 to add config_drive in server update response
In 2.75, we missed to add the config_drive field in api-ref for
update server response
- I9d257a003d315b84b937dcef91f3cb41f3e24b53.

This commit updates the api-ref.

Change-Id: I46ab0b8650bf50a5384bb56027cdf0dc2a9bb2fe
Partial-Implements: blueprint api-consistency-cleanup
2019-08-20 12:58:36 +00:00
Ghanshyam Mann
b26bc7fd7a Multiple API cleanup changes
This microversion implements below API cleanups:

1. 400 for unknown param for query param and for request body.

2. Making server representation always consistent among all APIs
   returning the complete server representation.

3. Change the default return value of ``swap`` field from the empty string
   to 0 (integer) in flavor APIs.

4. Return ``servers`` field always in the response of GET
   hypervisors API even there are no servers on hypervisor

Details: https://specs.openstack.org/openstack/nova-specs/specs/train/approved/api-consistency-cleanup.html

Partial-Implements: blueprint api-consistency-cleanup

Change-Id: I9d257a003d315b84b937dcef91f3cb41f3e24b53
2019-08-12 08:52:38 -05:00
Andreas Jaeger
dbe6321537 Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that Neutron publishes to api-ref/network, not networking anymore.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: Id2cf3aa252df6db46575b5988e4937ecfc6792bb
2019-07-22 19:17:28 +02:00
zhu.boxiang
564290ab14 Add host and hypervisor_hostname flag to create server
Add a new microversion that adds two new params to create
server named 'host' and 'hypervisor_hostname'.

Part of Blueprint: add-host-and-hypervisor-hostname-flag-to-create-server

Change-Id: I3afea20edaf738da253ede44b4a07414ededafd6
2019-07-09 22:55:16 +08:00
Stephen Finucane
81e4d13c32 conf: Rename 'configuration drive' to 'config drive'
Keeps dansmith happy.

Change-Id: Ifd8537692de98ee02ff7333812d2877273a0a388
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-20 18:23:14 +01:00
Zuul
a7058b1988 Merge "Update description of valid whitelist for non-admin user" 2019-05-23 07:30:53 +00:00
翟小君
31007102b0 Update description of valid whitelist for non-admin user
Non-admin user can filter instance by instance-uuid and other
filter keys with being configured using the "os_compute_api:
servers:allow_all_filters" policy rule. The policy rule was
added with Ia5504da9a00bad689766aeda20255e10b7629f63.

Closes-Bug:1819425

Change-Id: I74146b4370b6017cb199466258165fc6df080082
2019-05-22 20:56:41 +00:00
Matt Riedemann
c07746af90 api-ref: mention default project filtering when listing servers
This removes the "all" wording from the List Servers API
reference docs since it could be confused with actually returning
all servers across all tenants (the all_tenants filters). It also
mentions that by default only servers associated with the project
making the request are returned, i.e. the project associated with
the auth token on the request. This is probably fairly obvious
and automatic to anyone that's worked with openstack for a long
time but might not be for a new user and is not really documented
anywhere in the API reference or API guide that I could find.

Change-Id: Ie28164e4813a7a48addcd80d81c72c978ac9f395
2019-05-17 15:30:13 -04:00
Zuul
26b1761f3c Merge "api-ref: fix mention of all_tenants filter for non-admins" 2019-05-13 12:47:57 +00:00
Surya Seetharaman
c541ace518 Microversion 2.73: Support adding the reason behind a server lock
This patch adds a new parameter ``locked_reason`` to
``POST /servers/{server_id}/action`` request where the
action is lock. It enables the user to specify a reason when locking
a server.

The locked_reason will be exposed through ``GET servers/{server_id}``,
``GET /servers/detail``, ``POST /servers/{server_id}/action``  where
the action is rebuild and ``PUT servers/{server_id}`` requests' responses.

The InstanceActionNotification will emit the locked_reason
along with the other instance details. This patch hence changes the
payload object to include the "locked_reason" field.

Note that "locked" will be allowed as a valid filtering/sorting parameter
for ``GET /servers/detail`` and ``GET /servers`` from this new microversion.

Implements blueprint add-locked-reason

Change-Id: I46edd595e7417c584106487123774a73c6dbe65e
2019-05-11 21:48:27 +00:00
Matt Riedemann
57646dfe77 api-ref: fix mention of all_tenants filter for non-admins
The API reference for listing servers says that the all_tenants
filter parameter is available for non-admins which is likely
a mistake because of it being in the _get_server_search_options
method, but all_tenants is admin-only by default policy because
of the os_compute_api:servers:index:get_all_tenants and
os_compute_api:servers:detail:get_all_tenants policy rules.

This change fixes the API reference to remove all_tenants from
the list of non-admin filter parameters and also adds a note to
the _get_server_search_options method to avoid future confusion.

Change-Id: I0e937afbdf8e19d2efd626047913d4c8a9b88b76
Closes-Bug: #1828042
2019-05-07 10:47:04 -04:00
Yongli He
2cc7c0e589 Adds the server group info into show server detail API.
The server-groups UUID add to response of 'GET /servers/{id}',
'PUT /servers/{server_id}" and rebuild API
'POST /servers/{server_id}/action'.

Change-Id: I4a2a584df56ece7beb8b12c0ce9b0e6b30237120
Implements: blueprint show-server-group
Co-authored-by: Gerry Kopec <Gerry.Kopec@windriver.com>
Signed-off-by: Yongli He <yongli.he@intel.com>
2019-02-28 14:22:46 -05:00
Surya Seetharaman
833af5c9bf API microversion 2.69: Handles Down Cells Documentation
This patch adds the documentation around the work regarding
handling down cells that was introduced in v2.69.

Related to blueprint handling-down-cell

Change-Id: I78ed924a802307a992ff90e61ae7ff07c2cc39d1
2019-02-20 10:10:50 -08:00
Surya Seetharaman
983abb05d7 API microversion 2.69: Handles Down Cells
This patch introduces a new API microversion which will be
used to alter the responses of ``GET /servers``, ``GET /servers/detail``,
``GET /servers/{server_id}`` and ``GET /os-services`` when a cell is
down to return minimal constructs with missing keys.

Implements blueprint handling-down-cell

Change-Id: Id9f12532897912b39093f63e9286540d9029edeb
2019-02-15 14:39:20 -05:00
Matt Riedemann
014cf69415 Fix block_device_mapping_v2 mention in server create API reference
The parameter is "block_device_mapping_v2" with underscores
not dashes.

Change-Id: I10300b5614b6fd91a1992e6e22fb776815206795
2018-10-17 16:14:21 -04:00
zhangbailin
c7f4190af2 Add microversion 2.67 to support volume_type
Add a new microversion 2.67 to support specify ``volume_type``
when boot instances.

Part of bp boot-instance-specific-storage-backend
Change-Id: I13102243f7ce36a5d44c1790f3a633703373ebf7
2018-10-12 02:57:58 -04:00
Zuul
2274c08460 Merge "Remove deprecated hide_server_address_states option" 2018-09-21 13:58:57 +00:00
Matt Riedemann
9b69afd457 Remove deprecated hide_server_address_states option
The hide_server_address_states config option and related
policy rule were deprecated in Queens:

  I6040e8c2b3e132b0dfd09f82ae041b4786a63483

They are now removed in Stein as part of the API extension
merge effort.

Part of blueprint api-extensions-merge-stein

Change-Id: Ib3582038274dedbf524ffcaffe818ff0e751489d
2018-09-19 11:36:44 -04:00
zhangbailin
28c1075b59 Resource retrieving: add changes-before filter
This adds the changes-before filter to the servers,
os-instance-actions and os-migrations APIs for
filtering resources which were last updated before
or equal to the given time. The changes-before filter,
like the changes-since filter, will return deleted
server resources.

Part of bp support-to-query-nova-resources-filter-by-changes-before
Change-Id: If91c179e3823c8b0da744a9363906b0f7b05c326
2018-09-19 09:56:56 -04:00
Takashi NATSUME
3b01a728ce api-ref: Example verification for servers.inc
This patch verifies request and response bodies in servers.inc.

Change-Id: I9266e7513ed6eb00599dc766081ce81014a209bb
Closes-Bug: #1739573
2018-07-09 14:47:46 +00:00
Takashi NATSUME
0ffd2529b1 api-ref: Fix parameters about trusted certificate IDs
Fix the location of the 'trusted_image_certificates'
parameter in the parameter list
of the request body in the "Create Server" API.

Add an additional description that explains
the value is null if the trusted certificate IDs are not set
in the description for the 'trusted_image_certificates' parameter
in the response body.

Change-Id: Ibd3763044068c64b88a28d6c541c569233e112f8
Closes-Bug: #1777394
2018-06-22 02:52:33 +00:00
Brianna Poulos
8c7ca368b1 Add trusted_image_certificates to REST API
This change adds support for the trusted_image_certificates parameter,
which is used to define a list of trusted certificate IDs that can be
used during image signature verification and certificate validation. The
parameter may contain a list of strings, each string representing the ID
of a trusted certificate. The list is restricted to a maximum of 50 IDs.
The list of certificate IDs will be stored in the trusted_certs field of
the instance InstanceExtra and will be used to verify the validity of
the signing certificate of a signed instance image.

The trusted_image_certificates request parameter can be passed to
the server create and rebuild APIs (if allowed by policy):

* POST /servers
* POST /servers/{server_id}/action (rebuild)

The following policy rules were added to restrict the usage of the
``trusted_image_certificates`` request parameter in the server create
and rebuild APIs:

* os_compute_api:servers:create:trusted_certs
* os_compute_api:servers:rebuild:trusted_certs

The trusted_image_certificates parameter will be in the response
body of the following APIs (not restricted by policy):

* GET /servers/detail
* GET /servers/{server_id}
* PUT /servers/{server_id}
* POST /servers/{server_id}/action (rebuild)

APIImpact

Implements blueprint: nova-validate-certificates
Change-Id: Iedd3fea0e86648fae364f075915555dcb2c4f199
2018-06-13 15:52:59 -04:00
jichen
1c3151dd43 [doc] Add soft_deleted flag
soft_deleted is support in query but we didn't mention in the doc

bcb405e871/nova/db/sqlalchemy/api.py (L2127)

Change-Id: I1c5577a501144170e82c96c04cffbf32dcaa5cff
Closes-Bug: 1765575
2018-05-09 14:41:30 +00:00
Takashi NATSUME
39fbcfd518 api-ref: Parameter verification for servers.inc (3/3)
This patch completes parameter verification for servers.inc.

* Verifies remaining parameters
* Sorts parameters
* Adds missing parameters
* Removing unncessary parameters

Change-Id: If01b2dcfa9df8c0e80ad1da65115204fe321891b
Closes-Bug: #1738930
2018-04-11 00:33:52 +00:00
Takashi NATSUME
bab3184ced api-ref: Parameter verification for servers.inc (2/3)
This patch verifies BDM, fault and scheduler hint parameters.
A subsequent patch will verify other parameters.

Change-Id: If57aa3e37ebaa6fa13718480bb216d10664aa5b1
Partial-Bug: #1738930
2018-04-11 00:33:40 +00:00
Takashi NATSUME
56283f167d api-ref: Parameter verification for servers.inc (1/3)
This patch verifies query parameters.
Subsequent patches will verify other parameters.

Change-Id: I6078c0c8ebc888dc120f446f228a3b0433b89a76
Partial-Bug: #1738930
2018-03-27 17:06:45 +09:00
ghanshyam
f5cb62a1f4 Add server filters whitelist in server api-ref
We maintain the whitelist for valid server filters key
but have not documented those clearly.

This patch adds whitelist for non-admin and admin users.

Change-Id: Idc031916c804a18876551113a0fd57d4a463cd63
2018-01-30 09:24:46 +00:00
Matt Riedemann
126c3d4c78 Deprecate file injection
This microversion makes the following changes:

1. Deprecates personality files from POST /servers and the rebuild
   server action APIs.
2. Adds the ability to pass new user_data to the rebuild server
   action API.
3. Personality / file injection related limits and quota resources
   are removed from the limits, os-quota-sets and os-quota-class-sets
   APIs.

Implements blueprint deprecate-file-injection

Change-Id: Ia89eeb6725459c35369e8f790f68ad9180bd3aba
2017-12-12 09:22:21 -05:00
Zuul
691d99af63 Merge "block_device_mapping_v2.bus_type is missing from api-ref" 2017-11-14 12:37:01 +00:00
Kevin_Zheng
b6ed91d05c block_device_mapping_v2.bus_type is missing from api-ref
block_device_mapping_v2.bus_type is missing from
POST /servers API reference. This patch add it.

Change-Id: I998cf6195d72c80649e9e0fd43be0cf37f8e2f48
Closes-Bug: #1713895
2017-11-09 09:33:09 +08:00
Matt Riedemann
e315fcbec9 api-ref: fix server status values in GET /servers docs
The server status values exposed out of the API and used
for filtering when listing instances comes from the values
in nova.api.openstack.common._STATE_MAP. Some of the values
listed in the docs were incorrectly using variable names from
the code, which don't necessarily match the actual value exposed
out of the API.

The compute API server concepts guide actually had this all
correct, so this just updates the API reference.

Change-Id: I30b6f27c6e7fc9365c203b620b311785f8b4b489
Closes-Bug: #1722403
2017-10-11 16:33:15 -04:00
yushangbin
76323b39db Correct statement in api-ref
Change-Id: Idc69876695e04d85df942ea2374d89342b27dc0f
2017-08-21 11:33:34 +08:00
Kevin_Zheng
b50b5a660e Support tag instances when boot(4/4)
This is the 4th patch of the series,
this patch adds a new microversion
in API to support adding tags when
booting instances.

Implemetes: blueprint support-tag-instance-when-boot

Change-Id: Ifcaaf285c8f98a1d0e8bbbc87b2f57fbce057346
2017-07-17 15:59:42 -04: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
Jenkins
e5ffe02463 Merge "Fix api-ref for create servers response" 2017-04-11 12:06:44 +00:00
Jenkins
e78ff51bb4 Merge "api-ref: fix os-extended-volumes:volumes_attached in servers responses" 2017-04-11 12:04:39 +00:00
ghanshyam
435a898778 Fix api-ref for create servers response
create server API only return few elements in response
not all which are currently shown in api-ref.

This commit fix that.

Part of bp/api-ref-in-rst-pike

Change-Id: I782e97bc3ffb1e1c192b5a63736e524917739e4b
2017-04-11 03:20:19 +00:00
Jenkins
2669a89083 Merge "Add empty flavor object info in server api-ref" 2017-04-07 15:36:37 +00:00
Matt Riedemann
28831f3b3d api-ref: fix os-extended-volumes:volumes_attached in servers responses
There are two main changes here:

1. The contents of the os-extended-volumes:volumes_attached list are
   described, which are the id and delete_on_termination keys, the latter
   being introduced in the GET /servers response in 2.3.

2. The os-extended-volumes:volumes_attached parameters are removed from
   the PUT /servers and POST /servers responses, since we don't actually
   include those in the response for create and update operations, only
   GET /servers/{server_id} and GET /servers/detail operations.
   Note: create server is fixed in a follow up patch.

Change-Id: Ic92055e3095d220a3a11e35628f04e9e67c6b71a
Closes-Bug: #1675559
2017-04-07 13:40:08 +00:00
ghanshyam
af1734b0dd Add empty flavor object info in server api-ref
In case flavor information is not present in sysmeta then
GET/PUT server response can have flavor as empty object.

ref- http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/views/servers.py#n252

Having that mentioned in api-ref will be nice to understand it clearly.
Closes-Bug: #1677999

Change-Id: I350dc33df0cb03eb86df1f142e58ae34b02a1334
2017-04-05 02:52:41 +00:00
Jenkins
9b1ec228df Merge "Fix api-ref for adminPass behavior" 2017-03-31 15:17:35 +00:00
Takashi NATSUME
47bd7be882 api-ref: Fix wrong HTTP response codes
* POST /servers

  The 413 response code has not been expected
  since I470b53af45ff47c1dec98d09d7a426a29ca1efc6.
  So remove 413.

* POST /server/{server_id}/action

  In 'Rebuild' action, the 413 response code has not been expected
  since I470b53af45ff47c1dec98d09d7a426a29ca1efc6.
  So remove 413.

  In 'Rescue' action, the normal response code is actually 200
  instead of 202.
  So fix it.

Change-Id: I6e91d3ac751777f48ab084395a66cb3f83bfcca2
Implements: blueprint api-ref-in-rst-pike
Closes-Bug: #1677452
2017-03-30 13:51:07 +09:00
ghanshyam
78dee1de59 Fix api-ref for adminPass behavior
This commit fix the below doc issue for adminPass
 -'adminPass' attrbiure is only return in response if
  'enable_instance_password' configuration option is set to true
 - evacuate API stop returning adminPass from 2.14 microversion
   so max version for this field is 2.13.
 - if 'adminPass' is not present in request then, operation auto generate one.

Change-Id: I636657ed30b33da0a2df73b222c4ce5d8388a3d8
2017-03-28 06:51:01 +03:00
Jenkins
6dc60505f9 Merge "Add api-ref for filter/sort whitelist" 2017-03-17 16:13:44 +00:00