Skip to content

Commit ee60010

Browse files
authored
Merge pull request #168 from imran-ansari/plugin_v2
Fixed issue hpe-storage#58
2 parents 5c03f49 + f731737 commit ee60010

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

hpedockerplugin/hpe/hpe_3par_iscsi.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -445,32 +445,19 @@ def _create_host(self, common, volume, connector, is_snap):
445445
connector['initiator'],
446446
domain,
447447
persona_id)
448-
self._set_3par_chaps(common, hostname, volume, username, password)
449-
host = common._get_3par_host(hostname)
450448
else:
451449
if 'iSCSIPaths' not in host or len(host['iSCSIPaths']) < 1:
452450
self._modify_3par_iscsi_host(
453451
common, hostname,
454452
connector['initiator'])
455-
self._set_3par_chaps(
456-
common,
457-
hostname,
458-
volume,
459-
username,
460-
password)
461-
host = common._get_3par_host(hostname)
462453
elif (not host['initiatorChapEnabled'] and
463454
self.configuration.hpe3par_iscsi_chap_enabled):
464455
LOG.warning(_LW("Host exists without CHAP credentials set and "
465456
"has iSCSI attachments but CHAP is enabled. "
466457
"Updating host with new CHAP credentials."))
467-
self._set_3par_chaps(
468-
common,
469-
hostname,
470-
volume,
471-
username,
472-
password)
473458

459+
self._set_3par_chaps(common, hostname, volume, username, password)
460+
host = common._get_3par_host(hostname)
474461
return host, username, password
475462

476463
def _do_export(self, common, volume, connector, is_snap):

0 commit comments

Comments
 (0)