In I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0 we switched off XML support. In
this review we entirely remove all the testcases and supporting files.
Change-Id: I83827d438753fd3899053dd6e09bc77c997c7406
A space before ":" is unnecessary because of JSON.
So this patch removes the blanks before ':' for
v2 os-virtual-interfaces integrated test.
Change-Id: I20965a183a6a00e263cd0fdd91a3337162ecbe9b
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
API samples and templates of multinic-add-fixed-ip are malformed and
one parameter name is wrong now.
This patch fixes them.
Change-Id: I997584fdcf0b57220280b554ab9da9782d3d0250
The bulk floating ip extension was not showing the instance_uuid
or the fixed_ip properly due to a missing join and an ommision
when the extension was first created. This updates the extension
to display all of the relevant data.
Change-Id: I81c2c742a7eed134b5452c19da0cc55811c009ab
Closes-Bug: #1360426
Clearly nobody really uses the "application/vnd.openstack.image"
links in the returned results from GET /v2/{tenant}/images
REST API call, since the link URI returned in it is wrong.
Glance URIs do *not* contain a project or tenant in the URI
structure like Nova's REST API URIs do, but _get_alternate_link()
method of the image ViewBuilder tacks it on improperly:
Change-Id: I4ccb5628569c60026a1772df0794ac0271c48db3
Closes-Bug: #1343080
When using serial console we are expecting using a plain websocket
so we should to return the 'ws://' scheme as the default one, also
it makes no sense to handle webserving content since currently
nothing has been implemented in favor of this case.
DocImpact: The 'base_url' option serial_console has been updated
Closes-Bug: #1373950
Change-Id: I0d0e4f7060febec5e0a357cd3e8c05486f2afaa5
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
qcow is not a valid type of snapshot in real environment,
the require type should be qcow2 instead of qcow.
Change-Id: I0fc8e90913699074cd997f5c1e0693372436d14f
Adds a new REST APIv2 to call service serial console
Co-Authored-By: Ian Wells <iawells@cisco.com>
Co-Authored-By: Sushma Korati <sushma_korati@persistent.co.in>
Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>
Patial-Implements: blueprint serial-ports
Change-Id: I35d94c1924caa9cbc0fcdd9c637d28e95ff31ab2
This patch changes v3 version API to v2.1 and makes v2 unit tests
share between v2 and v2.1.
v2.1 API does not support XML format. Unit tests related to XML
don't work against v2.1.
Partially implements blueprint v2-on-v3-api
Change-Id: I7abadb0c9082b9e90a98938967f0e27d1a2fa766
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
More work needs to be done in rfc3986 to give the user more control over what
they consider to be a valid URI in the context of RFC 3986. For example, a
previous incarnation of these tests checked that "1" and "abc" were invalid
when according to the RFC they are.
Update the API samples and tests to use valid URIs
DocImpact
Change-Id: I288fbaead64990db1053b7a11e82904611b8498f
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>
The agent_id should be integer for agent create and index. But in
the api sample file it is string type. It's because the api sample
tests provide agent_id with string type in fake data. This patch
correct the api sample files and tests.
For agent update, it use agent_id that passed from url, make the
response use string for agent_id. We can't fix this problem for
back-compatibility. This will be fix in the future after v3 API
expose by micro-version
Change-Id: I262b4b26c94dba003e80bda2f38d2e985ef9f220
Partial-Bug: #1333494
If a service is enabled, the "disabled_reason" field in response
for /v2/.{tenant_id}./os-services/detail is null, however, currently
it's specified as "" in the doc, thus may be confusing to users.
This patch change the template and doc, it should not cause issue to
existing applications.
Change-Id: Ia71ec4c97a355bcc1a7b63e6107db77f80a5d843
Close-bug: 1328382
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
An SSH key generated by Nova contains the comment 'Generated by Nova'. Older
versions (prior to 0.7.2) of cloud-init trip over the spaces in the comment
and as a result of that the key injected into the root account is not disabled
by cloud-init. Yes, it's a cloud-init bug but it's also a regression in the
sense that older OpenStack installations (Essex and older) don't contain
spaces in Nova generated key comments and thus older cloud-init's are not
affected in these environments.
This patch replaces the spaces with dashes, i.e., 'Generated-by-Nova'.
Spaces were introduced by commit: 114109dbf4
Ubuntu cloud images with cloud-init < 0.7.2: 10.04 LTS and 12.04 LTS
cloud-init bug report: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1220273
Closes-Bug: #1297685
Change-Id: I1761f61dfbba58be98351ae4a51884b03268cf09
datetime objects are serialized into xml using simply str() and this
is a slightly different format from ISO8601 in that the date isn't
separated from the time using 'T'.
(However, note that the iso8601 library happily accepts this format)
Add a specific regexp for this format so we can test for it in the
places we know it is used. This also means we can remove the generic
%(timestamp)s regexp.
Note that unlike the isotime and strtime formats, whether this format
includes timezone or microsecond information depends on whether the
datetime object had those fields set. The isotime format always
includes a timezone but not microseconds, whereas the strtime format
never includes a timezone but always includes microseconds.
There are a small number of examples where this format is used in JSON
too - e.g. the instance usage audit log extension pre-serializes its
timestamps by doing:
return dict(period_beginning=str(begin),
period_ending=str(end),
Using a name like 'xmltime' for the timestamp format used in cases
like this actually makes sense - it highlights that the format used
in this case is a weird mistake.
Full context here:
http://lists.openstack.org/pipermail/openstack-dev/2014-April/033971.html
Change-Id: I70f839ac17273ed10078b833aeba308bd5e994e1
This patch adds the new API Sample file and its test for Nova V2 and V3
get keypair APIs.
This patch extend the timstamps reg exp to allow the combination
of TZ and microsecond/
Closes-Bug: 1298769
Closes-Bug: 1298818
Change-Id: If695a23cf95862b7bec6fbc5bdf7fc1733d08d4a
Any datetime objects that get serialized via jsonutils.dumps() get
stringified using strtime() which includes decimal seconds and is
timezone naive.
Use a specific regexp to check the use of this format.
Note that included in here is a fixup to the doc samples for the
instance actions extension - the sample shows it using the
str(datetime) format when in fact it is using strtime. This came
about because before commit 68288b9 we were using a pre-serialized
timestamp in the fake instance actions. I just regenerated the samples
for this.
Full context here:
http://lists.openstack.org/pipermail/openstack-dev/2014-April/033971.html
Change-Id: If52a2a664eccc8aed8a39d1a9dfb0209337c3c79
The fake networks use a pre-serialized timestamp in str(datetime)
format which which doesn't give us the opportunity to test the
serialization code properly and isn't the format use in practice.
Use real dateime objects instead.
Full context here:
http://lists.openstack.org/pipermail/openstack-dev/2014-April/033971.html
Change-Id: I5cbe722fb59cdd326b4c75dcfea14f206d71f668
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
Current keypair sample files 'keypairs-get-resp.json/xml contain
'keypairs' as the first key and that means its sample response
of "list keypairs" API not "get keypair" API.
The tests don't pass a keypair id, so current tests also are for
"list keypairs" API.
Details-
Below API sample files- from their name it looks like these are for
get keypair API. But in actual content of these files are written as
List keypair API response. So it create the confusion that for which
API these API sample file are. Name suggest for GET and content
suggest for LIST Keypair.
/nova/tests/integrated/api_samples/os-keypairs/
keypairs-get-resp.json.tpl
/nova/tests/integrated/api_samples/os-keypairs/
keypairs-get-resp.xml.tpl
Their API sample test cases are written corrosponding to list keypair
APIs.
This patch correct the above API sample file name from get to list
Keypair APIs.
API Sample test cases names are also modified accordingly.
Partial-Bug: 1298769
Change-Id: I88d894ff9b0f6236221fa922601b641f26a87301
This is a follow up to 9e770e6213, which
missed the change in a duplicate copy of host_status.
Add regression test to test_virt_drivers.
This requires changes to the API samples, because they were wrong. virt
drivers use convert_version_to_int which converts a version string to a
4 digit number ("1.0" becomes to 1000)
Change-Id: I28ce23509e3c9feae183a49a8fc5bf3c7c601295
Closes-Bug: #1285035
Avoid adding the current tenant to the flavor access list when
a private flavor is created. In ordeir to add tenants to the
flavor access list we should use the add_tenant api.
Tempest has to be updated accordingly:
https://review.openstack.org/81551
Documentation has to be updated as well:
https://review.openstack.org/82175
Partially (just for the V2 API rather than V2 and V3)
reverts commit 6ba248635b
Fixes unittest which was added in the original commit so it checks
for the behaviour we have now rather than the behaviour after the
backwards incompatible change which is being reverted.
Change-Id: I731081b6df0d96df1bc1763d214d28c62bbbb51c
Closes-Bug: #1286297
Now there are not API sample files of "unshelve a server" and
"shelve-offload" APIs, and OpenStack API documentation also
does not show these APIs.
This patch adds these API sample files.
DocImpact
Closes-Bug: #1285482
Change-Id: Idf797eb6723b94abae71a77c12bc2bb9b330fa28
Ensure that API does not allow conflicting policies to be configured
on an instance group. More specifically the user should not be allowed
to configured 'anti-affinity' and 'affinity' on the same instance group.
In addition to this a validation will also be done on the policy, that is,
if the policy is not supported then an exception will be raised.
This is part of blueprint instance-group-api-extension.
Change-Id: Id19c55cb60109819429f73e2b28efe7f15cc5194
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
Corrects the api samples for the V2 os-assisted-volume-snapshots.
The api samples for the create path were incorrect. This patch fixes
them so the documentation for the API will be correct. It doesn't fix
the input validation as it would be a backwards incompatible change.
Closes-Bug: 1286936
Change-Id: I66a9162e637e3d65bcbd7d033c6c173e67178fbe
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
Implements: blueprint hyper-v-rdp-console
Nova currently supports VNC and SPICE remote console protocols. This
commit adds support for the RDP protocol in a similar way.
Change-Id: I2c219d4a200122c6d6cfcbd8e074dca0f6fea598
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