Commit Graph

478 Commits

Author SHA1 Message Date
Zuul a031921f42 Merge "Note the deleyad address view" 2024-04-29 18:59:37 +00:00
afazekas 25c13220c6 Note the deleyad address view
The addresses field containes delayed (cached) information,
due to internal implementation details.
This used to be considered API contact breakage,
but apperently no plan for fixing it.

Change-Id: I8db2800ede0276d60138369ec2d60c55a1791040
2024-04-29 17:30:10 +00:00
Rajesh Tailor c98c8d84ee Add support for showing requested az in output
As of now, the server show and server list --long output
shows the availability zone, that is, the AZ to which the
host of the instance belongs. There is no way to tell from
this information if the instance create request included an
AZ or not.

This change adds a new api microversion to add support for
including availability zone requested during instance create
in server show and server list --long responses.

Change-Id: If4cf09c1006a3f56d243b9c00712bb24d2a796d3
2024-03-01 21:39:04 +05:30
Ghanshyam Mann 0c1e1ccf03 HyperV: Remove RDP console API
RDP console was only for HyperV driver so removing the
API. As API url stay same (because same used for other
console types API), RDP console API will return 400.

Cleaning up the related config options as well as moving its
API ref to obsolete seciton.

Keeping RPC method to avoid error when old controller is used
with new compute. It can be removed in next RPC version bump.

Change-Id: I8f5755009da4af0d12bda096d7a8e85fd41e1a8c
2024-02-13 12:24:38 -08:00
Ghanshyam Mann c76c72cfe0 Remove HyperV: cleanup doc/code ref
Cleanup doc/code ref of HyperV driver.

Change-Id: I6cd8fb90829e040bfd356ff6b1c41aa9a1c906d2
2024-02-07 12:08:07 -08:00
Sean Mooney 320c6fadde [codespell] fix typos in api-ref
this change uses codespell to fix typos in
the api-ref and updates setup.cfg to exclude more
binary types and build files.

Change-Id: Ife9bf9a87c70126969bf43f7aa4a3645617de901
2023-10-03 01:09:59 +01:00
Artom Lifshitz 9980b9ad52 Microversion 2.94: FQDN in hostname
Extend microversion 2.90 to allow FQDNs in the hostname parameter.
Multi-create with --hostname continues to be refused, returning error
400 to the user. This simplifies the code by not needing to handle any
sort of suffix or prefix mangling of the FQDN to handle multiple
instances. No other changes are made - not Neutron integration,
metadata API changes (the FQDN will appear as-is in places where the
hostname currently appears), etc.

Change-Id: I47e397dc6da8263762479cc8ae4f8777a6d9d811
Implements: bp/fqdn-in-hostname
2023-01-17 10:59:37 -05:00
Amit Uniyal b7356303cd Updated flavors doc
Flavor with special characters in flavor ID is not allowed to create

Closes-Bug: 1920938
Change-Id: I600ae07f7fb039c9ccf461c4bf74ae42d9a3744f
2022-09-17 17:40:52 +00:00
Dan Smith 45c5b80fd0 Add API support for rebuilding BFV instances
This adds a microversion and API support for triggering a rebuild
of volume-backed instances by leveraging cinder functionality to
do so.

Implements: blueprint volume-backed-server-rebuild
Closes-Bug: #1482040

Co-Authored-By: Rajat Dhasmana <rajatdhasmana@gmail.com>

Change-Id: I211ad6b8aa7856eb94bfd40e4fdb7376a7f5c358
2022-08-31 18:05:03 +05:30
Sylvain Bauza a755e5d9f2 api: Drop generating a keypair and add special chars to naming
As agreed in the spec, we will both drop the generation support for a keypair
but we'll also accept @ (at) and . (dot) chars in the keyname, all of them in
the same API microversion.

Rebased the work from I5de15935e83823afa545a250cf84f6a7a37036b4

APIImpact

Implements: blueprint keypair-generation-removal
Co-Authored-By: Nicolas Parquet <nicolas.parquet@gandi.net>

