This adds the 2.37 microversion to the REST API for automatically
allocating a network, i.e. get me a network.
The majority of the changes to the REST API concern request
validation. 'networks' is now required in the server POST body
after this microversion. The 'auto' or 'none' special network
uuid values are used, but if specified, can not be specified
with any other requested network values.
The other special case that is checked is when the minimum
compute service version is not new enough to support this change,
i.e. a Mitaka compute will not have the network API code that
knows how to deal with the special auto/none network IDs. Because
the REST API is checking the service version, the service caches
the service version after the first check. Once all computes are
updated to Newton then a restart of the nova-api service(s) will
be required to flush the cache. A release note is provided for
this situation.
The api-ref docs are also updated for this microversion including
an example API sample request.
The matching Tempest change to test this is here:
I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0
The matching python-novaclient change is here:
I6636ddcd3be7bf393d2d69cc6c1ba5c7d65ff674
Implements blueprint get-me-a-network
Change-Id: I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0
This patch use constant instead of the calculation for the proxy API
deprecated version. This is more readable.
Partially implements blueprint deprecate-api-proxies
Change-Id: I5e9972643a7dd2e2559f7f9593b85618df2647c3
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
This patch deprecates all proxy APIs for Images. All those APIs will
return 404 in new Microversion.
The deprecated API endpoint is '/images'
This patch doesn't bump the max API version, due to the patch
separation. The max API version will bump in the last patch.
Partially implements blueprint deprecate-api-proxies
Change-Id: I5be1dd94171177d959b77b112148978166c78810
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
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
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
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
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
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
Adding a new microversion for changing the evacuate action behaviour
to call the scheduler anyway unless the admin user provides a force
flag that then keeps the previous behaviour by forcing the conductor
to call the destination without verifying it.
Implements: blueprint check-destination-on-migrations
APIImpact
Change-Id: I9ecbe3d481bf17b12072511da4bb106ff1b6404e
After this microversion Nova API the GET request to
/v2.1/os-hypervisors/{hypervisor_id} responses cpu_info
as regular JSON object instead of string.
Implements blueprint nova-api-hypervsor-cpu-info
Change-Id: I14db9017f69e70e759cc80d031f76af8be179e45
In this change the new OpenStack-API-Version headers is allowed,
but not required, for requesting a microversion.
Both headers are accepted in the request and both headers are sent in
the response (both the header and its value, and the addition to the Vary
header).
Many tests which explicitly use a microversion header have been
updated to use both. This change is not 100% as most of the tests
are testing the handling of the value of the header, not which
header is involved.
Partially-Implements: blueprint modern-microversions
Change-Id: I68da13b5ba0c2f3357523e765a5b9db81899daf1
Added new API microversion which allows the following:
- add tag to the server
- replace set of server tags with new set of tags
- get information about server, including list of tags for server
- get just list of tags for server
- check if tag exists on a server
- remove specified tag from server
- remove all tags from server
- search servers by tags
DocImpact
APIImpact
Implements: blueprint tag-instances
Change-Id: I9573aa52aae9f49945d8806ca5e52ada29fb087a
The attribute returned in the response body is 'net_id', not
'net-id'. We should be accurate in our REST API docs.
Change-Id: I4d6a8084fd73777a7dc5ebd58a462ada0627daf4
Related-Bug: #1496664
This is os-migrateLive API changes:
* 2.25 - Make block_migration to support 'auto' value, remove
disk_over_commit.
Partially implements: blueprint making-live-migration-api-friendly
APIImpact
DocImpact
Change-Id: Ibb0d50f0f7444028ef9d0c294aea41edf0024b31
This change adds a DELETE call on the server-migrations object to cancel
a running live migration of a specific instance.
TO perform the cancellation the virtualization driver needs to support
it, in case that the feature is not supported we return an error.
We allow a cancellation of a migration only if the migration is
running at the moment of the request and if the migration type is equal
to 'live-migration'.
In this change we implement this feature for the libvirt driver.
When the cancellation of a live migration succeeded we rollback the live
migration and we set the state of the Migration object equals to
'cancelled'.
The implementation of this change is based on the work done by the
implementation of the feature called 'force live migration':
https://review.openstack.org/245921
DocImpact
ApiImpact
Implements blueprint: abort-live-migration
Change-Id: I1ff861e54997a069894b542bd764ac3ef1b3dbb2
This patch does two things:
1. Add two APIs /servers/migrations:index/show for server migrations.
Two new novaclient commands server-migration-list and
server-migration-show will also be added.
ref: I071198fa9ba0699383bdebf4fab54714a435e6c3
2. Add ref link for /os-migrations
The old top-level resource `/os-migrations` won't be extended anymore.
It is deprecated.
Adding migration_type for it, also add ref link to
/servers/{uuid}/migrations/{id} for it when the migration is an
in progress migration.
Partially implements blueprint live-migration-progress-report
Change-Id: Ia92ecbe3c99082e3a34adf4fd29041b1a95ef21e
Co-authored-by: ShaoHe Feng <shaohe.feng@intel.com>
This change adds manual knob to force ongoing live migration to
complete. It is implemented as a new server-migrations API.
DocImpact
ApiImpact
Implements: blueprint pause-vm-during-live-migration
Change-Id: I034b4041414a797f65ede52db2963107f2ef7456
Add a microversion change to the os-instance-actions API so that we
mutate the context to set 'read_deleted="yes"' when looking up the
instance.
Blueprint: os-instance-actions-read-deleted-instances
Change-Id: I607a28bbe06e20e17ee47a283e06b1d42b5c0e84
This change enables the attach and detach volume operations for
instances which are in shelve and shelved_offloaded state.
The code to manage the actual attach and detach is implemented by this
change: https://review.openstack.org/259528
New tempest tests are going to be written for testing the new feature.
APIImpact
DocImpact by this change we are allowing operations which were not
allowed before, we need to track this change in the documentation.
Partially implements blueprint: volume-ops-when-shelved
Change-Id: I43b67a50d998d43a6ff78c917093c513231b6ff2
This patches adds changes to the Nova REST API to allow
users to create a server with a description, rebuild
a server with a description, update the description,
and get the description in the server details.
Note: Future commits will be done to support the server
description in python-novaclient and openstack-client.
APIImpact
Implements blueprint: user-settable-server-description
Change-Id: I74b1a340c5ab98fdea2186e87dd13f42ce7c7661
This introduces microversion 2.18 which signals that the {project_id}
is no longer required in URLs.
It tests this with an additional scenario in api_samples which makes
all the requests without the project_id in the url (using a different
noauth middleware to accomplish this).
Update the link fixer in the ApiSamples matching code to also update
for optional project_id. This is the least worse approach here,
because if we set request_api_version, then we have to duplicate the
entire template tree as well, which we definitely don't want to do, as
it now correctly handles either url form.
This updates the auth tests to bifurcate with testscenarios instead of
the subclass model, which makes for more consistent tests.
In order to support adding routes without project_id we have to be
able to restrict project_id something that doesn't match any of our
top level routes.
The default for this is [0-9a-f\-]+ which will match all of the
following:
- keystone default generated project_ids [0-9a-f]{32}
- integer project_ids (\d+) - known in use by RAX
- uuids with dashes (no known users, but suspect there might be)
This can be overrided with the new (but already deprecated)
``project_id_regex`` config option.
NOTE: we used this feature to expand the regex to match 'fake' and
'openstack' as valid project ids in tests. Those concepts are deeply
embedded in our tests, and need to be unwound independently.
APIImpact
Implements bp:service-catalog-tng
Co-Authored-By: Augustina Ragwitz <auggy@cpan.org>
Change-Id: Id92251243d9e92f30e466419110fce5781304823
Change I9b649aafba011d537e3fe4eebef7a678ff6733e4 has added a
compute API to trigger crash dump in instance. This patch adds
the REST API to nova. It enables users to trigger crash dump in
an instance through REST API.
Change-Id: I6ed777ff637254b4b79417008f9055dd19fc7405
Implements: blueprint instance-crash-dump
Co-Authored-By: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
When a compute service fails, the power states of the hosted VMs are not
updated. A normal user querying his or her VMs does not get any indication
about the failure. Also there is no indication about maintenance.
This change will expose new attribute host_status to user querying his
VMs. Attribute is only seen if policy allows.
DocImpact: This adds API microversion
Implements blueprint get-valid-server-state
APIImpact
Change-Id: I5abea08bdc27624a7f23a7db8964f8c2a7b0eaa7
Allows soft-affinity and soft-anti-affinity to be used as a policy
for the server group api extension. Add soft policies
to the JSONSchema, which validates server group definitions.
Bump API microversion to 2.15.
Implements: blueprint soft-affinity-for-server-group
Change-Id: I376bdba7df1344d269aa126f4896610baf2e16a2
The patch I4217bd00d8c253db522241885dba2847a26af6df made the
on_shared_storge flag optional in the compute api in Liberty.
This patch removes the corresponding onSharedStorage flag from the
REST API as nova can easily detect this information.
APIImpact
DocImpact
Implements: bp remove-shared-storage-flag-in-evacuate-api
Change-Id: I54bfa1275e188573c1b95d770d89160a86cdf52c
Currently, command "nova server-group-list" and
"nova server-group-get" doesn't return groups'
project id and user id information. It is really
hard to identify which group belong to which
project/user when admin user use this command
with option "--all-projects".
This patch add project-id and user-id to the list.
All os-server-groups APIs will contain the above
mentioned data in the response data.
DocImpact: This adds API microversion
APIImpact: Project id information will be returned for
os-servers-group API
Change-Id: I0405ed6271c33981578841cfade220758615b1fd
Implements: blueprint add-project-id-and-user-id
Partial-bug: #1481210
Depends-On: I167141676ef4f597a1c022c1fd5dc96fd55d02ad
Right now to check if some part of code supports
requested microversion developer usually:
1. get a microversion from request.
2. create instance of class APIVersionRequest
with requested microversion.
3. compare these two objects.
This check takes at least 2 lines and looks ugly.
Sometimes developers create unnecessary class fields
to store object APIVersionRequest with requested microversion.
To make nova code more readable and simple method
'is_supported' was created.
Microversion check with this method takes only one line
and code looks more beautiful.
Change-Id: I9078cfa1afad8b6b09583dac87fa757a0cc32daa
Adds a new microversion to show virtual interface 'net-id' in
virtual interface list.
DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details
APIImpact
Implements blueprint add-vif-net-id-in-vif-list
Change-Id: Ic8b26df8d7e69bd71d23dfbc983fa3449c16fa7d
`cmp` method was removed in Python 3, so it would be nice to use __lt__,
__le__, __eq__, __ne__, __gt__ and __ge__ instead, which are Py2 and Py3
compatible.
Change-Id: I1c89da0831b77b73f55d8681fd7d946535cc89b5
Nova API doesn't have 0 version, so we can use 0.0 for Null APIVersion.
It will help to write simple comparison methods.
Change-Id: I9010007e6e5a92a378299ccb0d674b30fdabc365
Introducing new API call for changing the new flag state for forcing
nova-compute state. This is done via adding new forced_down field to the
Service objects and its check in timeout affected service groups drivers.
Blueprint mark-host-down
APIImpact
Change-Id: I39f1a84c100726f87a4dc464dd9922d66efdb53f
Administering an openstack cluster I found the need to see what keypairs a
user had. I found this bug that was requesting the same thing and decided
to implement it. This is the update to the api server to handle a query
param passed to return a keypair list for a specific user-id. Only a user
with admin privileges is allowed to make this call.
Allowing the administrators to be able to list and get details of keypairs
which owned by users other than themselves, as well as creating new and
deleting keypairs on behalf of their users.
DocImpact: This adds API microversion
Implements blueprint admin-query-any-keypair
APIImpact
UpgradeImpact: Policy rules of the index, create, delete and show
operations has been updated to support the change.
os_compute_api:os-keypairs:{index, show, create, delete}:
"rule:admin_api or user_id:%(user_id)s
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Co-Authored-By: Dan Radez <dradez@redhat.com>
Closes-Bug: #1182965
Change-Id: I45846f770628e8f24a8c137dcdc46baa64c50801
Adds a new microversion to show server 'locked' information in
server details.
DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details
APIImpact
Implements blueprint add-locking-information-in-server-get-response
Depends-on: I5be664c3e99adc37738f8b074f1891dad97497b1
Change-Id: I3e5dc6e37f130f70e3a861a9906bb062c6110742
Currently the tox py34 target uses testtools.run to run
a subset of our test harness. We need to be able to use
pretty_tox.sh just like py27 as we make progress with py34
support.
The first step is to make sure we can discover all the
tests using:
python -m subunit.run discover -t . ./nova/tests/ --list
So, we need to fix a bunch of things for the discovery
to work including updating to a new version of websockify.
In the xen code, we should keep the original import and
add except for py34 as xen uses an older python that does
not work with six.moves.
Depends-On: Ib4ef2e79b28b7180e564b3d6dc2188456c66c08a
Change-Id: I88b6746da6136a7386a173f6cacd42f0b470deee
MKS is the native protocol for VMware consoles and this patch is adding
API support for it. For now there is only one console type for this
protocol and this is 'webmks'. A new microversion is introduced which
adds protocol 'mks' and type 'webmks' for requesting a remote console.
Example request:
POST /servers/<uuid>/remote-consoles
{
"remote_console": {
"protocol": "mks",
"type": "webmks"
}
}
Example response:
{
"remote_console": {
"protocol": "mks",
"type": "webmks",
"url": "http://example.com:6090/mks.html?token=XYZ"
}
}
APIImpact
Implements: blueprint vmware-webmks-console
Change-Id: I7217b999fb8d64a5646d8f20d7426c26553871d7
Currently we allow tenant access for public flavor, however,
we can't query it after that because flavor is public.
This patch adds check for add access function to raise exception
if the flavor is public.
Also, a nit change is use methods introduced in
793bcc07b9 to get flavor.
APIImpact: Adds new 2.7 API microversion due to new error condition
in flavor access API
Implements blueprint check-flavor-type-before-add-tenant
Closes-Bug: #1361476
Change-Id: I461175e9969a0dd5b2b7ef75ea7d9f36f3a306d0
A new API is added with microversion 2.6:
POST /servers/<uuid>/remote-consoles
{
"remote_console": {
"protocol": ["vnc"|"rdp"|"serial"|"spice"],
"type": ["novnc"|"xpvnc"|"rdp-html5"|"spice-html5"|"serial"]
}
}
which supports all protocols and types for remote consoles.
Implements: blueprint consolidate-console-api
APIImpact
Change-Id: I175a778cede8fbeee9c47a502ab7a98f6d73c074
Currently the command "nova list --ip6 xxx" will return all servers for
non-admins, as the filter option is silently discarded. There is no
reason to treat ip6 different from ip, though, so we add a new
microversion that will allow this filter to be applied.
APIImpact: Filtering by ip6 will now be allowed for non-admin
DocImpact: Filtering by ip6 will now be allowed for non-admin
Implements blueprint allow-ip6-search-for-non-admin
Partial-Bug: 1450859
Change-Id: I26a0b576636bd7e6b4dd7d53ded05907397d2f26
Adds a new microversion to show the 'reserved' status on a FixedIP in
the os-fixed-ips extension.
Closes-Bug: #1249526
Implements blueprint show-reserved-status-in-os-fixed-ips-api
Change-Id: Iadaae393fce0c78dbdfd3b02958ddfd6276edb94
This change adds properties to v2.1
os-extended-server-properties and os-extended-volumes nova APIs
in order to expose information which is required for the standalone
EC2 API implementation (resides on stackforge/ec2-api) to use only
public APIs. Right now this information is taken by directly accessing
internal Nova DB.
It adds proposed microversion v2.3.
It implements the spec "Nova changes required for standalone EC2 API
implementation" in this review: https://review.openstack.org/#/c/153636/
APIImpact
Implements: blueprint ec2-api
Change-Id: I850e51e730c82906f68fddb14fb0004d7091eb91
X509 certificates are used by Windows for passwordless
authentication (WinRM) in a way which can be considered
consistent with the usage of SSH keys on Linux, as both
are based on public / private keypairs.
Enables nova-api to return the keypair type, updates
nova-api version to reflect the changes and updates the
unit and functional tests to validate the API changes.
Unit tests have been updated to ensure that the keypair
type is not being returned on previous API versions.
Note: x509 keypair implementation is added in the next
commit.
DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details
APIImpact
Depends-On: Id5b210d7afe5c0a590abcbd42b9ff85b071a5c55
Co-Authored-By: Chris Yeoh <cyeoh@au1.ibm.com>
Partially implements: blueprint keypair-x509-certificates
Change-Id: I215662f2f92a01921a866c3218031787a9eaf915
Adds a check for a request that the version requested is within the
global API version range supported by the REST API. Both the minimum
and maximum are currently set to "2.1". The maximum will be increased
everytime an API change is made.
Also sets up some template/doc files for clearly documenting
the REST API changes with each microversion increment.
Partially implements blueprint api-microversions
Change-Id: Ie7fdb2928d957c03ed788c2ddd29fe798c645fce
Adds the APIVersionRequest class which handles converting the API
version requested from a request header string and supplies
comparison and matching methods used by microversions and REST
API code to determine what code paths to take.
Partially implements blueprint api-microversions
Change-Id: Ic75d36fc0d27b615e70e1fe56c1626e9e501b1d6