Commit Graph

15 Commits

Author SHA1 Message Date
Surya c5788293aa Merge extended_volumes extension response into server view builder
As nova extensions have been deprecated already, the goal is to
merge all scattered code into main controller side.
Currently schema and request/response extended code are there
among all extensions.

This commit merges the extended_volumes extension response into server
view builder.

Partially implements: blueprint api-extensions-merge-stein

Change-Id: I412ccfd5495b088c941a819b5946dc56ed86ae22
2018-09-18 16:54:38 -04:00
Zuul a0c2b26e38 Merge "Make CELL_TIMEOUT a constant" 2018-08-24 18:08:51 +00:00
Dan Smith b7c3dd8682 Make CELL_TIMEOUT a constant
This unifies the various places that hard-code a 60-second timeout
for cells scatter/gather operations use a constant instead.

Change-Id: I77d719ca4588bf273271e4f138f53d09c7d3e330
2018-08-22 13:17:35 -07:00
ghanshyam f72fa9a739 Remove the deprecated API extensions policies
API extensions policies have been deprecated in 17.0.0
release[1]. This commit removes them.

[1] Ie05f4e84519f8a00ffb66ea5ee920d5c7722a66b
Change-Id: Ib3faf85c78bc2cdee13175560dc1458ddb6cb7a8
2018-08-17 07:11:45 +00:00
Surya Seetharaman ea6757092d Make bdms querying in multi-cell use scatter-gather and ignore down cell
This patch makes the querying of bdms from multiple cells in the
_get_instance_bdms_in_multiple_cells function of extended_volumes use
scatter_gather_cells thus making the process, parallel. It also adds
warnings in case a cell is not available; which the operator can later
tweak, if an exception needs to be raised. So for now, cells that are
not reachable are ignored and it proceeds to the next cell.

Change-Id: I0e05eb1e2ad37962968b79100bf4a96c7d6ddd8f
Closes-Bug: #1747650
2018-02-07 11:46:32 +01:00
Takashi NATSUME 0a2f45a5b2 Fix getting instance bdms in multiple cells
In the 'detail' method of ExtendedVolumesController
related to 'GET /servers/detail' API,
multiple cells environemnt is not taken into account
when getting instance BDMs.
So fix it.

Change-Id: I9377e988fbdc822df46e91c0db6c8012697bc2ee
Closes-Bug: #1708210
2017-08-04 10:44:56 -04:00
He Jie Xu 68bbddd8ae Totally freeze the extension_info API
The extension will be removed from the Nova API totally. The extension_info
API is just for backward compatibility. And there is no way to disable/enable
the extension, also the discovery policy rules are removed, so it is time
to just hard-code most of the logic at here.

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: I56d859beb675199b209587bfe0a23cd9b75233ad
2017-05-08 16:32:48 +08:00
Jenkins a39ed347e0 Merge "Remove unnecessary __init__" 2016-06-27 17:04:31 +00:00
Claudiu Belu 93cc5e3ffd policy: Replaces 'authorize' in nova-api (part 2)
Adds 'fatal' argument (with default value True) to context.
If the argument is False, if a nova.exception.Forbidden
is raised, False is returned instead. This is the equivalent of
soft_authorize.

Adds docstring to nova.context.RequestContext.can.

Adds unit tests for nova.context.RequestContext.can.

Partially-Implements: bp policy-in-code

Change-Id: Ib6388822da3d3eb9b8fbd9b5c341cd8efeb790fe
2016-06-27 13:18:03 +00:00
zhufl 79402586ca Remove unnecessary __init__
This is to remove unnecessary __init__ to keep code clean.

Change-Id: Ib9f2d39122ea4bb24c864ba13afaf07f4b3a7a33
2016-06-27 15:23:00 +08:00
Matt Riedemann b562790fc4 Add note about using OS-EXT-* prefix for attribute naming
The 2.3 microversion used the OS-EXT-SRV-ATTR prefix for
compat with v2.0 for the ec2 API split out of nova.

The 2.16 microversion added the 'host_status' extended
server attribute and doesn't use the prefix.

This adds a note that nothing after the 2.3 microversion
should be using the OS-EXT-SRV-ATTR prefix since it's an
artifact of v2.0 and extensions which are deprecated in
v2.1.

Similar notes are added for other extensions that add
extended attribute names to other resources like AZs,
volumes and images.

Change-Id: I60a53e13121b7280a41c3889ba86edcd2ae7bf83
2016-02-23 16:15:21 -05:00
Sergey Nikitin 2002120c45 Added method is_supported to check API microversions
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
2015-11-13 19:27:52 +03:00
Diana Clarke 110bb30d0f Replace N block_device_mapping queries with 1
The ExtendedVolumes post-processing extension used to do N
block_device_mapping queries (one query per instance in a 'nova list').
Instead, do one block_device_mapping query with an IN clause of
instance UUIDs.

Change-Id: I32a1bd0e05a7a938e531d00bedfab23a0bb68538
Partial-Bug: #1416132
Closes-Bug: #1359808
2015-11-12 12:02:05 -05:00
EdLeafe 55e04230ad Rename classes containing 'v3' to 'v21'
This part of the ongoing v3 cleanup effort.

Partial-Bug: #1462901
Change-Id: I5d9b43503629cc3f5a566f7bfa23cc5d0d14d985
2015-08-18 15:25:46 +08:00
EdLeafe 003c868da7 Move v2.1 code to the main compute directory - remove v3 step3
Move all the plugins/v3 code to the main compute directory.

Partial-Bug: #1462901
Change-Id: I7df413b76ff0a6610ccd3cb90137ec99b372d5ab
2015-08-13 09:58:47 +08:00