Change-Id: I6a7c71fb4385348c87067543d0454f302907395e
2022-07-28 11:05:50 +02:00
René Ribaud 09239fc2ea Allow unshelve to a specific host (REST API part)
This adds support to the REST API, in a new microversion, for specifying
a destination host to unshelve server action when the server
is shelved offloaded.
This patch also supports the ability to unpin the availability_zone of an
instance that is bound to it.

Note that the functional test changes are due to those tests using the
"latest" microversion 2.91.

Implements: blueprint unshelve-to-host
Change-Id: I9e95428c208582741e6cd99bd3260d6742fcc6b7
2022-07-22 10:22:34 +02:00
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
Zuul 9757eebcba Merge "fup: Fix os-volume_attachments api-ref parameters" 2021-08-25 10:16:21 +00:00
Zuul 33e46b1aec Merge "api: Introduce microversion 2.89 adjusting os-volume_attachments" 2021-08-24 21:38:48 +00:00
Lee Yarwood a057bbc406 fup: Fix os-volume_attachments api-ref parameters
Change-Id: Ibf5ca2969065262f4aa14b3764af74af37d88408
2021-08-24 19:03:57 +01:00
Lee Yarwood ac21c6674c api: Introduce microversion 2.89 adjusting os-volume_attachments
This microversion adds attachment_id and bdm_uuid as stored in the
underlying bdm record while also removing the duplicate id field from
the responses of ``GET /servers/{server_id}/os-volume_attachments`` and
``GET /servers/{server_id}/os-volume_attachments/{volume_id}``.

To accomidate this within the _translate_attachment_summary_view helper
is folded into _translate_attachment_detail_view with the remaining
caller in the now deprecated os-volumes API now replaced with a static
dictionary.

Blueprint: add-attachmentid-to-responses-of-the-os-volume-attachments-api
Change-Id: I977c3fd9bbb1e1d42e6979222137e7366d2815e8
2021-08-24 12:07:41 +01:00
Stephen Finucane 289438b4c2 docs: Drop references to non-filter scheduler drivers
Take the opportunity to clean up the docs quite a bit, ultimately
combining two disparate guides on the scheduler into one.

Change-Id: Ia72d39b4774d93793b381359b554c717dc9a6994
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-08-23 16:45:37 +01:00
Balazs Gibizer 559404c23b trivial: fix word duplication in api ref
Change-Id: I3878fb9f36bb05dbb949f137a5d5c6664a27b69f
Closes-Bug: #1920256
2021-03-22 09:22:39 +01:00
Stephen Finucane 40e0578683 api-ref: Clarify 'all_tenants' command
An empty value for the 'all_tenants' query parameter of '/servers' and
'/servers/detail' means the value defaults to 'True', i.e. requesting
'/servers?all_tenants' is the same as '/servers?all_tenants=1'. Clarify
this, since the current wording is confusing.

Change-Id: Ib5fdd3b73aa5179e0379ee8f465e4118107786be
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1909745
2021-01-15 15:21:08 +00:00
Stephen Finucane 1f67ce2496 api: Drop statistics-style fields from os-hypervisors
Introduce API microversion 2.88, which makes the following changes to
a number of 'os-hypervisors'. Specifically, the following fields are
dropped from both the '/os-hypervisors/detail' (detailed list) and
'/os-hypervisors/{hypervisor_id}' (show) APIs:

- current_workload
- cpu_info
- vcpus
- vcpus_used
- free_disk_gb
- local_gb
- local_gb_used
- disk_available_least
- free_ram_mb
- memory_mb
- memory_mb_used
- running_vms

In addition, the '/os-hypervisors/statistics' API, which provided a
summary of the above stats but for all hypervisors in the deployment, is
dropped entirely.

Finally, the '/os-hypervisors/{hypervisor}/uptime' API, which provided a
similar response to the '/os-hypervisors/{hypervisor}' API but with an
additional 'uptime' field, has been removed in favour of including this
field in the primary '/os-hypervisors/{hypervisor}' API.

