
This patch series is about creating iSCSI storage pool. After this patch, you can create an ISCSI storage pool as the following. curl -u root -H 'Content-type: application/json' \ -H 'Accept: application/json' \ -d '{"source": { "target": "iqn.2013-01.example.com.targetname", "host": "192.168.X.X", "port": 326X, "auth": {"username": "testUser", "password": "123456"}}, "type": "iscsi", "name": "testIscsiPool"}' \ http://127.0.0.1:8000/storagepools Note the "port" and "auth" is optional. Thanks the reviewers. I took most of reviewer advices and submit this v4 patch series. Tested the patch over LIO iSCSI target and libvirt-1.1.4-1.fc19. http://linux-iscsi.org/wiki/ISCSI v3 -> v4 storagepool: refactor _get_pool_xml() Change StoragePoolDef.get_xml() into a cached property StoragePoolDef.xml. storagepool: rename and consolidate arguments of creating (front end) No change. storagepool: rename and consolidate arguments of creating (back end) Update src/kimchi/API.json storagepool: Support Creating iSCSI storagepool in model.py Fix typo. Give the iscsiadm wrapper class a friendly name TargetClient. Update API.json. Update RPM spec files and Debian control file. iscsi.validate_iscsi_target() is now TargetClient.validate(). test_model: test creating iSCSI storage pool Since the parent patch changed interface, the tests also change to use StoragePoolDef.xml and TargetClient.validate(), no other change. Zhou Zheng Sheng (5): storagepool: refactor _get_pool_xml() storagepool: rename and consolidate arguments of creating (back end) storagepool: rename and consolidate arguments of creating (front end) storagepool: Support Creating iSCSI storagepool in model.py test_model: test creating iSCSI storage pool Makefile.am | 2 + contrib/DEBIAN/control.in | 3 +- contrib/kimchi.spec.fedora.in | 1 + contrib/kimchi.spec.suse.in | 1 + docs/API.md | 28 ++-- src/kimchi/API.json | 69 ++++++++++ src/kimchi/Makefile.am | 1 + src/kimchi/iscsi.py | 89 ++++++++++++ src/kimchi/model.py | 227 +++++++++++++++++++++++++------ tests/Makefile.am | 1 + tests/test_model.py | 89 ++++++------ tests/test_storagepool.py | 156 +++++++++++++++++++++ ui/js/src/kimchi.storagepool_add_main.js | 13 +- 13 files changed, 590 insertions(+), 90 deletions(-) create mode 100644 src/kimchi/iscsi.py create mode 100644 tests/test_storagepool.py -- 1.7.11.7