With compute API microversion 2.53 there is a single
PUT /os-services/{service_id} API which takes the service
id as a UUID. Since the openstack compute service set
command only takes --host and --service (binary) to identify
the service, this change checks if 2.53 or greater is being
used and if so, looks up the service by host and binary and
calls the appropriate methods in novaclient.
If the command cannot uniquely identify a compute service
with the given host and binary, an error is raised. A future
change could add an --id option to be used with 2.53+ to
pass the service id (as UUID) directly to avoid the host/binary
filtering.
Change-Id: I868e0868e8eb17e7e34eef3d2d58dceedd29c2b0
Story: 2005349
Task: 30302
This simply updates the docs for the compute service set --up
and --down options to mention that --os-compute-api-version 2.11
or greater is required to use those options.
Change-Id: I52891fe36c84d0df3e868ab4f3c8e2357e9ba529
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: I1572a21632740b4d9a233a6a31c49e3bac5394ef
Adds the --host and --hypervisor-hostname options to
``openstack server create`` CLI.
Depends-On: https://review.opendev.org/670558
Change-Id: If188c3d96fa506dbe62ef256418f2f9bca1520c2
Blueprint: add-host-and-hypervisor-hostname-flag-to-create-server
The compute service commands emit a "Binary" in the output but
the --service filter option isn't as clear that it's the binary
(for set it is but not list) nor do the docs give an example
of a binary (typically nova-compute but could be others like
nova-conductor, nova-scheduler, etc). This simply mentions that
the --service option is the binary for "compute service list"
and gives an example value for the option in both list and set
help.
Change-Id: If87fc37352c3a251cc89041723adbe04dedf4f8a
When the --name-lookup-one-by-one option passed to the 'server list'
command, the image and flavor names will be looked up for each
server being listed instead of fetching all image/flavor names.
The current code assumes all servers have an image attribute, but
servers booted from volumes have no image, so the following error is
raised when listing BFV servers with --name-lookup-one-by-one:
AttributeError: ('unicode'|'str') object has no attribute 'get'
The error occurs when the code attempts server.image.get('id').
This fixes the --name-lookup-one-by-one code not to assume an image
for a server. The unit tests for 'server list' have also been
robustified to feature one BFV server to enhance our test coverage.
Story: #2006063
Task: #34777
Change-Id: I312c971346c7ded93f6fcaa515098554b8580295
Related functional tests are converted into JSON format.
Otherwise, it is not easy to check results.
Partial-Bug: #1687955
Partially implement blueprint osc-formattable-columns
Change-Id: Ib82e15738544975fede0c54cc5eaf239f4c67277
This patch adds a new parameter ``--reason`` to ``openstack server lock``
command and ``--locked``, ``unlocked`` filtering parameters to
``openstack server list`` command. This can help users to provide a
reason when locking the server and to filter instances based on their
locked value from 2.73 microversion.
Implements blueprint add-locked-reason
Depends-On: https://review.opendev.org/#/c/661785/
Change-Id: Ib2714f98b24d47e570da8a6c231e765acd2ff595
Currently, doing a cold migration while specifying a target host is not
possible however nova api supports it since version 2.56.
This patch allows passing "--host" when doing a cold migration.
It runs normally if --os-compute-api-version is 2.56 or greater and
returns an error otherwise.
Change-Id: I960109008096ce8bb4e4c8ca6ffb22c33aacd995
Story: 2003325
Task: 24359
The compute API 2.20 microversion allows attaching and detaching
a volume to/from a server with status SHELVED or SHELVED_OFFLOADED.
For OSC this just means the user has to specify the appropriate
minimum microversion to make that work, so this change mentions
that in the "server add volume" and "server remove volume" command
description.
Related to nova blueprint volume-ops-when-shelved
Change-Id: I4824175e5d9e124e3bd9e9a8fd5a89277efc6cff
The 2.21 compute API microversion allows listing instance
action events and getting action event details for a deleted
server (which can be useful for auditing until the deleted
server is purged). As far as OSC is concerned it's just a
matter of specifying --os-compute-api-version 2.21 or higher
when listing events or showing event details, so this change
mentions 2.21 in the description of those commands.
Related to nova blueprint os-instance-actions-read-deleted-instances
Change-Id: If276c794f448b6fa5b0845499f3507a159acab85
Per the discussion at the Train Forum [1] this deprecates
the problematic --live option on the server migrate command
which, depending on the compute API version used, forcefully
bypasses the scheduler and also does not allow you to live
migrate a server and let the scheduler pick a host.
The --live option is replaced here with two new options:
* --live-migration: this simply tells the command you want to
perform a live rather than cold migration; if specified with
--live the --live-migration option takes priority.
* --host: when specified, this will request a target host for
the live migration and will be validated by the scheduler;
if not specified, the scheduler will pick a host. This option
is mutually exclusive with --live.
We can build on the --host option by supporting cold migrations
with a specified host when using compute API version 2.56 or
greater but that will come in a separate change.
If the --live option is ever used we log a warning.
Note there are several related changes for this issue:
- https://review.openstack.org/#/c/628334/
- https://review.openstack.org/#/c/626949/
- https://review.openstack.org/#/c/627801/
- https://review.openstack.org/#/c/589012/
- https://review.openstack.org/#/c/460059/
This change allows us to deprecate the --live option and provide
a replacement which is backward compatible without having to use
something potentially error-prone like nargs='?'.
Closes-Bug: #1411190
[1] https://etherpad.openstack.org/p/DEN-osc-compute-api-gaps
Change-Id: I95d3d588e4abeb6848bdccf6915f7b5da40b5d4f
The following were deprecated over two years ago and can now be removed:
* Remove ``backup`` commands in favor of ``volume backup``
* Remove ``snapshot`` commands in favor of ``volume snapshot``
* Remove ``volume create`` options ``--project``, ``--user`` and ``--multi-attach``
* Use of an auth-key positional argument in volume transfers
* ``volume transfer request`` no longer accepts 'auth_key' as a positional arg,
``--auth-key`` is now required
Internal (non-user-visible)
* Rename backup.py to volume_backup.py for Volume v1 and v2, update tests
These are backwards incompatible changes and will require a major
version bump after they are merged.
Change-Id: I94aa7a9824e44f9585ffb45e5e7637b9588539b4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
The following were deprecated for several releases and can now be
removed:
* Remove ``port create|set`` options ``--device-id`` and ``--port-id``
* Remove ``router set`` option ``--clear-routes``
* Remove ``security group rule create`` options ``--src-group`` and ``--src-ip``
These are backwards incompatible changes and will require a major
version bump after they are merged.
Change-Id: Ieae74c14f6b3e263721a3146cf76f94a9ab792f6
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
The following were deprecated over two years ago and can now be
removed/changed:
* Remove ``service create`` option ``--type``
* Remove ``role list`` options ``--project`` and ``--user``
* Remove ``user role list`` command
These are backwards incompatible changes and will require a major
version bump after they are merged.
Change-Id: I29e2fc9516dffbfd83eef0bc91e834dde99b4105
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
The following were deprecated over two years ago and can now be removed:
* ``ip fixed add|remove`` in favor of ``server add|remove fixed ip``
* ``ip floating add|remove`` in favor of ``server add|remove floating ip``
These are backwards incompatible changes and will require a major
version bump after they are merged.
Change-Id: I10c4d32a3c0b55ad41a02afd3b14249bafcb55a9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
These tests are showing signs of problems running in parallel
so serialse the create/delete/list/set/unset tests. They all
used two aggregates each anyway...
Change-Id: Iba4b52c179e6914eaeefea1da0f7eaefcdcf1f87
Signed-off-by: Dean Troyer <dtroyer@gmail.com>