graphical displays, for a VM could have more than one graphical displays.
+domdisplay-reload
+-----------------
+
+**Syntax:**
+
+::
+
+ domdisplay-reload <domain> [[--type] <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 reloaded
+(so far only VNC).
+
+
domfsfreeze
-----------
return true;
}
+/**
+ * "domdisplay-reload" command
+ */
+static const vshCmdInfo info_domdisplay_reload[] = {
+ {.name = "help",
+ .data = N_("Reload domain's graphics display certificates")
+ },
+ {.name = "desc",
+ .data = N_("Reload domain's graphics display certificates")
+ },
+ {.name = NULL}
+};
+
+static const vshCmdOptDef opts_domdisplay_reload[] = {
+ VIRSH_COMMON_OPT_DOMAIN_FULL(0),
+ {.name = "type",
+ .type = VSH_OT_INT,
+ .help = N_("graphics display type")
+ },
+ {.name = NULL}
+};
+
+static bool
+cmdDomdisplayReload(vshControl *ctl, const vshCmd *cmd)
+{
+ g_autoptr(virshDomain) dom = NULL;
+ unsigned int type = 0;
+
+ if (!(dom = 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;
+}
const vshCmdDef domManagementCmds[] = {
{.name = "attach-device",
.info = info_dom_fd_associate,
.flags = 0
},
+ {.name = "domdisplay-reload",
+ .handler = cmdDomdisplayReload,
+ .opts = opts_domdisplay_reload,
+ .info = info_domdisplay_reload,
+ .flags = 0
+ },
{.name = NULL}
};