]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Obtain target authentication from database same as LIO target
authorMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Fri, 25 Sep 2015 22:09:59 +0000 (18:09 -0400)
committerMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Wed, 30 Sep 2015 22:48:22 +0000 (18:48 -0400)
commitf51f4d385296231052a54a8e0eecbe836f983dfb
treedc0ad55da2b2d2d15e492abe3f2c6098a06c9946
parent113fa9a005d866e1bff547bfdbb68c02340d0842
Obtain target authentication from database same as LIO target

Currently, tgt, iet and cxt obtain user and password for iSCSI
target by analyzing configuration file.
However this information is already stored in DB and LIO obtains
these authentication from provider_auth in DB.
This way is simple and robust instead of analyzing configuration
file directly.
This patch proposes these two changes:
- Change the way to obtain authentication from configuration
  file to DB at _get_target_chap_auth().
- Move _get_target_chap_auth() into iscsi.py and inherit
  the method at tgt, iet and cxt target because they can use
  same implementation to get authentication from DB.

Co-Authored-By: Anish Bhatt <anish@chelsio.com>
Change-Id: I5188ce5855d206c513f72e01f010175490ec89b2
Partial-Bug: #1499795
12 files changed:
cinder/tests/unit/targets/test_base_iscsi_driver.py
cinder/tests/unit/targets/test_cxt_driver.py
cinder/tests/unit/targets/test_iet_driver.py
cinder/tests/unit/targets/test_lio_driver.py
cinder/tests/unit/targets/test_tgt_driver.py
cinder/tests/unit/test_volume.py
cinder/volume/targets/cxt.py
cinder/volume/targets/fake.py
cinder/volume/targets/iet.py
cinder/volume/targets/iscsi.py
cinder/volume/targets/lio.py
cinder/volume/targets/tgt.py