storage_pool: Rework chap XML to mimic ceph

The existing 'chap' XML logic was never used - just defined.  Rather than
try to insert a square peg into a round hole, blow it up and rewrite the
logic to follow the 'ceph' format.

Remove the former "chap.login" and "chap.passwd" fields and replace
with "chap.username" and "chap.secret" in _virStoragePoolAuthChap.
Adjust the virStoragePoolDefParseAuthChap() to process.

Change the rng file to describe the new layout

Update the formatstorage.html to describe the usage of the secret element
to mention that the secret type "iscsi" and "ceph" can be used
to storage pool too.

Update the formatsecret.html to include a reference to the storage pool

Update tests to handle the changes from 'login' and 'passwd' to 'username'
and '<secret>' format
This commit is contained in:
John Ferlan
2013-07-13 14:29:55 -04:00
parent 092ca9689a
commit eb0d79c64b
10 changed files with 87 additions and 46 deletions

View File

@@ -7,7 +7,9 @@
<source>
<host name='iscsi.example.com'/>
<device path='demo-target'/>
<auth type='chap' login='foobar' passwd='frobbar'/>
<auth type='chap' username='admin'>
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
</auth>
</source>
<target>
<path>/dev/disk/by-path</path>

View File

@@ -7,7 +7,9 @@
<source>
<host name='iscsi.example.com'/>
<device path='demo-target'/>
<auth type='chap' login='foobar' passwd='frobbar'/>
<auth type='chap' username='admin'>
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
</auth>
<vendor name='test-vendor'/>
<product name='test-product'/>
</source>

View File

@@ -8,7 +8,7 @@
<name>rbd</name>
<host name='localhost' port='6789'/>
<host name='localhost' port='6790'/>
<auth username='admin' type='ceph'>
<auth type='ceph' username='admin'>
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
</auth>
</source>