From d6d41bf888ac3270d42a6c59f81dab393411374d Mon Sep 17 00:00:00 2001 From: Pushkar Umaranikar Date: Fri, 12 Aug 2016 21:47:07 +0000 Subject: [PATCH] Api-ref: Improve os-migrateLive input parameters Modified type of block_migration from input params of os-migrateLive API based on API version 2.25 Change-Id: I82c6537d137b462dbe6d05c07a9b3afb5a1501d5 Closes-Bug: #1551782 --- api-ref/source/parameters.yaml | 14 ++++++++++++++ api-ref/source/servers-admin-action.inc | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 35c85cf9b2fb..fd66836bd703 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -1095,6 +1095,19 @@ block_migration: in: body required: true type: boolean + max_version: 2.24 +block_migration_2_25: + description: | + Migrates local disks by using block migration. Set to ``auto`` which means + nova will detect whether source and destination hosts on shared storage. if they are + on shared storage, the live-migration won't be block migration. Otherwise the block + migration will be executed. Set to ``True``, means the request will fail when the + source or destination host uses shared storage. Set to ``False`` means the request + will fail when the source and destination hosts are not on the shared storage. + in: body + required: true + type: string + min_version: 2.25 boot_index: description: | Defines the order in which a hypervisor tries devices when it attempts to boot @@ -1413,6 +1426,7 @@ disk_over_commit: in: body required: true type: boolean + max_version: 2.25 display_description: description: | The volume description. diff --git a/api-ref/source/servers-admin-action.inc b/api-ref/source/servers-admin-action.inc index d48d181e84de..ff879095fe3e 100644 --- a/api-ref/source/servers-admin-action.inc +++ b/api-ref/source/servers-admin-action.inc @@ -146,10 +146,9 @@ omit this parameter, the scheduler chooses a host. If a scheduled host is not suitable to do migration, the scheduler tries up to ``migrate_max_retries`` rescheduling attempts. -If both source and destination hosts provide local disks, you can set -the ``block_migration`` parameter to ``true``. If either host uses -shared storage, the migration fails if you set this ``block_migration`` -to ``true``. +Starting from API version 2.25, the ``block_migration`` parameter could be +to ``auto`` so that nova can decide value of block_migration during live +migration. Policy defaults enable only users with the administrative role to perform this operation. Cloud providers can change these permissions @@ -175,12 +174,13 @@ Request - server_id: server_id - host: host_migration - block_migration: block_migration + - block_migration: block_migration_2_25 - disk_over_commit: disk_over_commit - force: force_live_migrate **Example Live-Migrate Server (os-migrateLive Action): JSON request** -.. literalinclude:: ../../doc/api_samples/os-migrate-server/live-migrate-server.json +.. literalinclude:: ../../doc/api_samples/os-migrate-server/v2.30/live-migrate-server.json :language: javascript Response