Bug Fix to na_ontap_iscsi (#53871)

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* fix bug

* fix bug

* Revert "Revert "documentation changes""

This reverts commit 97de518686.
This commit is contained in:
Chris Archibald 2019-03-19 07:48:23 -07:00 committed by John R Barker
parent 3ff20436b6
commit 809de4e033

View file

@ -1,6 +1,6 @@
#!/usr/bin/python
# (c) 2017, NetApp, Inc
# (c) 2017-2019, NetApp, Inc
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -249,10 +249,10 @@ class NetAppOntapISCSI(object):
else:
if self.state == 'present':
if not iscsi_service_exists:
self.create_iscsi_service()
elif self.service_state == 'started':
self.create_iscsi_service() # the service is stopped when initially created
if self.service_state == 'started':
self.start_iscsi_service()
else:
if iscsi_service_exists and self.service_state == 'stopped':
self.stop_iscsi_service()
elif self.state == 'absent':