libvirt/tests/storagepoolxml2xmlin
John Ferlan 5530f248db storage: Introduce 'managed' for the fchost parent
https://bugzilla.redhat.com/show_bug.cgi?id=1160926

Introduce a 'managed' attribute to allow libvirt to decide whether to
delete a vHBA vport created via external means such as nodedev-create.
The code currently decides whether to delete the vHBA based solely on
whether the parent was provided at creation time. However, that may not
be the desired action, so rather than delete and force someone to create
another vHBA via an additional nodedev-create allow the configuration of
the storage pool to decide the desired action.

During createVport when libvirt does the VPORT_CREATE, set the managed
value to YES if not already set to indicate to the deleteVport code that
it should delete the vHBA when the pool is destroyed.

If libvirtd is restarted all the memory only state was lost, so for a
persistent storage pool, use the virStoragePoolSaveConfig in order to
write out the managed value.

Because we're now saving the current configuration, we need to be sure
to not save the parent in the output XML if it was undefined at start.
Saving the name would cause future starts to always use the same parent
which is not the expected result when not providing a parent. By not
providing a parent, libvirt is expected to find the best available
vHBA port for each subsequent (re)start.

At deleteVport, use the new managed value to decide whether to execute
the VPORT_DELETE.  Since we no longer save the parent in memory or in
XML when provided, if it was not provided, then we have to look it up.
2014-11-12 10:18:28 -05:00
..
pool-dir-naming.xml storage: use valid XML for awkward volume names 2013-11-21 17:29:47 -07:00
pool-dir.xml Update xml schemas according to libvirt source 2012-08-02 14:36:23 -06:00
pool-disk.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-fs.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-gluster-sub.xml storage: document gluster pool 2013-11-25 11:03:19 -07:00
pool-gluster.xml storage: document gluster pool 2013-11-25 11:03:19 -07:00
pool-iscsi-auth.xml storage: allow interleave in pool XML 2013-10-16 10:15:44 -06:00
pool-iscsi-multiiqn.xml Add multiIQN tests 2010-06-08 13:14:26 -04:00
pool-iscsi-vendor-product.xml storage_pool: Rework chap XML to mimic ceph 2013-07-15 12:41:12 -04:00
pool-iscsi.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-logical-create.xml Make logical pools independent on target path 2013-07-16 12:16:37 +02:00
pool-logical-nopath.xml Make logical pools independent on target path 2013-07-16 12:16:37 +02:00
pool-logical.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-mpath.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-netfs-gluster-without-slash.xml schema: pool: netfs: Don't enforce slash in glusterfs pool source 2014-07-21 18:28:17 +02:00
pool-netfs-gluster.xml storage: fix RNG validation of gluster via netfs 2013-11-13 12:10:00 -07:00
pool-netfs.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-rbd.xml Storage: Fix the indention of rbd test file 2013-06-03 11:20:01 +08:00
pool-scsi-type-fc-host-managed.xml storage: Introduce 'managed' for the fchost parent 2014-11-12 10:18:28 -05:00
pool-scsi-type-fc-host.xml New XML attributes for storage pool source adapter 2013-04-08 18:41:06 +08:00
pool-scsi-type-scsi-host-stable.xml storage: Introduce parentaddr into virStoragePoolSourceAdapter 2014-07-21 12:55:10 -04:00
pool-scsi-type-scsi-host.xml New XML attributes for storage pool source adapter 2013-04-08 18:41:06 +08:00
pool-scsi.xml tests: Add XML 2 XML tests for storage pools. 2009-10-16 10:21:47 -04:00
pool-sheepdog.xml storage: allow interleave in pool XML 2013-10-16 10:15:44 -06:00
pool-zfs-sourcedev.xml storage: zfs: implement pool build and delete 2014-09-18 18:08:29 +04:00
pool-zfs.xml storage: zfs: implement pool build and delete 2014-09-18 18:08:29 +04:00