qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC] migration: Convert 'status' of MigrationInf


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC] migration: Convert 'status' of MigrationInfo to use an enum type
Date: Thu, 26 Feb 2015 08:24:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/26/2015 12:58 AM, zhanghailiang wrote:
> The original 'status' is an open-coded 'str' type, convert it to use an
> enum type.
> This conversion is backwards compatible, better documented and
> more convenient for future extensibility.
> 
> In addition, Fix a typo for qapi-schema.json: comppleted -> completed
> 
> Signed-off-by: zhanghailiang <address@hidden>
> ---


> +++ b/qapi-schema.json
> @@ -411,18 +411,42 @@
>             'overflow': 'int' } }
>  
>  ##
> +# @MigState:
> +#
> +# An enumeration of migration status.
> +#
> +# @failed: some error occurred during migration process. (since 0.14.0)
> +#
> +# @none: no migration has happened ever.

s/happened ever/ever happened/

> +#
> +# @setup: migration process has been initiated. (since 0.14.0)
> +#
> +# @cancelling: in the process of cancelling migration. (since 2.0)

It's weird to advertise this enum value when the code goes to lengths to
hide it behind 'active', but I guess it's okay.

> +#
> +# @cancelled: cancelling migration is finished. (since 0.14.0)
> +#
> +# @active: in the process of doing migration. (since 0.14.0)
> +#
> +# @completed: migration is finished. (since 0.14.0)
> +#
> +# Since: 2.3

It's weird to see various enum values stating (since xyz) that is older
than 2.3.  Generally, we only use that for an enum value that is newer
than the enumeration.  I'd be just fine if you got rid of all of the
per-value '(since xyz)' strings.

Otherwise, looks good to me.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]