Adds support for the 2.53 microversion which changes the
os-services and os-hypervisors APIs to use a UUID for the ID
value on the resource.
Also, the PUT and GET API methods have changed a bit for
both resources in this microversion, so the pythong API
bindings and command lines have been adjusted accordingly.
Part of blueprint service-hyper-uuid-in-api
Change-Id: Ic721143cc154d91e74a8a9dd2c1e991045c94305
Since we no longer have v2 extensions, the GET /os-services
response is going to have an id and disabled_reason field,
so we don't need to have conditional checks around those.
Change-Id: I5d11ffb48febb53f70bf1193b2cba5ec839a3f0d
Change I9269ffa2b80e48db96c622d0dc0817738854f602 in the Nova
server removes the need for reservations, which means that
once the server is resized in nova-compute and the vcpus and
memory_mb are changed on the instances record, the usage count
will also change, before the resize is confirmed. This means
we need to adjust the usage assertions in the resize down test.
Usage changes once the server is in VERIFY_RESIZE state, and
the usage will change again if the resize is reverted.
Note that if we were getting usage without the 'reserved'
query paramter to the 'limits' API, the behavior would have
been the same regardless of the change to Nova for counting
quotas.
Depends-On: I9269ffa2b80e48db96c622d0dc0817738854f602
Related to blueprint cells-count-resources-to-check-quota-in-api
Change-Id: I91ca0d204454987dcce1c68d9bf0f532b469df6d
The argument to the function should be the volume ID,
not the attachment ID.So the argument name of the
function here is easy to misunderstand.
Change-Id: Ie093b6acebe8b9e8dbdfed89856666db25bcf756
This adds a functional test which creates a server at a larger
flavor and then resizes it down to a smaller flavor, and then
reverts the resize. It checks quota before, during and after
the resize. This is an important wrinkle with the counting
quotas changes happening in the server in Pike.
Change-Id: If1bb59e513b91a99fae2b6825248a40d8e7ac7b9
With the upcoming counting quotas changes in Nova, and the
fact the novaclient functional tests are run in serial with
the same tenant, it would be useful to validate that
"nova resize-confirm" works as expected and that the quota usage
before, during and after the resize is confirmed is as expected,
that is, when resizing we expect the quota usage to change.
Change-Id: Id5be8edfde446b9e714460a606b446a2daf64007
The 2.51 microversion adds the 'volume-extended' server
external event to the os-server-external-events API.
This is an admin-only API by default and this event is
currently only used by Cinder as part of extending the
size of an attached volume, and therefore does not
have any CLI or python API binding impacts in the client.
Part of blueprint nova-support-attached-volume-extend
Change-Id: I8293704dbb4f75306fe32d3a0118d5bf42c8457e
This adds support for the 2.50 microversion which does the following:
* Adds the server_groups and server_groups_members resources to the output
for the 'nova quota-class-show' and 'nova quota-class-update' CLIs.
* Removes the ability to show or update network-related resource quota class
values, specifically floating_ips, fixed_ips, security_groups and
security_group_members.
* Defines explicit kwargs for the update() method in the python API binding.
This also fixes a problem where the 'nova quota-class-update' CLI was
incorrectly capped at the 2.35 microversion for updating network-related
resources. That was true for the os-quota-sets API which is tenant-specific,
but not for the os-quota-class-sets API which is global.
Functional tests are added for the 2.1 and 2.50 microversion behavior for
both commands.
Part of blueprint fix-quota-classes-api
Change-Id: I2531f9094d92e1b9ed36ab03bc43ae1be5290790
The spec [1] recommends the following sections:
- install
- contributor
- configuration
- cli
- admin
- user
- reference
Only a few of these are useful here:
- contributor
- cli
- user
- reference
Add these and populate them.
[1] specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration
Change-Id: I8a9ddcc915f25ebfaa1e994dba6c15883bd2715d
`nova version-list` crops the endpoint url to exclude API version and
project-id(for microversions < 2.18). It is ok, but the code was
designed before Nova-API moved under uwsgi, which changed the endpoint
url format.
The latest endpoint url contains the hostname and port which can be one
for several services and it is a wrong case to cut the whole path from
the endpoint.
Closes-Bug: #1702194
Change-Id: Icba858b496855e2ffd71b35168e8057b28236119
Change If1e03c9343b8cc9c34bd51c2b4d25acdb21131ff in the API in Pike
makes the os-services API look up services records via the host mapping
in the API datadabase to determine which cell the service lives in.
The host mappings only exist for nova-compute services, which means
you can only enable/disable/force-down nova-compute services now, which
is realistically the only service that ever made sense for those actions.
That change broke some functional tests in novaclient though which loop
through all services and disables them or forces them down. This change
fixes those tests by only attempting the action on nova-compute services.
This change also deprecates the binary argument to the service
enable/disable/force-down commands since the only value that ever really
worked or does anything is nova-compute, so a future version of the CLI
should just hard-code that value.
Change-Id: Idd0d2be960ca0ed59097c10c931da47a1a3e66fb
Closes-Bug: #1700359
This adds support for microversion 2.47 which directly embeds the
flavor information in the server details. With this change, CLI
requests with microversion >= 2.47 will no longer need to do
additional queries to get the flavor and flavor extra_specs
information. Instead, the flavor information will be output
as separate key/value pairs with the keys namespaced with the
"flavor:" prefix. As one would expect, these keys can also be
specified as output fields when listing servers.
Change-Id: Ic00ec95485485dff0fd4dcf8cad6ca56a481d512
Implements: blueprint instance-flavor-api
Depends-On: If646149efb7eec8c90bf7d07c39ff4c495349941
Methods `get_vnc_console`, `get_rdp_console`, `get_serial_console` and
`get_spice_console` of ServersManager have complitely equal code, args spec
and docstrings for 2.0-2.5 and 2.6+ microversions. There is no reason to
duplicate those methods, so this patch removes duplicates.
Change-Id: I8c0e6f1f9138958bdb5d840cfd89e584c89895b0
--profile argument can be loaded from OS_PROFILE environment variables
to avoid repeating --profile in client commands.
Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I52415354f0c7a7483eddaa48f2acafcdecbb26fd
This is a partial revert of the previous patch. The inline setup of
the logger ends up causing issues when this is consumed by other
libraries that want control over the logger.
Closes-Bug: #1697452
This reverts commit 9a272014167390217351dd5a60f50f518f4ae600.
Change-Id: I1d61d4952aef1039e72a2aac629cb13a6a15d7b2
Convert all the individual tests to use the common mocked client
that is defined in setUp(). This simplifies the individual tests
and lays the groundwork for supporting specifying the API version
in the mocked client since it'll be needed in a future commit.
Change-Id: I4c0722296d3b1997eed878e5b90198f8982157d1
In Ic75be3acb8b77aae8da631e3c4cd6f545a9a35cb,
'global_request_id' is set
in the constructor of class keystoneauth1.adaptor.Adapter.
But 'global_request_id' was not passed to the constructor,
'global_request_id' was cleared.
It caused the test failure.
It is not necessary to set 'global_request_id'
in the constructor of class SessionClient
and just passing 'global_request_id' in kwargs
is required.
Change-Id: Id587e35c221fe2b11889469f88557d254125ea7e
Closes-Bug: #1697358
The release note for the 2.32 microversion support was originally
added in the Newton release and tagged on 5.0.0:
7fb0bd4f357a7f9e24c864584b398a25171580cf
Then it was modified on master (pike) with change:
aa7f35d76b5768ec3fe4d45ad010d53adff7cccd
That makes reno think that it's a new unreleased release note,
which makes it show up in the unreleased notes which are going
to eventually be the release notes for the 9.0.0 release. This
is wrong and confusing since 2.32 support happened in 5.0.0 not
9.0.0.
Reverting the typo change doesn't help since reno is still picking
up the release note from that change in the git history. The only
way to remove the release note from being processed on the current
branch (master) is to delete it. The note would still be available
in stable/ocata and stable/newton branches.
Change-Id: Ie6e9b930ff49621244df286d8f1d2cedffa2ff11
The test_rebuild functional test has been failing at a very high rate
lately, above 50%, so it's blocking other changes from getting in.
This change skips the test due to the bug until the bug is fixed
but we need to unblock other changes.
Change-Id: Ib5f6474f642c4fa14d82349c47d51009e9341045
Related-Bug: #1694371
This just bumps API_MAX_VERSION to match nova. In this microversion nova
just adds a new header to the response, no client changes are needed.
Change-Id: I4c9a37c2a6f79388259032ba90c328d195051f94
Help message for nova aggregate-update needs to be
corrected, to be more clear, by specifying 'name'
is the new name desired in the update.
Corrected it.
Change-Id: I8e616a257c4dd90d85ebac3059683f358a5512dd
Closes-Bug: #1560442
client.logger.warning if reached, will give
this error "No handlers could be found for
logger "novaclient.v2.client"".
Fixed by using warnings.warn() and corrected
root cause by adding appropriate handlers.
Change-Id: I60c8a023cff92f8b6f37a4a14b6193c3efaa19a8
Closes-Bug: #1688507
Previously, --block-device and --ephemeral would error out with an
insctrutable (to the user) error message if one of the key=value pair
it expects wasn't actually key=value, for instance:
nova --block-device 995abd81-2626-413c-9af6-51f105fab214,tag=foo \
--image CirrOS --flavor custom my_instance
ValueError: dictionary update sequence element #0 has length 1; 2 is
required
This patch makes the error message clearer.
Change-Id: I2dd5dd805df2b0382b015dc625205119d7d0b03b