On Sat, Mar 25, 2017 at 08:18:46AM -0400, John Ferlan wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1398087 Clean up the virsh man page description for --pool-create-as in order to better describe how the various arguments are used when creating (or defining) a logical pool. Also move the --print-xml to the end of the qualifiers since it's not properly positionally situated for both --pool-create-as and --pool-define-as. Finally modify the storage pool XML parsing algorithm to check for the mismatched "name" and "source-name" as well as a more general if not provided, then set the default source format. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/conf/storage_conf.c | 11 +++++++++++ tools/virsh.pod | 15 +++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-)
@@ -757,6 +760,14 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) if (VIR_STRDUP(ret->source.name, ret->name) < 0) goto error; } + if (ret->type == VIR_STORAGE_POOL_LOGICAL && + STRNEQ(ret->name, ret->source.name)) { + virReportError(VIR_ERR_XML_ERROR, + _("for a logical pool, the pool name='%s' " + "must match the pool source name='%s'"), + ret->name, ret->source.name);
Why? Jan
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list