From acb5f369b86d45efcb8d6875d8b06c27ed5ab2ce Mon Sep 17 00:00:00 2001 From: Jerry Cai Date: Wed, 15 Oct 2014 13:52:09 +0800 Subject: [PATCH] Add document for new host-maintenance-mode feature Add document for new host-maintenance-mode feature. For detail, please refer to the host_maintenance_mode.rst. Change-Id: I0d61ba75a2c7b551fbced54d1a8a297fa58fdb4f Closes-Bug: 1381325 --- nova-powervc/doc/host_maintenance_mode.rst | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 nova-powervc/doc/host_maintenance_mode.rst diff --git a/nova-powervc/doc/host_maintenance_mode.rst b/nova-powervc/doc/host_maintenance_mode.rst new file mode 100644 index 0000000..174490a --- /dev/null +++ b/nova-powervc/doc/host_maintenance_mode.rst @@ -0,0 +1,61 @@ +New Host Maintenance mode restAPI documentation for PowerVC Driver +=================================== +Included documents: + +- How to call restAPI to enable/disable the Host Maintenance mode + +Where is the source code: + + Source code is located in powervc/nova/extension/host_maintenance_mode.py + +How to enable the restAPI: + + Create a link from this source file to nova api folder: + # ln -s powervc/nova/extension/host_maintenance_mode.py nova/api/openstack/compute/contrib/host_maintenance_mode.py + +How to verify if the restAPI is installed properly: + + # nova list-extensions | grep maintenance + The result should be like the following: + | Host-maintenance-mode | Get and enable/disable Host maintenance mode, and evacuate all... + +How to get the Host Maintenance mode: + + Method: Get + URL: /v2/{tenant-id}/os-host-maintenance-mode/{host_name} + Request parameters: + 1. tenant-id: The tenant ID in a multi-tenancy cloud. + 2. host_name: The name of a host. + Sample: + /v2/ae1c0ea86c95432d95995617022e4c96/os-host-maintenance-mode/789522X_067E30B + +How to enable the Host Maintenance mode: + + Method: Put + URL: /v2/{tenant-id}/os-host-maintenance-mode/{host_name} + Request parameters: + 1. tenant-id: The tenant ID in a multi-tenancy cloud. + 2. host_name: The name of a host. + Request Body: + { + "status":"enable", + "migrate":"active-only"/"none" + } + Request Body Description: + 1. Set "status" to "enable" to enable the Host Maintenance mode. + 2. Set "migrate" to "active-only" that could evacuate all the VMs to another host during the process. + Set "migrate" to "none" or just ignore this parameter that will not evacuate VMs. + +How to disable the Host Maintenance mode: + + Method: Put + URL: /v2/{tenant-id}/os-host-maintenance-mode/{host_name} + Request parameters: + 1. tenant-id: The tenant ID in a multi-tenancy cloud. + 2. host_name: The name of a host. + Request Body: + { + "status":"disable" + } + Request Body Description: + 1. Set "status" to "disable" to enable the Host Maintenance mode.