Update server migrate support for passing a target host

Registered by Martin Chlumsky

When running `openstack server migrate` with --live you must pass a hostname as a target.
It is however possible to not pass a hostname via the nova api and let the nova scheduler decide the target host [1].
Nova client implements this already.

On the other hand, when running `openstack server migrate` without --live, you cannot pass a hostname as a target.
Via the nova api, since version 2.56, it is possible to pass a hostname as a target. [2]

This bp would allow us to pass or not pass a target host regardless of the presence of the --live option.

The result would look like this:

usage: openstack server migrate [-h] [--live] [--host <hostname>]
                                [--shared-migration | --block-migration]
                                [--disk-overcommit | --no-disk-overcommit]
                                [--wait]
                                <server>

Migrate server to different host

positional arguments:
  <server> Server (name or ID)

optional arguments:
  -h, --help show this help message and exit
  --live Perform a live migration
  --host <hostname> Target hostname
  --shared-migration Perform a shared live migration (default)
  --block-migration Perform a block live migration
  --disk-overcommit Allow disk over-commit on the destination host
  --no-disk-overcommit Do not over-commit disk on the destination host
                        (default)
  --wait Wait for migrate to complete

[1] https://developer.openstack.org/api-ref/compute/?expanded=live-migrate-server-os-migratelive-action-detail#live-migrate-server-os-migratelive-action
[2] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id51

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Martin Chlumsky
Direction:
Needs approval
Assignee:
Martin Chlumsky
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

This is tracked in storyboard now: https://storyboard.openstack.org/#!/story/2003325

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.