Export machine type deprecation info through QMP
v2 cover Export machine type deprecation info through QMP
Changes v1 -> v2:
* I've decided to get rid of the status-message and suggested-alternative fields, to avoid more bikeshedding.
This series adds machine type deprecation information to the output of the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machine types.
Eduardo Habkost (1):
qmp: Add deprecation information to query-machines
qapi/misc.json | 7 ++++++- vl.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
PATCH v2 1/1 qmp: Add deprecation information to query-machines
Export machine type deprecation status through the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machines.
---
Changes v1 -> v2:
* Take a much simpler approach: add a simple deprecated bool field, instead of including a human-readable message and suggested alternatives
--- qapi/misc.json | 7 ++++++- vl.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
qapi/misc.json +6 -1
@@ -2018,12 +2018,17 @@ # # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) # +# @deprecated: if true, the machine type is deprecated and may be removed +# in future versions of QEMU according to the QEMU deprecation +# policy (since 4.1.0) +# # Since: 1.2.0 ## { 'struct': 'MachineInfo', 'data': { 'name': 'str', '*alias': 'str', '*is-default': 'bool', 'cpu-max': 'int', - 'hotpluggable-cpus': 'bool'} } + 'hotpluggable-cpus': 'bool', + 'deprecated': 'bool' } } ## # @query-machines:
vl.c +1 -0
@@ -1428,6 +1428,7 @@ MachineInfoList *qmp_query_machines(Error **errp) info->name =g_strdup (mc->name); info->cpu_max = !mc->max_cpus ?1 : mc->max_cpus; info->hotpluggable_cpus = mc->has_hotpluggable_cpus; + info->deprecated = !!mc->deprecation_reason; entry =g_malloc0 (sizeof (*entry)); entry->value = info;
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
Re: [Qemu-devel] [PATCH v2 1/1] qmp: Add deprecation information to query-machines
Quoted 44 lines · Eduardo Habkost
Export machine type deprecation status through the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machines.
Signed-off-by Eduardo Habkost <[email protected]>---
Changes v1 -> v2:
* Take a much simpler approach: add a simpledeprecatedbool field, instead of including a human-readable message and suggested alternatives--- qapi/misc.json | 7 ++++++- vl.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)qapi/misc.json +6
-1@@ -2018,12 +2018,17 @@ # # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) # +# @deprecated: if true, the machine type is deprecated and may be removed +# in future versions of QEMU according to the QEMU deprecation +# policy (since 4.1.0) +# # Since: 1.2.0 ## { 'struct': 'MachineInfo', 'data': { 'name': 'str', '*alias': 'str', '*is-default': 'bool', 'cpu-max': 'int', - 'hotpluggable-cpus': 'bool'} } + 'hotpluggable-cpus': 'bool', + 'deprecated': 'bool' } } ## # @query-machines:vl.c +0
-0
vl.c MachineInfoList *qmp_query_machines(Error **errp) · line 1434
Quoted 7 lines
vl.c +1
-0@@ -1428,6 +1428,7 @@ MachineInfoList *qmp_query_machines(Error **errp) info->name =g_strdup (mc->name); info->cpu_max = !mc->max_cpus ?1 : mc->max_cpus; info->hotpluggable_cpus = mc->has_hotpluggable_cpus; + info->deprecated = !!mc->deprecation_reason; entry =g_malloc0 (sizeof (*entry)); entry->value = info;
Thanks,
Marcel
Any objections to this? I'm planning to merge it this week.
Quoted 20 lines · Eduardo Habkost
Changes v1 -> v2:
* I've decided to get rid of the status-message and suggested-alternative fields, to avoid more bikeshedding.This series adds machine type deprecation information to the output of the
query-machinesQMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machine types.Eduardo Habkost (1):
qmp: Add deprecation information to query-machinesqapi/misc.json | 7 ++++++- vl.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
Signature · 1 line
Eduardo
Quoted 1 line · Eduardo Habkost
Any objections to this? I'm planning to merge it this week.
IMHO, 1+. So I don't have objections.
- Wainer
Quoted 22 lines · Eduardo Habkost
Quoted 20 lines
Changes v1 -> v2:
* I've decided to get rid of the status-message and suggested-alternative fields, to avoid more bikeshedding.This series adds machine type deprecation information to the output of the
query-machinesQMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machine types.Eduardo Habkost (1):
qmp: Add deprecation information to query-machinesqapi/misc.json | 7 ++++++- vl.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
Markus Armbruster
Reviewed-byQuoted 1 line · Eduardo Habkost
Any objections to this? I'm planning to merge it this week.
No objection, in fact:
The QAPI feature flags work, once finished, might render this redundant, but I'd rather not have my unfinished solution for a wider problem block your working solution for a narrower problem.