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