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