Commit Graph

416 Commits

Author SHA1 Message Date
Zuul 482d8c9621 Merge "api-ref: explain aggregate set_metadata semantics" 2019-03-04 13:20:13 +00:00
Matt Riedemann 268190b252 api-ref: explain aggregate set_metadata semantics
This came up as a source of confusion while reviewing
change Ic27195e46502067c87ee9c71a811a3ca3f610b73 because
I thought that the "metadata" key in the
POST /os-aggregates/{aggregate_id}/action (set_metadata)
API was an overwrite of the existing metadata rather than
an update.

The way the Aggregate.update_metadata() method works is that
new entries are added, existing metadata is updated if the
value is not None, otherwise existing entries are removed
if the value is None.

And because of the AggregateAPI.is_safe_to_update_az() method
the special "availability_zone" metadata cannot be unset to None
once it is set. So the only way to remove an AZ is to delete the
aggregate altogether.

This updates the API reference description of the "metadata"
parameter in the "set_metadata" action API.

Change-Id: I6fa9f9691b945b5212b7f951ab0a26b4d3049df9
Related-Bug: #1378904
2019-03-01 12:36:42 -05:00
Matt Riedemann 1241e3ec2a Stop using "nova" in API samples when creating a server
The "availability_zone" parameter for server create in the
API reference and the availabilty zone user docs both say
that users should not use the default availability zone (nova)
yet our server create API samples use "nova" which is...bad.

This change fixes the API samples and related tests to use
a fake "us-west" availability zone. For any samples that were
requesting an AZ when creating a server, those are changed from
requesting "nova" to requesting "us-west" and a new
AvailabilityZoneFixture is added to stub out the code used to
validate the requested AZ and what is shown in server detail
responses.

Some unused samples are removed from the os-availability-zone
directory and the API reference and AZ user docs are updated for
formatting and linking to other docs for reference.

Change-Id: I3161157f15f05a3ffaaf1b48e7beb6b3e59c5513
Closes-Bug: #1817963
2019-03-01 10:43:08 -05: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
Matt Riedemann 1c6fdc9aec Add microversion to expose virtual device tags
This change adds a new microversion to expose virtual
device tags for volumes and ports attached to a server.

Implements blueprint expose-virtual-device-tags-in-rest-api

Change-Id: I09420ff7134874dfe4dc399931c7740e81ecc2d0
2019-02-21 13:38:51 +00:00
Zuul f384b3b765 Merge "api-ref: warn about changing/unsetting AZ name with instances" 2019-02-19 19:19:52 +00:00
Stephen Finucane 36a91936a8 API: Remove evacuate/live-migrate 'force' parameter
Add a new microversion that removes support for the aforementioned
argument, which cannot be adequately guaranteed in the new placement
world.

Change-Id: I2a395aa6eccad75a97fa49e993b0300bdcfc7258
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Implements: blueprint remove-force-flag-from-live-migrate-and-evacuate
APIImpact
2019-02-08 17:05:19 -05:00
Matt Riedemann 5dc1ed3c5c api-ref: warn about changing/unsetting AZ name with instances
It is currently possible to rename or unset the availability_zone
metadata value on a host aggregate which can adversely impact
instances that were created in that specific AZ since later
attempts to migrate or unshelve those instances will fail if the
AZ with the original name no longer exists.

This adds a warning to the API reference for updating the AZ
name and also fixes a grammar typo in the 'metadata' response
parameter description.

Change-Id: Ie9d4a1ff1a23827490fe51350c11292c6efc4eb2
Related-Bug: #1378904
2019-02-06 16:11:40 -05:00
Zuul 88db2f9c0a Merge "Add restrictions on updated_at when getting instance action records" 2018-10-29 04:33:15 +00:00
Zuul 9a201632d3 Merge "Add restrictions on updated_at when getting migrations" 2018-10-27 00:42:54 +00:00
Zuul d223b1298b Merge "api-ref: Remove unnecessary minimum microversion" 2018-10-26 18:31:36 +00:00
Takashi NATSUME 4c531a5b94 api-ref: Add descriptions of error cases
In the following APIs, the 'changes-since' query parameter must be
earlier than or equal to 'changes-before' query parameter
otherwise the API returns 400.

* GET /servers
* GET /servers/detail

Add the description in each parameter.

Change-Id: Ieb26275deac2ddee3768a0fad7f37dc5795fb5c0
2018-10-25 07:46:30 +00:00
Takashi NATSUME 8a0e2a1085 api-ref: Remove unnecessary minimum microversion
A minimum microversion description that is the same as
the microversion the API is newly added is redundant
in parameters. So remove them.

Change-Id: I3e1ca88cac3a52a8b44e26f051a51a6db77a3231
Closes-Bug: #1799893
2018-10-25 16:37:21 +09:00
zhangbailin 3d4a7021db Add restrictions on updated_at when getting instance action records
If ``changes-before`` is less than ``changes-since`` in requested,
there will get empty data when querying in db, so add the limit of
these parameters. If ``changes-before`` < ``changes-since``, will
be returned 400.

Closes-Bug: #1796009
Change-Id: I44546bc9798708a48a250cc3a21bdbcabe2649e1
2018-10-24 11:14:26 -04:00
zhangbailin a3a0068929 Add restrictions on updated_at when getting migrations
If ``changes-before`` is less than ``changes-since`` in requested,
there will get empty data when querying in db, so add the limit of
these parameters. If ``changes-before`` < ``changes-since``, will
be returned 400.

Closes-Bug: #1796008
Change-Id: I2a39ac5a9fe969d383099b4e766c46ad05d9f67c
2018-10-24 11:11:49 -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
Zuul 1c1a111e5a Merge "Resource retrieving: add changes-before filter" 2018-09-21 11:48:29 +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
zhufl aa06c053e6 Fix some typos in nova api ref doc
* returnd
* specifiled
* obejct

Change-Id: I57af28fd3934b036c65e284d40ff27d043cd2431
2018-09-18 15:36:05 +08:00
Zuul fbc8ab2025 Merge "Making consistent used of GiB and MiB in API ref" 2018-08-22 04:03:01 +00:00
Sean Dague 8835198b8d Update api-guide and api-ref to be clear about forced-down
Closes-Bug: #1691871
Related-Bug: #1784826

Change-Id: Ifc6f1549d88a1b7d9f6e25c962c8a15dd8e180fb
2018-08-17 01:41:31 +00:00
Petersingh Anburaj eebffb3879 Making consistent used of GiB and MiB in API ref
This patch will replace all GB with GiB and MB with MiB
to have a consistent use of units in the compute API reference
and the placement API reference.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Ie40413752b591b222ff29dbe975ddd7d10638eca
Closes-Bug: #1752340
2018-08-16 22:42:00 +00:00
Zuul 8947097047 Merge "api-ref: fix GET /flavors?is_public description" 2018-08-15 13:33:56 +00:00
Zuul 2813e78558 Merge "Quota details for key_pair "in_use" is 0." 2018-08-10 17:57:47 +00:00
Matt Riedemann eff376b9fc api-ref: fix GET /flavors?is_public description
A couple of things are fixed here:

1. The type in the schema for the is_public query param
   is string, not boolean.

2. Since it's a string, the normal 1/yes/0/no types of
   "booleans" are allowed so document that along with
   the default.

3. Also mention that is_public='None' must be passed for
   an admin user to list both public and private flavors
   in a single request.

Change-Id: Idcb700b69f13217f68434fd6a54439cc277f8998
Partial-Bug: #1784782
2018-08-10 08:49:08 -04:00
Vishakha Agarwal fac7d6f2d2 Quota details for key_pair "in_use" is 0.
This patch updates the api-ref for 'in_use'
field of quota details for keypair which is
always 0 as it is user dependant parameter.

Closes-Bug: #1644457
Change-Id: I0323c411126314ddf3d689dc3120b039256ae81a
2018-08-10 10:33:59 +05:30
Zuul 9d546732c8 Merge "Update the parameter explain when updating a volume attachment" 2018-08-09 17:44:47 +00:00
fpxie a2a17c0625 Update the parameter explain when updating a volume attachment
When we update a volume attachment in nova api, we use volume_id instead
of attachment_id in params in latest api.

Change-Id: I5fc4d0ba3bb1c49dfaba2b2eed056441509cb9da
2018-08-09 02:45:19 +00:00
Zuul e0724cbb12 Merge "xx_instance_type_id in list_migrations should be integer" 2018-08-08 21:19:37 +00:00
zhufl ef7c961726 xx_instance_type_id in list_migrations should be integer
new_instance_type_id and old_instance_type_id in response
of list_migrations should be integer, not string.

Besides, this flavor id is not a common one specified by
users, but an internal one, so this is also to add a NOTE
to avoid the confusion.

"old_instance_type_id": 5140

https://developer.openstack.org/api-ref/compute/#list-migrations

Change-Id: I43c454ac1d7f7ef413d44fe411459e989611cadb
2018-08-08 09:32:23 +08:00
Takashi NATSUME 330c950908 api-ref: Add descriptions for rebuild
Add descriptions about specifying a new image and
asynchronous postconditions in the rebuild operation
in the compute API reference.

Change-Id: I0fd136d07dffc2be845b4b9330fae98c7115789b
Closes-Bug: #1784387
2018-08-07 23:57:22 +00:00
Zuul b046a99844 Merge "Complete the api-ref of security group rule" 2018-08-02 19:06:40 +00:00
Matt Riedemann ca70309987 api-ref: document user_data length restriction
user_data for server create and rebuild is limited to
65535 bytes in the schema, so we should be clear about
this limit in the API reference.

Change-Id: I61fe749ef20229744e1420779ae8128192704554
2018-07-26 21:56:26 -04:00
Yikun Jiang 5cdb1ce26b Microversion 2.64 - Use new format policy in server group
Enable users to define the policy rules on server group policy
to meet more advanced policy requirement. This microversion
brings the following changes in server group APIs:

* Add  ``policy`` and ``rules`` fields in the request of POST
  ``/os-server-groups``.
* The ``policy`` and ``rules`` fields will be
  returned in response body of POST, GET ``/os-server-groups``
  API and GET ``/os-server-groups/{server_group_id}`` API.
* The ``policies`` and ``metadata`` fields have been removed
  from the response body of POST, GET ``/os-server-groups`` API
  and GET ``/os-server-groups/{server_group_id}`` API.

Part of blueprint: complex-anti-affinity-policies

Change-Id: I6911e97bd7f8df92511e90518dba21c127e106a5
2018-07-13 10:43:42 +08:00
ghanshyam 917d8a41a2 Complete the api-ref of security group rule
Adding the correct path of examples in security
group rules api-ref.

Change-Id: I9b7ee5d6da7837901089861d0252f9792a817ce4
2018-07-12 07:12:20 +00:00
Zuul 0ef62de888 Merge "Simplify instance name generation" 2018-07-02 13:18:04 +00:00
Zuul 4c9f63463a Merge "update the description of hypervisor statistics response" 2018-06-29 05:44:47 +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
Stephen Finucane 2a969467dc Simplify instance name generation
Support for the 'multi_instance_display_name_template' option was
removed in commit 0e43002c9 and booting multiple instances now will
simply result in a simple numerical suffix (-1, -2, -3, ...) being added
to the instance's 'display_name' and 'hostname' attributes.

We're now in a position to greatly simplify how we do this, so do just
that, removing some comments and updating some documentation that
referenced the removed option in the process.

Change-Id: If5369bcf4a6f7fc36190e153776e60446eb14040
2018-06-18 14:46:44 +01:00
Matt Riedemann 763fd62464 Add policy rule to block image-backed servers with 0 root disk flavor
This adds a new policy rule which defaults to behave in a
backward compatible way, but will allow operators to enforce
that servers created with a zero disk flavor must also be
volume-backed servers.

Allowing users to upload their own images and create image-backed
servers on local disk with zero root disk size flavors can be
potentially hazardous if the size of the image is unexpectedly
large, since it can consume the local disk (or shared storage pool).

It should be noted that disabling the new policy rule will
result in a non-backward compatible API behavior change and no
microversion is being introduced for this because enforcement via
a new microversion would not close the security gap on any previous
microversions.

Related compute API reference and user documentation is updated
to mention the policy rule along with a release note since
this is tied to a security bug, which will be backported to stable
branches.

Change-Id: Id67e1285a0522474844de130c9263e11868f67fb
Closes-Bug: #1739646
2018-06-15 17:10:11 -04:00
Zuul a1e01a247c Merge "Add trusted_image_certificates to REST API" 2018-06-14 12:01:50 +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
Matt Riedemann c8edb8ce72 api-ref: expand on various bdm parameters
Some of the block_device_mapping_v2 parameter descriptions
were lacking details on valid values, combinations, restrictions
and how things get linked together, for example, to get a swap
bdm. This fills in the details and re-words things in some
places for clarity.

The mention of the libvirt driver in the guest_format for
non-swap ephemeral block devices is removed since (1) it's
overly confusing and (2) API users shouldn't know or care
if the hypervisor running their server is libvirt or not.
The point is, if you want swap, ask for swap, and if you want
ephemeral, specify one of the other values. Then you get what
you get and you don't throw a fit.

Change-Id: Ia7e49f28e2f410ada5c2f4c2e3a13ffd97e54654
2018-06-12 19:09:07 -04:00
Zuul 8ede37e8b1 Merge "Remove the remaining of the removed option" 2018-05-22 20:03:06 +00:00
Ken'ichi Ohmichi 89b3286ebc Remove the remaining of the removed option
Since I8ae8507a089df4d0a32be5fbc615e2166f44516e the config option
multi_instance_display_name_template has been removed.
So this patch removes the remaining of the option.

Change-Id: I81fa2588d85c803415aadf6150ed6cdd7a0fe6d1
2018-05-22 15:56:44 +00:00
Zuul d78055df0e Merge "api-ref: Fix parameters for os-volume-attachments.inc" 2018-05-21 13:41:07 +00:00
Takashi NATSUME a676d2e6b2 api-ref: Fix parameters for os-volume-attachments.inc
In the following APIs, the 'volume_id' parameters are
'path' parameters. So fix them.

- GET /servers/{server_id}/os-volume_attachments/{volume_id}
- DELETE /servers/{server_id}/os-volume_attachments/{volume_id}

In addition, the descriptions of the parameters are amended.

Change-Id: Iab93acde31639b1471c83b06fb1a77474bb52c48
Closes-Bug: #1770560
2018-05-11 14:26:37 +09:00
jichen 1c3151dd43 [doc] Add soft_deleted flag
soft_deleted is support in query but we didn't mention in the doc

https://github.com/openstack/nova/blob/bcb405e871a447df57ea420402919a256f5d0be9/nova/db/sqlalchemy/api.py#L2127

Change-Id: I1c5577a501144170e82c96c04cffbf32dcaa5cff
Closes-Bug: 1765575
2018-05-09 14:41:30 +00:00