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 <jdenemar@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Jiri Denemark 2019-12-17 14:31:10 +01:00
parent e90a643c90
commit 143b71a8ec

View File

@ -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;