From: Jiri Denemark Date: Tue, 17 Dec 2019 13:31:10 +0000 (+0100) Subject: virsh migrate: Require --tls for --tls-destination X-Git-Tag: v6.0.0-rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=143b71a8ecb75251b5e8e0bf29c189c683a48d25;p=thirdparty%2Flibvirt.git virsh migrate: Require --tls for --tls-destination --tls-destination would be just ignored unless --tls is not specified, which is correct, but let's provide a bit of a guidance is a user forgets to add --tls. This is just a virsh-only check targeted to end users as we don't currently have such checks at the API level for migration parameters that depend on flags. https://bugzilla.redhat.com/show_bug.cgi?id=1784345 Signed-off-by: Jiri Denemark Acked-by: Peter Krempa --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 9315755990..358067dce4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10964,6 +10964,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd) VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy"); VSH_REQUIRE_OPTION("timeout-postcopy", "postcopy"); VSH_REQUIRE_OPTION("persistent-xml", "persistent"); + VSH_REQUIRE_OPTION("tls-destination", "tls"); if (!(dom = virshCommandOptDomain(ctl, cmd, NULL))) return false;