Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for na_elementsw_admin_users #52377

Merged
merged 6 commits into from
Mar 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions lib/ansible/modules/storage/netapp/na_elementsw_admin_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,22 @@ def get_admin_user(self):

def modify_admin_user(self):
"""
Modify a admin user. If a password is set the user will be modified as there is no way to compare a new password with an existing one
Modify a admin user. If a password is set the user will be modified as there is no way to
compare a new password with an existing one
:return: if a user was modified or not
"""
changed = False
admin_user = self.get_admin_user()
if not admin_user.access == self.access and self.access is not None:
changed = True
if self.element_password:
changed = True
if self.access is not None and len(self.access) > 0:
for access in self.access:
if access not in admin_user.access:
changed = True
if changed:
self.sfe.modify_cluster_admin(cluster_admin_id=admin_user.cluster_admin_id,
access=self.access,
password=self.element_password,
attributes=self.attributes)

return changed

def add_admin_user(self):
Expand Down