[Kimchi-devel] [PATCH 2/4] Live migration: new features changes in docs/API/i18n
Paulo Ricardo Paz Vital
pvital at linux.vnet.ibm.com
Tue Nov 17 11:21:46 UTC 2015
On Mon, 2015-11-16 at 21:04 -0200, dhbarboza82 at gmail.com wrote:
> From: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
>
> This patch adds:
>
> - a new optional parameter called 'password'
> in the vm_migrate API. It also sets one of the existing
> parameters, 'user', as optional too.
>
> - control/vms.py changes to support the new parameter
>
> - added 'paramiko' and 'mock' as install/test dependencies
> in README.md
>
> - extra messages in i18n
>
> Signed-off-by: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
> ---
> src/wok/plugins/kimchi/API.json | 6 ++++++
> src/wok/plugins/kimchi/control/vms.py | 3 ++-
> src/wok/plugins/kimchi/docs/API.md | 3 ++-
> src/wok/plugins/kimchi/docs/README.md | 6 ++++--
> src/wok/plugins/kimchi/i18n.py | 8 ++++++++
> 5 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/src/wok/plugins/kimchi/API.json
> b/src/wok/plugins/kimchi/API.json
> index 961f35f..e236e51 100644
> --- a/src/wok/plugins/kimchi/API.json
> +++ b/src/wok/plugins/kimchi/API.json
> @@ -315,6 +315,7 @@
> "remote_host": {
> "description": "IP address or hostname of the
> remote server",
> "type": "string",
> + "required": true,
> "minLength": 1,
> "error": "KCHVM0060E"
> },
> @@ -323,6 +324,11 @@
> "type": "string",
> "minLength": 1,
> "error": "KCHVM0059E"
> + },
> + "password": {
> + "description": "Password of the user in the
> remote server",
> + "type": "string",
> + "error": "KCHVM0069E"
> }
> },
> "additionalProperties": false
> diff --git a/src/wok/plugins/kimchi/control/vms.py
> b/src/wok/plugins/kimchi/control/vms.py
> index 5e24538..96bdb20 100644
> --- a/src/wok/plugins/kimchi/control/vms.py
> +++ b/src/wok/plugins/kimchi/control/vms.py
> @@ -51,7 +51,8 @@ class VM(Resource):
> self.clone = self.generate_action_handler_task('clone')
> self.migrate = self.generate_action_handler_task('migrate',
> ['remote_ho
> st',
> - 'user'])
> + 'user',
> + 'password'
> ])
> self.suspend = self.generate_action_handler('suspend')
> self.resume = self.generate_action_handler('resume')
>
> diff --git a/src/wok/plugins/kimchi/docs/API.md
> b/src/wok/plugins/kimchi/docs/API.md
> index 52368b7..5f0b234 100644
> --- a/src/wok/plugins/kimchi/docs/API.md
> +++ b/src/wok/plugins/kimchi/docs/API.md
> @@ -185,7 +185,8 @@ server.
> * migrate: Migrate a virtual machine to a remote server, only
> support live
> mode without block migration.
> * remote_host: IP address or hostname of the remote server.
> - * user: User to log on at the remote server.
> + * user *(optional)*: User to log on at the remote server.
> + * password *(optional)*: password of the user in the remote
> server.
>
> ### Sub-resource: Virtual Machine Screenshot
>
> diff --git a/src/wok/plugins/kimchi/docs/README.md
> b/src/wok/plugins/kimchi/docs/README.md
> index 2b0427a..16fd1e5 100644
> --- a/src/wok/plugins/kimchi/docs/README.md
> +++ b/src/wok/plugins/kimchi/docs/README.md
> @@ -54,7 +54,7 @@ Install Dependencies
> nfs-utils iscsi-initiator-utils pyparted \
> python-libguestfs libguestfs-tools \
> python-websockify novnc spice-html5 \
> - python-configobj python-magic
> + python-configobj python-magic python-
> paramiko
No packages for Debian/Ubuntu?
>
> # If using RHEL, install the following additional packages:
> $ sudo yum install python-unittest2 python-ordereddict
> @@ -64,6 +64,8 @@ Install Dependencies
>
> # These dependencies are only required if you want to run the
> tests:
> $ sudo yum install pyflakes python-pep8 python-requests
> + $ sudo pip install mock
> +
>
> *Note for RHEL users*: Some of the above packages are located in the
> Red Hat
> EPEL repositories. See
> @@ -80,7 +82,7 @@ channel at RHN Classic or Red Hat Satellite.
> qemu-kvm python-parted python-ethtool
> sosreport \
> xsltproc python-ipaddr python-lxml open-
> iscsi \
> python-guestfs libguestfs-tools spice-
> html5 \
> - python-magic \
> + python-magic python-paramiko \
>
> # These dependencies are only required if you want to run the
> tests:
> $ sudo apt-get install pep8 pyflakes python-requests
> diff --git a/src/wok/plugins/kimchi/i18n.py
> b/src/wok/plugins/kimchi/i18n.py
> index 5e9eee4..d2bc408 100644
> --- a/src/wok/plugins/kimchi/i18n.py
> +++ b/src/wok/plugins/kimchi/i18n.py
> @@ -118,6 +118,14 @@ messages = {
> "KCHVM0061E": _("Unable to create file %(path)s at %(host)s
> using user %(user)s."),
> "KCHVM0062E": _("Unable to read disk size of %(path)s, error:
> %(error)s"),
> "KCHVM0063E": _("Unable to create disk image %(path)s at
> %(host)s using user %(user)s. Error: %(error)s"),
> + "KCHVM0064E": _("Unable to migrate virtual machine to remote
> host %(host)s with arch %(destarch)s using localhost with arch
> %(srcarch)s."),
> + "KCHVM0065E": _("Unable to migrate virtual machine to remote
> host %(host)s with hypervisor %(desthyp)s because localhost uses
> hypervisor %(srchyp)s."),
> + "KCHVM0066E": _("Unable to determine remote host hypervisor and
> architecture. Error: %(error)s"),
> + "KCHVM0067E": _("Unable to migrate virtual machine: subcores per
> core setting from localhostand remote host %(host)s differs."),
> + "KCHVM0068E": _("Unable to setup password-less login at remote
> host %(host)s using user %(user)s. Error: %(error)s"),
> + "KCHVM0069E": _("Password field must be a string."),
> + "KCHVM0070E": _("Error creating local host ssh rsa key of user
> 'root'."),
> +
>
>
> "KCHVMHDEV0001E": _("VM %(vmid)s does not contain directly
> assigned host device %(dev_name)s."),
More information about the Kimchi-devel
mailing list