From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR0Ia-0003o1-LL for qemu-devel@nongnu.org; Thu, 26 Feb 2015 10:24:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR0IW-000353-Al for qemu-devel@nongnu.org; Thu, 26 Feb 2015 10:24:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR0IW-00034s-2Y for qemu-devel@nongnu.org; Thu, 26 Feb 2015 10:24:20 -0500 Message-ID: <54EF3A9A.3000100@redhat.com> Date: Thu, 26 Feb 2015 08:24:10 -0700 From: Eric Blake MIME-Version: 1.0 References: <1424937492-10720-1-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1424937492-10720-1-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BWHA6MJBvgKvRJvDkdrUWRh6KlsEAnLe2" Subject: Re: [Qemu-devel] [PATCH RFC] migration: Convert 'status' of MigrationInfo to use an enum type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: quintela@redhat.com, armbru@redhat.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com, amit.shah@redhat.com, dgilbert@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BWHA6MJBvgKvRJvDkdrUWRh6KlsEAnLe2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > In addition, Fix a typo for qapi-schema.json: comppleted -> completed >=20 > Signed-off-by: zhanghailiang > --- > +++ b/qapi-schema.json > @@ -411,18 +411,42 @@ > 'overflow': 'int' } } > =20 > ## > +# @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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BWHA6MJBvgKvRJvDkdrUWRh6KlsEAnLe2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU7zqaAAoJEKeha0olJ0NqaLYH/2FlpgayPbPQlBR4MJXIy3rr qqGFRezV7xmu81i71qZWngRURsOdWnZxTSfTKERTXRgI7T8/lSN9x+cka+tQwBpB 2X/zuahHGjuiq+TpLcOY/UtxNzlIyGIJ9C8aBaaeLv4jl5pJ82T29DLJi2uxJwBD JTA9oLCPhxAINSq4a1z+Z5h1XTlMUkh+d4Xp7MA3AT7Gici5gJ6TgAKHO5N7JmiQ LiJC/nWZmCG+9hTs9bSkRgQox71ZNNaUlxKsdbf3BTp34UhKvricIhWif/Hmx0VK GrTr1RmE7Y0y+9dK4cBj7hKw7RokEe4pnNRB8ZsHa89LUBC4vZzLB031pOrewOo= =Cc/0 -----END PGP SIGNATURE----- --BWHA6MJBvgKvRJvDkdrUWRh6KlsEAnLe2--