When we put validation into the project_id in urls we had to expand
the default set of allowed values to include 'openstack' and
'fake'. This cleans up all the instances of 'openstack' in the
functional tests, and api samples, and instead uses a constant string
which looks like a real project_id.
We need a stable project_id and not a sentinel otherwise the samples
will be arbitrarily changes on every update.
Change-Id: I1099fd43d2374abd1658b0917765d5375c4b8d1d
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for server PUT API tests and
remove its specific extensions tests and sample files.
Adding a hack for other tests which are still running with specific
extensions. That is needed to avoid all tests updates in single commit.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I9c44da3d9df39c1db0948194502be52f4f15acf2
While the API allows for strings which happen to end in an ID for
flavorRef/imageRef, the common path is really just the ID itself, and
we should have the samples do this. The use of full urls in our
samples makes it seem like this is more meaningful than it really is,
and that you could pass a url to a remote system, for instance, which
won't work at all.
Change-Id: I669619b627f954232712d54498b3744353d25451
There is difference in VIF list response for v2 and v2.1.
'net_id' attribute is not present in v2.1 VIF list response and
it was added as new microversion - Ic8b26df8d7e69bd71d23dfbc983fa3449c16fa7d
For v21 compatible mode we should have that attribute in response
to make v21 comp mode behaves same as v2.
Also VIF Extension "OS-EXT-VIF-NET" was removed from v2.1 ext list
in - Ic99ac1179d02d907422911fe1369b64479fd5f33
As we need to add 'OS-EXT-VIF-NET:net_id' in VIF
API response to make that same as v2 one. So ext list should have
"OS-EXT-VIF-NET" extension also to avoid any confusion for user whether
this extension is present for v21 comp mode or not.
This commit adds 'OS-EXT-VIF-NET:net_id' attribute in VIF list
response for v21 compatible mode.
Also adds VIF extension in ext list for v21 comp mode.
NOTE-There is no change in v2.1 API.
Closes-Bug #1496664
Change-Id: I4df76fbf85fbb1e79528a1690692b12a65f07835
This patch cleans up 'v3' in the comments, by replacing 'v3' with 'v2.1'.
Co-Authored-By: Ed Leafe <ed@leafe.com>
Partial-Bug: #1462901
Change-Id: Ia665115e4c8c94b8d7557060201469ea10673558
Currently v2 and v2.1 have separate functional tests and their
corresponding sample files. As v2 and v2.1 are supposed to be identical,
there is overhead to maintain two set of functional tests and sample files.
We can have one set of tests which can run for both v2 and v2.1.
This commit merges flavor all_extensions functional tests.
Partially implements blueprint test-collapse-v2-and-v21
Change-Id: I1ca95ec4fc11294a8b8d484f54503df14726c2e4
Extension "OS-EXT-VIF-NET" is not ported to v2.1, due to that
there is difference between v2 and v2.1 as mentioned in bug#1470690.
But v2.1 extension-list has "OS-EXT-VIF-NET" extension which convey that
this extension is also loaded for v2.1 and user will get the expected response
according to "OS-EXT-VIF-NET" extension which is not true as this extension
is not actually ported to v2.1.
It is decided that fix for that difference should go in microversion not
in base v2.1 as it is already released.
This patch remove extension "OS-EXT-VIF-NET" from v2.1 extension-list which
will actually convey that this extension is missing in v2.1.
Partial-Bug: 1470690
Depends-On: I3caca80a6c010b86150909126f4545425ed99e11
Change-Id: Ic99ac1179d02d907422911fe1369b64479fd5f33
This patch move the all v2.1 api sample tests under
'functional/api_sample_tests'. Also move sample files under
'doc/api-samples'.
Co-Authored-By: Ed Leafe <ed@leafe.com>
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Partial-Bug: #1462901
Change-Id: I2b924f2ad7687a23a018a9b658e8acd9e04d7963
This patch moves legacy v2 api sample tests under
'nova/tests/functional/api_sample_tests/legacy_v2'
Also create new API sample test base class for matching new
path in 'nova/tests/functional/api_sample_tests/legacy_v2/ -
api_samples_test_base.py'
Change-Id: Ib455d4fc9d1f9a2a7e9a744f7e63086b3cf49c5e
Partial-Bug: #1462901
Currently v2 and v2.1 have separate functional tests and their
corresponding sample files. As v2 and v2.1 are supposed to be identical,
there is overhead to maintain two set of functional tests and sample files.
We can have one set of tests which can run for both v2 and v2.1.
This commit merges extension-info functional tests.
ExtensionInfoSamplesJsonTest is v3 only, leave it as before.
ExtensionInfoAllSamplesJsonTest, the response data is different,
tag the template files with version.
Change-Id: Id7b7bf08cda58d606325ddb82568a73f0bb99f60
In I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0 we switched off XML support. In
this review we entirely remove all the testcases and supporting files.
Change-Id: I83827d438753fd3899053dd6e09bc77c997c7406
Updates the v2 and v3 /servers and /servers/detail APIs to support the
multiple sort keys and sort directions (using the 'sort_key' and
'sort_dir' parameters); these parameters can be specified multiple
times to create a list of sort keys and directions. These parameters
are passed from the API layer to the compute layer, then to the
instance layer (with updated version), then to the database layers,
and then to the common paginate_query function; the paginate_query
function already supports multiple sort keys and directions. The
function signatures in these various layers are updated with new
'sort_keys' and 'sort_dirs' parameters that represent the sort keys
and directions information as lists.
This support is enabled on the v2 API by the existence of a new
'os-server-sort-keys' API extension and is always enabled in the v3
API. The extension API sample issues 2 server creates and then ensures
that both servers are listed (name is unique) in the list reply.
DocImpact: The existing v2 and v3 servers API documentation needs to
reflect these new parameters.
The nova client will also be updated to use these parameters.
Change-Id: I02baf6c3cc7d29abab132ef1726140c57e17d9b6
Partially implements: blueprint nova-pagination
This second change in a sequence that adds new quota values
for server groups. This part adds the new V2 API extensions
to make the new quota values visible and changeable, and updates
the unit tests to check both V2 cases.
Note that Tempest changes https://review.openstack.org/#/c/112474/
is required to get a clean run as it checks for a specific
set of values.
The quota checks themselves are covered in a subsequent
dependent change.
Implements: blueprint server-group-quotas
DocImpact
Change-Id: I78974602d4be04deaf173b3e43f2dab92e8f4171
This uses the existing api extension to implement the actual control
of the fields, but the check is based on a new dummy extension
called os-extended-networks.
Api sample tests added for new extension.
DocImpact: Adds an extension that enables extra fields for network
create. The new fields are:
mtu: int (default flag) if set, nova sets the mtu on bridge. This
allows network_device_mtu flag to be set per network.
dhcp_server: ip (default == gateway) if different from gateway, sets
nova to assume gateway is external.
enable_dhcp: bool (default true) false will disable dhcp on network.
share_address: bool (default flag) if specifed, network will have
the same dhcp ip on every host. This allows
share_dhcp_address flag to be set per network.
allowed_start: ip if specified, reserves all ips before allowed_start.
allowed_end: ip if specified, reserves all ips after allowed_end.
Partially-implements blueprint better-support-for-multiple-networks
Change-Id: I577fe5f6560be50106f345a42a826e97d5e7d64c
Currently when return compute node information, there is no status returned.
When the corresponding service is disabled or down and users try to
do 'hypervisor-list' or 'hypervisor-show', they will have no idea of it.
Implements: blueprint return-status-for-hypervisor-node
Closes-Bug: #1285259
DocImpact
Change-Id: I17c53b454ccef023f298f1b8875daef965d2325d
Currently the service list API allows the user to specify an optional status
value to use as a filter - for example to limit the list to only servers with
a status of Active.
However often the user wants to filter the list by a set of status values,
for example list servers with a status of Active or Error,
which requires two separate API calls.
Allowing the API to accept a list of status values would reduce this to a
single API call.
Allow to specify status value for many times in a request.
For example::
GET /v2/{tenant_id}/servers?status=ACTIVE&status=ERROR
GET /v3/servers?status=ACTIVE&status=ERROR
V2 API extension::
{
"alias": "os-server-list-multi-status",
"description": "Allow to filter the
servers by a set of status values.",
"links": [],
"name": "ServerListMultiStatus",
"namespace": "http://docs.openstack.org/compute/ext/
os-server-list-multi-status/api/v2",
"updated": "2014-05-11T00:00:00Z"
}
DocImpact: Adds os-server-list-multi-status extension.
blueprint servers-list-support-multi-status
Change-Id: Id0109c56070e2f920be0f95738749aa969258bc1
In the event of an unrecoverable hardware failure, support needs to
relocate an instance to another compute so it can be rebuilt.
The changes involved in this patch are:
[*] Add a new v2 extension to determine that the host argument
on evacuate is now optional.(Extended_evacuate_find_host)
[*] Doc regeneration.
DocImpact: The evacuate target host is now optional.
If 'host' field is not sent in the request, the scheduler will
determine the target host.
This will include nova client changes ( on the proper commit ) to support
this new optional parameter.
Implements: blueprint find-host-and-evacuate-instance
Change-Id: Ib34fb3120263b746ad2f8fe89c14137e36a07a53
Co-Authored-By: Juan M. Olle <juan.m.olle@intel.com>
Co-Authored-By: Andres Buraschi <andres.buraschi@intel.com>
Co-Authored-By: Anuj Mathur <anujm@thoughtworks.com>
Co-Authored-By: Navneet Kumar <navneetk@thoughtworks.com>
Co-Authored-By: Claxton Correya <claxton@gmail.com>
This reverts commit 7d22153d05.
The quota_classes API was used to set default quota values
so it shouldn't have been removed, so reverting a series
of changes that removed the API and it's internal code.
Related mailing list thread on the topic:
http://lists.openstack.org/pipermail/openstack-dev/2014-May/035383.html
Partial-Bug: #1299517
Conflicts:
doc/api_samples/all_extensions/extensions-get-resp.json
doc/api_samples/all_extensions/extensions-get-resp.xml
nova/tests/integrated/api_samples/all_extensions/extensions-get-resp.xml.tpl
The conflicts are due to Mark McLoughlin's timestamp-format series
of changes on master (Juno).
Also note that quota_classes.py was changed due to
commit c75a15a4 to rename the NotAuthorized exception
to Forbidden.
Change-Id: I7890e6b41d4ebf19944c1d4db65111fcc4c45463
It's unusual to include a '+00:00' offset in an ISO8601 timestamp
rather than just using the 'Z' suffix. It's also very weird for our
API to be returning timestamps which aren't in UTC.
Let's make these timestamps consistent with other timestamps by
using UTC always and representing that with a 'Z' suffix. Also,
enforce this in the API sample tests by using a new 'isotime' regexp.
A small number of the extensions in the API sample templates
specified the exact timestamp, so templatize those before regenerating
the API samples for GET /extensions.
Full context here:
http://lists.openstack.org/pipermail/openstack-dev/2014-April/033971.html
Change-Id: Idf429e55e4ae13738ac531a25ce54b20d395410d
In a subsequent commit, I make a change which requires regenerating
this API sample but doing so shows up a bunch of unrelated changes.
This commit simply regenerates the API sample without any functional
changes to highlight the non-functional sample changes.
Change-Id: I5fafff90f20af17d787039568245f598e500405e
This commit includes the V2 changes.
Making changes in v2 API to take an extra parameter rescue_image_ref
as part of the rescue action API.
If specified, this image_ref will be used to rescue the instance.
If the image is not specified, then the base image ref is used by
default.
Partially Implements: blueprint allow-image-to-be-specified-during-rescue
DocImpact
Change-Id: I985b21264841a6a18a66d19ccd41753f78576776
Support the Creation, Read, Delete, and List of server groups.
Refactored the code to use objects (https://review.openstack.org/#/c/38979/
Renamed from "instance group" to "server group".
Implements: blueprint instance-group-api-extension
Change-Id: I650a8f191dea5eab5b4b1828f0b9f65e33edea2a
Implements: blueprint hyper-v-rdp-console
Currently graphical console access to Nova instances is limited to
clients which are part of Nova itself (novnc, xvpvnc, spice-html5).
The mentioned clients verify the validity of a console access token
with the following private API:
nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token
The usage of a private API precludes the possibility of employing
external graphical console clients, including FreeRDP-WebConnect, used
to connect to Hyper-V instances via RDP.
This change adds a public API method that wraps the aforementioned
check_token private API. This allows external clients to obtain the
necessary protocol connection information by providing a token
previously obtained with calls to get_vnc_console, get_spice_console
or get_rdp_console.
Includes V2 and V3 API implementations.
Change-Id: Idd1e4f57b16bd1488f3b72bb064cef51321a7c79
It turns out os-quota-classes-sets never worked
(http://lists.openstack.org/pipermail/openstack-dev/2014-February/027574.html). Since this doesn't work no need to keep it around.
V3 removal: Id1f288baa723df825151bd84aa27089271c2b8e4
Original commit: I6b6477481187d16af225d33c1989430e4071d5a8
This patch just removes the API it doesn't remove the quota-class
internals, that will be done in a subsequent patch.
Change-Id: I1110022d6f628d03aaf363da707f2d2ef1600437
Services and related compute nodes cannot currently be deleted
from the command-line. If a node is retired, the service list
will continue to show the retired services.
A delete service REST method has been added to the compute
APIs to support the command-line removal of retired services.
Blueprint: remove-nova-compute
Change-Id: I655a7f818bb59c8971feb5841feeefafc3a4580a
Flags: DocImpact
After no-compute-fanout-to-scheduler, host_ip was stored in the table
of compute_nodes. Host ip address should be considered as the hypervisor
attribute similar to the hypervisor_type, hypervisor_version etc, and
now those attributes such as hypervisor_type, hypervisor_version etc
are all listed as the hypervisor attribute when calling "nova
hypervisor-show host", so we can also set "host_ip" as a new attribute
output for this command.
DocImpact
1) Only administrators can view hypervisor detail in nova.
2) It can help improve debug capabilities for nova. For example, if
admin using SimpleCIDRAffinityFilter, then after VM is deployed, admin
can check if the VM was deployed successfully to the desired host by
checking ip address of the host via "nova hypervisor-show host".
3) Add host_ip to the output for "nova hypervisor-show"
Implement bp hypervisor-show-ip
Change-Id: I006a504d030be1f47beb68a844647026a6daf0ce
The preserve_ephemeral option for rebuild will preserve the content of
the ephemeral partition, making stateful golden image based
deployments possible even when clouds haven't deployed Cinder, or the
hypervisor doesn't support Cinder (e.g. BareMetal / Ironic).
Partial-Bug: #1174154
blueprint: baremetal-preserve-ephemeral
Co-Authored-By: Robert Collins <rbtcollins@hp.com>
Change-Id: Id33d5d4107f89814842a3f0b7f33690dd7e3aadc
As discussed at the summit in the QA stream, this removes
the coverage extension from the V2 API.
According to the API Change Guidelines
https://wiki.openstack.org/wiki/APIChangeGuidelines
we should not be doing this. However the coverage
extension is a rather special case. It has security issues
such that it shouldn't be used in a production cloud
environment. It also doesn't work properly so its usefulness
to measure API coverage is limited. And in the past the presence of
this plugin has been used as a reason not to accept
an alternative technique to measure API coverage.
This is the proposed replacement
https://review.openstack.org/#/c/25882/
Change-Id: I07d798129ee277a6f7691c25f88c07a5204c0943
Add fields: uuid, task_state, updated_at, and pxe_config_path
to aid system admins in troubleshooting issues.
Fixes bug 1184449
Change-Id: Ia4c03cb228b3efe602455bf05883ddf03b7f18da
Add a new API extension that exposes assisted volume snapshot
capabilities. This extension is admin only by default. We expect it to
only be called by Cinder. If you have your deployment set up in such a
way that your adminURL is different from the public, this extension can
only be loaded in the admin API instance. Cinder will pull that URL out
of the service catalog to use.
Part of blueprint qemu-assisted-snapshots
Change-Id: I79e22ab6ef66fa16dc534a4336e766065702b2f5
This patch makes the nova API aware and able to accept the new block
device mapping format introduced in
If30afdb59d4c4268b97d3d10270df2cc729a0c4c when booting an instance.
It does so by introducing a new extension into the v2 API. There is no
v3 extension as part of this patch because volume extension is going
away in v3 and thus this functionality can be part of the core servers
extension. This will be done in a subsequent patch.
The compute API create method will still convert these back to the
legacy format for the time being until the compute API will know how to
take advantage of the new format.
As this change adds the new API extension, marking it as DocImpact so
that the changes and the API data format can be documented.
blueprint: improve-block-device-handling
Change-Id: I2c1b63e41deca26f727fb9ed912a55494db9c76c
Adds support for transparently swapping an attached volume with
another volume. Note that this overwrites all data on the new
volume with data from the old volume.
Implements blueprint volume-swap
Change-Id: Iaace71f46acd33cf1531d953d569c0b6d0bbe680
Implements blueprint per-user-quotas.
Fixes bug 968175
Based on the original quotas structure.
NOTE:
quota_instances, quota_cores, quota_ram, quota_key_pairs and
quota_security_groups are supported per user.
Add CRUD methods for project user quotas API. DocImpact
- Shows quotas for a user.
GET v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}
- Updates quotas for a user.
POST v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}
Add commands for project user quotas management.
- Show user quotas:
nova-manage project quota --project <Project name> --user <User name>
- Update/Create user quotas:
nova-manage project quota --project <Project name> --user <User name>
--key <key> --value <value>
Change-Id: I24af1f6bc439d5d740303c6fe176a9bffe754579
Adds new 'shelve', 'shelveOffload'/'shelve_offload'(V3), and 'unshelve'
actions to the API. Exposes the functionality already provided in the
compute api.
Part of bp shelve-instance
Co-author: Dan Smith <danms@us.ibm.com> (Instance objects)
Change-Id: Idd485b591730c6ac025ee57a1242afdd02191b2f
- adds an API extension to include list of attached volumes with instance info
- adds v3 api porting as well
DocImpact
Implements blueprint servers-add-volume-list
Change-Id: If58dc40b093c2f61c6ae6b82fcd8f0bf53be464a
The os-migrations extension exposes endpoint to fetch all migrations.
The migrations can filtered by host and status. If cells are
enabled migrations can be listed for all cells or can be filtered for a
particular cell.
The route for fetching migrations for
a region is - v2/{tenant_id}/os-migrations. Filters can be passed as
query parameters -
v2/{tenant_id}/os-migrations?host=host1&status=finished&cell_name=Child
DocImpact
Change-Id: Id70dbece344a722b2dc8c593dd340ef747eb43d3
Implements: blueprint list-resizes-through-admin-api
Need check whether the already used and reserved exceeds the new quota
before update it.
DocImpact
Implements a validation to validate whether already used and reserved
quota exceeds the new quota when run 'nova quota-update', it will throw
error if the quota exceeds. This check will be ignored if admin want to
force update when run 'nova quota-update' with additional option
'--force'.
This validation help admin to be aware of whether the quotas are
oversold when they try to update quota and also provide an option
'--force' to allow admin force update the quotas.
Fix bug 1160749
Change-Id: Iba3cee0f0d92cf2e6d64bc83830b0091992d1ee9
Implements blueprint record-reason-for-disabling-service
We added a field to the service table to log a reason when a service has
been disabled.
We added a new API extension called os-extended-services. The new extension
will extend the os-services extension adding:
- A method for disabling a service and specify a reason for that.
PUT /v2/{tenant_id}/os-services/disable-log-reason
When the os-extended-extension is loaded the call:
GET /V2/{tenant_id}/os-services
will return the list of services with reason information it that exists.
DocImpact
Change-Id: I87a4affc45160796ff11c7b03e591e6aba73d62a
The total RAM and the available RAM are stored in memory of CellStateManager.
This API gets the available slots per flavor for a given cell.
Implements: blueprint get-cell-free-ram
Change-Id: I2a6dbb8835cad04f3ee058c3012490782d7c8e67
Added 'extended-quotas' extension that has provides ability for admins
to be able to delete a non-default quota (absolute limit) for a tenant,
so that tenant's quota will revert back to the configured default.
Implements blueprint admin-api-for-delete-quota
Change-Id: I7375420a466823b3e099aebff71a8f7d7f922afb
DocImpact: This patch adds an extension 'UsedLimitsForAdmin'. If this
extention is enabled then it extends the used limits API behavior, such
that admin can fetch the details of any customer's quota usage by passing
the customer's tenant id in query parameters.The API signature for the
same is 'v2/{tenant_id}/limits?tenant_id={customer_tenant_id}'
Change-Id: I89b8b5083e46b899458407426c89a3865e960faa
Implements: blueprint customer-quota-through-admin-api