[libvirt] [PATCH] storage pool discovery
David Lively
dlively at virtualiron.com
Fri Aug 22 15:11:37 UTC 2008
Here's the patch with those issues addressed (also merged with latest
upstream - avoids internal.h merge conflict) ...
Dave
On Fri, 2008-08-22 at 09:50 +0100, Daniel P. Berrange wrote:
> On Thu, Aug 21, 2008 at 10:29:43AM -0400, David Lively wrote:
> > Hi Folks -
> > Here's my second pass at storage pool discovery. I've taken Daniel's
> > suggestion and made it return a single XML doc containing <source>
> > elements rather than an array of <pool> docs (and also incorporated
> > suggestions from Daniel V and Jim M).
> > Note that the storage <source> <name> patch is closely related
> > (without it, the <source> docs returned for logical pools aren't
> > correct).
>
> Excellant, I think this patch looks more or less good to commit now.
>
> > +static char *
> > +virStorageBackendFileSystemNetDiscoverPools(virConnectPtr conn,
> > + const char *srcSpec,
> > + unsigned int flags ATTRIBUTE_UNUSED)
>
> ...
>
> > + const char *prog[] = { SHOWMOUNT, "--no-headers", "--exports", NULL, NULL };
> > + const char *start_tag = "<SourceList>\n";
> > + const char *end_tag = "</SourceList>\n";
>
> I'd prefer that to be <sources> - we avoid capitals in the
> XML element names everywhere else, and in the few cases of
> joining words use an underscore, but I think plural form is
> OK for this.
>
> > +static char *
> > +virStorageBackendLogicalDiscoverPools(virConnectPtr conn,
> > + const char *srcSpec ATTRIBUTE_UNUSED,
> > + unsigned int flags ATTRIBUTE_UNUSED)
>
>
> > + const char *prog[] = { VGS, "--noheadings", "-o", "vg_name", NULL };
> > + const char *start_tag = "<SourceList>\n";
> > + const char *end_tag = "</SourceList>\n";
>
> We should #define these two tags in storage_backend.h so each driver doesn't
> need to dup them
>
>
> Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: storage-discovery.patch
Type: text/x-patch
Size: 33328 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080822/4a21c141/attachment-0001.bin>
More information about the libvir-list
mailing list