A small tweak to 'tox.ini' that allows us to share some venvs is
included.

Part of blueprint modernize-os-hypervisors-api

Change-Id: I515e484ade6c6455f82a3067940a418a0d7d965a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-01-08 10:10:21 +00:00
Lee Yarwood 5913bd889f compute: Validate a BDMs disk_bus when provided
Previously disk_bus values were never validated and could easily end up
being ignored by the underlying virt driver and hypervisor.

For example, a common mistake made by users is to request a virtio-scsi
disk_bus when using the libvirt virt driver. This however isn't a valid
bus and is ignored, defaulting back to the virtio (virtio-blk) bus.

This change adds a simple validation in the compute API using the
potential disk_bus values provided by the DiskBus field class as used
when validating the hw_*_bus image properties.

Closes-Bug: #1876301
Change-Id: I77b28b9cc8f99b159f628f4655d85ff305a71db8
2020-07-29 16:05:48 +00:00
zhangbailin 9ca505700a [Trivial] FUP: addressed comments in support non-admin filter instances
This commit mainly addressed comments in [1]
[1]https://review.opendev.org/#/c/701609/9/api-ref/source/parameters.yaml@420
that were related to change Ia66d3a1ceb74ed521cf44922929b2a502f3ee935

Part of blueprint non-admin-filter-instance-by-az
Change-Id: I8627de0fdb31f2090a4eef7dba8f0f5eb4ebb946
2020-04-10 09:17:48 +00:00
zhangbailin 733d4133df Allow PUT volume attachments API to modify delete_on_termination
Allow PUT /servers/{server_id}/os-volume_attachments/{volume_id}``
to support specifying ``delete_on_termination`` field in the request
body. This allows updating the attached volume's flag that controls
whether or not it is automatically deleted when the instance is deleted.

When we request 'volumeId' and 'delete_on_termination' in the requst
body to swap volume, since the new microversion it will be support
updating the swapping volume's delete flag.

Co-Authored-By: Dan Smith <dansmith@redhat.com>

Blueprint: destroy-instance-with-datavolume
Change-Id: I6ccac4e17f56b40e67c79d40f32558ef414685ea
2020-04-02 09:26:55 -07:00
zhangbailin 59156bdf01 Add instance actions v284 samples test
Implements blueprint action-event-fault-details
Change-Id: I8e8a5ca1efe4a3554038dcddc503c3030956e0b9
2020-03-30 03:02:31 +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
Sundar Nadathur c6365f1b55 Define Cyborg ARQ binding notification event.
APIImpact: Adds 2.82 microversion for /os-server-external-events API.
DocImpact: Adds new version to doc/api_samples/versions/.

Change-Id: I7a626544d8221dc0eeb5672986ca897ce4718be8
Blueprint: nova-cyborg-interaction
2020-03-01 13:52:51 -08:00
Stephen Finucane 0b1a33ec9c nova-net: Update API reference guide
As highlighted in I77b1cfeab3c00c6c3d7743ba51e12414806b71d2, filtering
either floating IPs or floating IP pools by floating IP name will
actually fallback to filtering by ID. Update the API ref to reflect
this.

Change-Id: I00443ae111cbd1e1ec4d2c2ae1828ddaa095fd1a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-22 13:50:30 +00:00
Zuul 1fed6bd934 Merge "Remove 'nova-xvpvncproxy'" 2020-01-08 06:27:03 +00:00
chenxing 2a9766195d [api-ref] Fix the incorrect link
This page[1] doesn't talk about paging or servers_links. The API
reference description should link here[2] for talking about paging.

[1]https://docs.openstack.org/api-guide/compute/links_and_references.html
[2]https://docs.openstack.org/api-guide/compute/paginated_collections.html

