[libvirt] [PATCH] Add support for Vendor and Model in Storage Pool XML

Patrick Dignan pat_dignan at dell.com
Tue Aug 17 17:44:27 UTC 2010


  On 08/17/2010 12:06 PM, Daniel P. Berrange wrote:
> On Mon, Aug 09, 2010 at 02:32:55PM -0500, Patrick Dignan wrote:
>> Somehow the git-send-email patch didn't make it to the mailing list,
>> though my reply to it did...I've attached the patch here, hopefully this
>> one doesn't get flattened.
>>
>> I decided to allow vendor and product to be set independently of each
>> other in order to allow greater flexibility at the possible expense of
>> namespace clashes.
>>  From 3a2139c87a1d1c92a8bf947ecc5b431f0f67906c Mon Sep 17 00:00:00 2001
>> From: Patrick Dignan<pat_dignan at dell.com>
>> Date: Fri, 6 Aug 2010 11:08:03 -0500
>> Subject: [PATCH] Add support for vendor/product
>>
>> ---
>>   docs/schemas/storagepool.rng                       |   52 ++++++++++++++++++++
>>   src/conf/storage_conf.c                            |   14 +++++
>>   src/conf/storage_conf.h                            |    6 ++
>>   .../pool-iscsi-vendor-product.xml                  |   19 +++++++
>>   .../pool-iscsi-vendor-product.xml                  |   22 ++++++++
>>   tests/storagepoolxml2xmltest.c                     |    1 +
>>   6 files changed, 114 insertions(+), 0 deletions(-)
>>   create mode 100644 tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml
>>   create mode 100644 tests/storagepoolxml2xmlout/pool-iscsi-vendor-product.xml
>>
>> @@ -838,6 +843,15 @@ virStoragePoolSourceFormat(virBufferPtr buf,
>>           virBufferVSprintf(buf,"<auth type='chap' login='%s' passwd='%s'/>\n",
>>                             src->auth.chap.login,
>>                             src->auth.chap.passwd);
>> +
>> +    if (src->vendor != NULL) {
>> +        virBufferVSprintf(buf,"<vendor name='%s'/>\n", src->vendor);
>> +    }
>> +
>> +    if (src->product != NULL) {
>> +        virBufferVSprintf(buf,"<product name='%s'/>\n", src->product);
>> +    }
>> +
>>       virBufferAddLit(buf,"</source>\n");
> The only change is that these should use virBufferEscapeString
> since vendor/product strings might contain<,>  or&  characters
> which would make the XML unhappy
>
>
> Regards,
> Daniel

Ok, so I've updated that.  Hopefully all is well with this patch!

Best,

Patrick Dignan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libvirt-vendor-product.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100817/05df5363/attachment-0001.ksh>


More information about the libvir-list mailing list