[libvirt] [PATCH] storage: Better describe logical pool creation/definition parameters

Ján Tomko jtomko at redhat.com
Tue Mar 28 07:13:44 UTC 2017


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 at redhat.com>
>---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170328/3e8571a6/attachment-0001.sig>


More information about the libvir-list mailing list