]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
New XML attributes for storage pool source adapter
authorOsier Yang <jyang@redhat.com>
Mon, 25 Mar 2013 16:43:36 +0000 (00:43 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 8 Apr 2013 10:41:06 +0000 (18:41 +0800)
commit9f781da69de02745acb719e78982df9aeccfcd7b
tree0a3c569b092533783dcd7a3e516652ddb7db1056
parent2d77704509d42143ffd8fd676422c8c34d48f3db
New XML attributes for storage pool source adapter

This introduces 4 new attributes for storage pool source adapter.
E.g.

<adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/>

Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults
to 'scsi_host' if attribute 'name' is specified. I.e. It's optional
for 'scsi_host' adapter, for back-compat reason. However, mandatory
for 'fc_host' adapter and any new future adapter types. Attribute
'parent' is to specify the parent for the fc_host adapter.

* docs/formatstorage.html.in:
  - Add documents for the 4 new attrs
* docs/schemas/storagepool.rng:
  - Add RNG schema
* src/conf/storage_conf.c:
  - Parse and format the new XMLs
* src/conf/storage_conf.h:
  - New struct virStoragePoolSourceAdapter, replace "char *adapter" with it;
  - New enum virStoragePoolSourceAdapterType
* src/libvirt_private.syms:
  - Export TypeToString and TypeFromString
* src/phyp/phyp_driver.c:
  - Replace "adapter" with "adapter.data.name", which is member of the union
    of the new struct virStoragePoolSourceAdapter now. Later patch will
    add the checking, as "adapter.data.name" is only valid for "scsi_host"
    adapter.
* src/storage/storage_backend_scsi.c:
  - Like above
* tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host.xml:
* tests/storagepoolxml2xmlin/pool-scsi-type-fc-host.xml:
  - New test for 'fc_host' and "scsi_host" adapter
* tests/storagepoolxml2xmlout/pool-scsi.xml:
  - Change the expected output, as the 'type' defaults to 'scsi_host' if 'name"
    specified now
* tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host.xml:
* tests/storagepoolxml2xmlout/pool-scsi-type-fc-host.xml:
  - New test
* tests/storagepoolxml2xmltest.c:
  - Include the test
13 files changed:
docs/formatstorage.html.in
docs/schemas/storagepool.rng
src/conf/storage_conf.c
src/conf/storage_conf.h
src/libvirt_private.syms
src/phyp/phyp_driver.c
src/storage/storage_backend_scsi.c
tests/storagepoolxml2xmlin/pool-scsi-type-fc-host.xml [new file with mode: 0644]
tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host.xml [new file with mode: 0644]
tests/storagepoolxml2xmlout/pool-scsi-type-fc-host.xml [new file with mode: 0644]
tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host.xml [new file with mode: 0644]
tests/storagepoolxml2xmlout/pool-scsi.xml
tests/storagepoolxml2xmltest.c