all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: Stefan Reiter <s.reiter@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server 1/3] machine: split out helper for handling query-machines qmp command result
Date: Mon, 8 Mar 2021 13:57:13 +0100	[thread overview]
Message-ID: <7dfcd614-289c-1364-3571-895cd640cffb@proxmox.com> (raw)
In-Reply-To: <6d7ed73f-3c13-ccf0-2f52-01db26457eec@proxmox.com>

On 04.03.21 13:51, Stefan Reiter wrote:
> LGTM, for both qemu-server patches:
> 
> Reviewed-by: Stefan Reiter <s.reiter@proxmox.com>
> 
> Not sure about the formatting in the GUI, but I'm also the wrong person 
> to ask there. Maybe don't capitalize "Qemu", as we also don't do that 
> for "running"/"stopped"/... either?
> 

Thanks for the review! I agree that the "Qemu" looks a bit out of place, 
and even with lower-case "qemu" it doesn't feel completely right to me 
now (using "QEMU" feels slightly better). I'll send a v2 with the 
version as a separate field, hopefully that's better.

> On 01/03/2021 16:53, Fabian Ebner wrote:
>> to be re-used in the vmstatus() call.
>>
>> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
>> ---
>>   PVE/QemuServer/Machine.pm | 16 +++++++++++-----
>>   1 file changed, 11 insertions(+), 5 deletions(-)
>>
>> diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm
>> index c168ade..2474951 100644
>> --- a/PVE/QemuServer/Machine.pm
>> +++ b/PVE/QemuServer/Machine.pm
>> @@ -18,11 +18,8 @@ sub machine_type_is_q35 {
>>       return $conf->{machine} && ($conf->{machine} =~ m/q35/) ? 1 : 0;
>>   }
>> -# this only works if VM is running
>> -sub get_current_qemu_machine {
>> -    my ($vmid) = @_;
>> -
>> -    my $res = PVE::QemuServer::Monitor::mon_cmd($vmid, 
>> 'query-machines');
>> +sub current_from_query_machines {
>> +    my ($res) = @_;
>>       my ($current, $pve_version, $default);
>>       foreach my $e (@$res) {
>> @@ -37,6 +34,15 @@ sub get_current_qemu_machine {
>>       return $current || $default || 'pc';
>>   }
>> +# this only works if VM is running
>> +sub get_current_qemu_machine {
>> +    my ($vmid) = @_;
>> +
>> +    my $res = PVE::QemuServer::Monitor::mon_cmd($vmid, 
>> 'query-machines');
>> +
>> +    return current_from_query_machines($res);
>> +}
>> +
>>   # returns a string with major.minor+pve<VERSION>, patch version-part 
>> is ignored
>>   # as it's seldom ressembling a real QEMU machine type, so it would 
>> be '0' 99% of
>>   # the time anyway.. This explicitly separates pveversion from the 
>> machine.
>>




  reply	other threads:[~2021-03-08 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 15:53 Fabian Ebner
2021-03-01 15:53 ` [pve-devel] [PATCH qemu-server 2/3] fix #3301: status: add currently running machine and QEMU version to full status Fabian Ebner
2021-03-04 12:58   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-01 15:53 ` [pve-devel] [PATCH manager 3/3] fix #3301: ui: show currently running QEMU version Fabian Ebner
2021-03-04 12:51 ` [pve-devel] [PATCH qemu-server 1/3] machine: split out helper for handling query-machines qmp command result Stefan Reiter
2021-03-08 12:57   ` Fabian Ebner [this message]
2021-03-04 12:58 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dfcd614-289c-1364-3571-895cd640cffb@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.reiter@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal