From nobody Sun Feb 8 15:30:56 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1709221253093689.3626025862573; Thu, 29 Feb 2024 07:40:53 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 91C571DE4; Thu, 29 Feb 2024 10:40:51 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E1D171E5D; Thu, 29 Feb 2024 10:28:51 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 08493188C; Thu, 29 Feb 2024 10:27:56 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 257C51877 for ; Thu, 29 Feb 2024 10:27:55 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-6c2M-MG8NnyCZdtiMwbhUw-1; Thu, 29 Feb 2024 10:27:52 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A25BA868A02 for ; Thu, 29 Feb 2024 15:27:52 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 212FB2166B5E for ; Thu, 29 Feb 2024 15:27:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: 6c2M-MG8NnyCZdtiMwbhUw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: devel@lists.libvirt.org Subject: [libvirt PATCH 5/5] virsh: Introduce domdisplay-reload command Date: Thu, 29 Feb 2024 16:24:00 +0100 Message-ID: <1b166a8d8513a5d932f4380f5c9d57279a855aee.1709220240.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: DO3AXDFT4HVSOEW2K2PHMJ4WYLJDHX5A X-Message-ID-Hash: DO3AXDFT4HVSOEW2K2PHMJ4WYLJDHX5A X-MailFrom: jtomko@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1709221254420100001 From: Zheng Yan Introduce the domdisplay-reload command to make the domain reload its graphics certificates #virsh domdisplay-reload --type Signed-off-by: Zheng Yan Signed-off-by: J=C3=A1n Tomko --- docs/manpages/virsh.rst | 15 ++++++++++++++ tools/virsh-domain.c | 45 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 8224aec8c3..115b802c45 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -1783,6 +1783,21 @@ included in the URI. If *--all* is specified, then a= ll show all possible graphical displays, for a VM could have more than one graphical displays. =20 =20 +domdisplay-reload +----------------- + +**Syntax:** + +:: + + domdisplay-reload [[--type] ] + +Reload the domain's graphical display. This reloads its TLS certificates +without restarting the domain. ``type`` can be any constant from the +`virDomainGraphicsReloadType` enum. By default any supported type is reloa= ded +(so far only VNC). + + domfsfreeze ----------- =20 diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e69d14a6aa..d3e28f38f4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13801,6 +13801,45 @@ cmdDomDirtyRateCalc(vshControl *ctl, const vshCmd = *cmd) return true; } =20 +/** + * "domdisplay-reload" command + */ +static const vshCmdInfo info_domdisplay_reload[] =3D { + {.name =3D "help", + .data =3D N_("Reload domain's graphics display certificates") + }, + {.name =3D "desc", + .data =3D N_("Reload domain's graphics display certificates") + }, + {.name =3D NULL} +}; + +static const vshCmdOptDef opts_domdisplay_reload[] =3D { + VIRSH_COMMON_OPT_DOMAIN_FULL(0), + {.name =3D "type", + .type =3D VSH_OT_INT, + .help =3D N_("graphics display type") + }, + {.name =3D NULL} +}; + +static bool +cmdDomdisplayReload(vshControl *ctl, const vshCmd *cmd) +{ + g_autoptr(virshDomain) dom =3D NULL; + unsigned int type =3D 0; + + if (!(dom =3D virshCommandOptDomain(ctl, cmd, NULL))) + return false; + + if (vshCommandOptUInt(ctl, cmd, "type", &type) < 0) + return false; + + if (virDomainGraphicsReload(dom, type, 0) < 0) + return false; + + return true; +} =20 const vshCmdDef domManagementCmds[] =3D { {.name =3D "attach-device", @@ -14465,5 +14504,11 @@ const vshCmdDef domManagementCmds[] =3D { .info =3D info_dom_fd_associate, .flags =3D 0 }, + {.name =3D "domdisplay-reload", + .handler =3D cmdDomdisplayReload, + .opts =3D opts_domdisplay_reload, + .info =3D info_domdisplay_reload, + .flags =3D 0 + }, {.name =3D NULL} }; --=20 2.43.2 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org