Commit Graph

426 Commits

Author SHA1 Message Date
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
Yikun Jiang 9614354535 Fix the server group "policy" field type in api-ref
The server group policy field added in v2.64 is a string but
the API reference says the parameter is an object.

This patch changes it from "object" to "string".

Change-Id: I1b4efe8afb302d94c810389e124c5370cbe72ddf
Closes-bug: #1830800
2019-05-29 09:16:51 +08:00
Zuul 780f737547 Merge "api-ref: 'os-hypervisors' doesn't reflect overcommit ratio" 2019-05-13 17:35:20 +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 214656eff2 api-ref: fix description of os-server-external-events 'events' param
The description on the 'events' parameter for the
POST /os-server-external-events API did not make sense,
so this re-words it.

Change-Id: Iaec80e03a8ab0cd1b34126701bd0754953394e42
2019-04-03 18:08:41 -04:00
Matt Riedemann 3dbb0c4c57 api-ref: document ordering for instance actions and events
Whenever I use the os-instance-actions API I have to look at
the DB API source code to figure out the sort order of the
resulting instanceActions and each action's events, which
is desc(created_at) in both cases (and desc(id) but that should
not matter here since the id is not exposed in the API).

This change mentions the resulting sort order of those fields
in the API reference so I can stop looking at source code.

[1] https://github.com/openstack/nova/blob/e7ae6c65c/nova/db/sqlalchemy/api.py#L5149
[2] https://github.com/openstack/nova/blob/e7ae6c65c/nova/db/sqlalchemy/api.py#L5289

Change-Id: Ib5758bc21296e8b6c041198661c147b8e99d57e5
2019-04-03 18:03:28 -04:00
Matt Riedemann 45cecbb427 Fix JsonFilter query hint examples in docs
The API reference and part of the scheduler filter docs for
the JsonFilter query hint are using invalid json strings
in the examples.

This fixes both invalid locations using the same json string
used in the openstack server create command example in the
scheduler admin docs.

Change-Id: Iaab8608c7ffa6fbbea40a838dd02d8096f632f7a
Closes-Bug: #1821764
2019-03-26 12:05:30 -04:00
Takashi NATSUME f87bf4c6b9 api-ref: Add description for BDM volume_size
Add description of cases that 'block_device_mapping_v2.volume_size`
is required in the "Create Server" (POST /servers) API.

Change-Id: I36f28ca756b908b5fc591cc87f5786a3e217285e
Closes-Bug: #1818310
2019-03-13 16:17:20 +00:00
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
Stephen Finucane f30aa064f9 api-ref: 'os-hypervisors' doesn't reflect overcommit ratio
We could/should introduce an API microversion to correct this or remove
it, given that placement should be the go-to reference for this stuff
going forward. However, for now we take the path of least resistance and
document the broken behavior.

Change-Id: Id8532d5a9480e4f71a9390e3b98886c85e27d003
2018-10-19 16:46:33 +01: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