Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
::
- domif-setlink domain interface-device state [--config]
+ domif-setlink domain interface-device state [--config] [--print-xml]
Modify link state of the domain's virtual interface. Possible values for
state are "up" and "down". If *--config* is specified, only the persistent
*--persistent* is alias of *--config*.
*interface-device* can be the interface's target name or the MAC address.
+If *--print-xml* is specified, then the XML used to update the interface is
+printed instead.
+
domifaddr
---------
.help = "config"
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
+ {.name = "print-xml",
+ .type = VSH_OT_BOOL,
+ .help = N_("print XML document rather than set the interface link state")
+ },
{.name = NULL}
};
return false;
}
+ if (vshCommandOptBool(cmd, "print-xml")) {
+ vshPrint(ctl, "%s", xml_buf);
+ return true;
+ }
+
if (virDomainUpdateDeviceFlags(dom, xml_buf, flags) < 0) {
vshError(ctl, _("Failed to update interface link state"));
return false;