Change-Id: I4831d5c2b9598e37346f1e65135b11446b2458eb
Closes-Bug: #1856241
2019-12-24 09:31:38 +08:00
Stephen Finucane 02eb9cffe6 Remove 'nova-xvpvncproxy'
This legacy service is no longer used and was deprecated during the
Stein cycle [1]. It's time to say adios and remove them in their
entirety. This is pretty straightforward, with the sole exception of
schema for the 'remote-consoles' API, which has to continue supporting
requests for type 'xvpvnc' even if we can't fulfil those requests now.

[1] https://review.opendev.org/#/c/610076/

Part of blueprint remove-xvpvncproxy

Depends-On: https://review.opendev.org/695853
Change-Id: I2f7f2379d0cd54e4d0a91008ddb44858cfc5a4cf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-12-23 14:20:28 +00:00
Matt Riedemann 685dc60d58 api-ref: avoid mushy wording around server.image description
This disambiguates the description on the server.image parameter.
If the server is booted from volume (where boot from volume means
there is a bdm with boot_index=0 and destination_type=volume),
then the server.image will be an empty string [1] otherwise it
will be a dict.

[1] 2f0f8b8cf1/nova/api/openstack/compute/views/servers.py (L540)

Change-Id: Ia1ecd39a5636fa5a35cdbcafc03828b2925a9033
2019-12-13 12:39:01 -05:00
Dan Smith 3391298706 Add image caching API for aggregates
This adds a new microversion and support for requesting image pre-caching
on an aggregate.

Related to blueprint image-precache-support

Change-Id: I4ab96095106b38737ed355fcad07e758f8b5a9b0
2019-10-15 21:22:31 -04:00
zhangbailin ac165112b7 Filter migrations by user_id/project_id
In microversion 2.80, the ``GET /os-migrations`` API will have
optional ``user_id`` and ``project_id`` query parameters for
filtering migrations by user and/or project:

* GET /os-migrations?user_id=ef9d34b4-45d0-4530-871b-3fb535988394
* GET /os-migrations?project_id=011ee9f4-8f16-4c38-8633-a254d420fd54
* GET /os-migrations?user_id=ef9d34b4-45d0-4530-871b-3fb535988394&project_id=011ee9f4-8f16-4c38-8633-a254d420fd54

And expose the ``user_id`` and ``project_id`` fields in the following APIs:

* GET /os-migrations
* GET /servers/{server_id}/migrations
* GET /servers/{server_id}/migrations/{migration_id}

Co-Authored-By: Qiu Fossen <qiujunting>
Part of blueprint add-user-id-field-to-the-migrations-table
Change-Id: I7313d6cde1a5e1dc7dd6f3c0dff9f30bbf4bee2c
2019-10-14 11:35:11 -07: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
Matt Riedemann 59f4dd40f8 api-ref: fix server topology "host_numa_node" field param name
The actual parameter in the response of the API is "host_node"
without "numa" in it so this fixes the docs to match the code
and sample.

Change-Id: Ie562d47e0fa7414bcdccf407b79e71e1aae8d708
Closes-Bug: #1843098
2019-09-06 17:31:42 -04:00
zhangbailin e5b47543cf Add delete_on_termination to volume-attach API
Add the 'delete_on_termination' field to the volume attach API to support
configuring whether to delete the data volume when the instance is destroyed.

To avoid upgrade impact issues with older computes, the
'delete_on_termination' field is set in the API rather than when the BDM
is created in the compute service.

Implements: blueprint support-delete-on-termination-in-server-attach-volume
Change-Id: I55731b1822a4e32909665a2872d80895cb5b12f7
2019-09-05 20:54:56 +08:00
Yongli He 3dcb404b1f Add server sub-resource topology API
Add a new server topology API to show server NUMA information:
  - GET /servers/{server_id}/topology

Add new policy to control the default behavior:
  - compute:server:topology:index
  - compute:server:topology:host:index

Change-Id: Ie647ef96597195b0ef00f77cece16c2bef8a78d4
Implements: blueprint show-server-numa-topology
Signed-off-by: Yongli He <yongli.he@intel.com>
2019-08-30 10:04:56 +08:00
zhangbailin 27b6c18c66 Specify availability_zone to unshelve
This adds support, in a new microversion, for specifying an availability
zone to the unshelve server action when the server is shelved offloaded.

Note that the functional test changes are due to those tests using the
"latest" microversion where an empty dict is not allowed for unshelve
with 2.77 so the value is changed from an empty dict to None.

Implements: blueprint support-specifying-az-when-restore-shelved-server
Closes-Bug: #1723880

Change-Id: I4b13483eef42bed91d69eabf1f30762d6866f957
2019-08-27 12:57:10 -04: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
Matt Riedemann ad75beee11 api-ref: add config_drive to 2.75 rebuild response parameters
Change I9d257a003d315b84b937dcef91f3cb41f3e24b53 and the 2.75
microversion returns the config_drive parameter in the rebuild
response and it's in the 2.75 rebuild response sample but was
missing from the response parameters table.

Change-Id: I89eca8638bc0d64b7f320f4ec5c49375bfebdb56
2019-08-19 15:01:35 -04:00
Zuul 35485eacfb Merge "API microversion 2.76: Add 'power-update' external event" 2019-08-15 23:39:50 +00:00
Surya Seetharaman 62f6a0a1bc API microversion 2.76: Add 'power-update' external event
This patch adds a new external event called "power-update"
through which ironic will convey all (power_off and power_on)
power state changes (running -> shutdown or shutdown -> running
will be the only ones handled by nova and the rest will be ignored)
on a physical instance to nova. The database will be updated
accordingly to reflect the real vm_state and power_state of the
instance. This way nova will not be able to enforce
an incorrect power state on the physical instance during
the periodic "sync_power_states" task.

Implements blueprint nova-support-instance-power-update
Story: 2004969
Task: 29423

Change-Id: I2b292050cc3ce5ef625659f5a1fe56bb76072496
2019-08-15 13:19:44 -04:00
Takashi NATSUME abfb28291a api-ref: Fix collapse of 'host_status' description
Fix collapse of 'host_status' description in the follwoing APIs
in the compute API reference.

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

Change-Id: I003f9a81ac6f7e0ec13a24db3fda1b7ff6612bc5
Closes-Bug: #1840094
2019-08-14 10:46:26 +09: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
Zuul 4f26ab0657 Merge "Retrun 400 if invalid query parameters are specified" 2019-08-09 23:50:19 +00:00
Matt Riedemann ebd68b3d1e api-ref: document valid GET /os-migrations?migration_type values
There are only four valid values for the migration_type filter
when listing migrations so let's document them for the request
parameter. Note that the API jsonschema validation does not
restrict the values since the filter parameter pre-dated jsonschema
validation for query parameters. Specifying an invalid value would
just result in no results from the DB query.

Change-Id: I7fee254edefd524633af62d80cb47009b1cf010b
2019-08-06 18:40:48 -04:00
Takashi NATSUME ae7ebdf45e Retrun 400 if invalid query parameters are specified
The following APIs return 500 error currently
if an invalid sort key or an invalid sort direction
query parameter is specified.

- GET /flavors
- GET /flavors/detail

Make the APIs return 400 error in that case.

Change-Id: I1d6d2c1f734b28dbea5c67cf88717149dd4911d7
Closes-Bug: #1835925
2019-08-04 23:59:51 +00:00
Zuul bca4fdec9a Merge "Correct project/user id descriptions for os-instance-actions" 2019-07-25 08:58:05 +00:00
Zuul ab34c941be Merge "Remove deprecated Core/Ram/DiskFilter" 2019-07-23 23:36:06 +00:00
Stephen Finucane 78645e61c6 Remove deprecated Core/Ram/DiskFilter
These were deprecated during Stein [1] and can now be removed, lest they
cause hassle with the PCPU work. As noted in [1], the aggregate
equivalents of same are left untouched for now.

[1] https://review.opendev.org/#/c/596502/

Change-Id: I8a0d332877fbb9794700081e7954f2501b7e7c09
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-07-23 07:49:41 -07:00