Message ID | 20210224135255.253837-7-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
Series | qapi/qom: QAPIfy --object and object-add | expand |
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the dbus-vmstate object. > > A list represented as a comma separated string is clearly not very > QAPI-like, but for now just describe the existing interface. Does your alias proposal give us a path forward for improving that down the road? Or maybe it's not an alias we need, but a new field with better QAPI-like semantics, deprecate the old one, and wait out the 2 release cycles? > > Signed-off-by: Kevin Wolf <kwolf@redhat.com> > --- > qapi/qom.json | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/qapi/qom.json b/qapi/qom.json > index 1dbc95fb53..a6a5049707 100644 > --- a/qapi/qom.json > +++ b/qapi/qom.json > @@ -232,6 +232,22 @@ > 'base': 'CryptodevBackendProperties', > 'data': { 'chardev': 'str' } } > > +## > +# @DBusVMStateProperties: > +# > +# Properties for dbus-vmstate objects. > +# > +# @addr: the name of the DBus bus to connect to > +# > +# @id-list: a comma separated list of DBus IDs of helpers whose data should be > +# included in the VM state on migration > +# > +# Since: 5.0 > +## > +{ 'struct': 'DBusVMStateProperties', > + 'data': { 'addr': 'str' , > + '*id-list': 'str' } } Matches backends/dbus-vmstate.c:dbus_vmstate_class_init(), including splitting id-list into a GHashTable with get_id_list_set(). Since there is benefit to documenting/converting our existing API in this series without dragging it out by also trying to fix the warts, Reviewed-by: Eric Blake <eblake@redhat.com>
Am 26.02.2021 um 16:58 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the dbus-vmstate object. > > > > A list represented as a comma separated string is clearly not very > > QAPI-like, but for now just describe the existing interface. > > Does your alias proposal give us a path forward for improving that down > the road? Or maybe it's not an alias we need, but a new field with > better QAPI-like semantics, deprecate the old one, and wait out the 2 > release cycles? Aliases can just give options an alternative name, they don't change anything about the structure of the option. Splitting a string into multiple values is certainly not one of the things they solve. So if we care, adding a replacement and deprecating the old option is probably what we would do. Kevin
diff --git a/qapi/qom.json b/qapi/qom.json index 1dbc95fb53..a6a5049707 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -232,6 +232,22 @@ 'base': 'CryptodevBackendProperties', 'data': { 'chardev': 'str' } } +## +# @DBusVMStateProperties: +# +# Properties for dbus-vmstate objects. +# +# @addr: the name of the DBus bus to connect to +# +# @id-list: a comma separated list of DBus IDs of helpers whose data should be +# included in the VM state on migration +# +# Since: 5.0 +## +{ 'struct': 'DBusVMStateProperties', + 'data': { 'addr': 'str' , + '*id-list': 'str' } } + ## # @IothreadProperties: # @@ -270,6 +286,7 @@ 'cryptodev-backend', 'cryptodev-backend-builtin', 'cryptodev-vhost-user', + 'dbus-vmstate', 'iothread' ] } @@ -296,6 +313,7 @@ 'cryptodev-backend': 'CryptodevBackendProperties', 'cryptodev-backend-builtin': 'CryptodevBackendProperties', 'cryptodev-vhost-user': 'CryptodevVhostUserProperties', + 'dbus-vmstate': 'DBusVMStateProperties', 'iothread': 'IothreadProperties' } }
This adds a QAPI schema for the properties of the dbus-vmstate object. A list represented as a comma separated string is clearly not very QAPI-like, but for now just describe the existing interface. Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- qapi/qom.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)