|
|
@ -163,20 +163,22 @@ class NetAppElementSWAdminUser(object):
|
|
|
|
|
|
|
|
|
|
|
|
def modify_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
|
|
|
|
:return: if a user was modified or not
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
changed = False
|
|
|
|
changed = False
|
|
|
|
admin_user = self.get_admin_user()
|
|
|
|
admin_user = self.get_admin_user()
|
|
|
|
if not admin_user.access == self.access and self.access is not None:
|
|
|
|
if self.access is not None and len(self.access) > 0:
|
|
|
|
changed = True
|
|
|
|
for access in self.access:
|
|
|
|
if self.element_password:
|
|
|
|
if access not in admin_user.access:
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
|
if changed:
|
|
|
|
if changed:
|
|
|
|
self.sfe.modify_cluster_admin(cluster_admin_id=admin_user.cluster_admin_id,
|
|
|
|
self.sfe.modify_cluster_admin(cluster_admin_id=admin_user.cluster_admin_id,
|
|
|
|
access=self.access,
|
|
|
|
access=self.access,
|
|
|
|
password=self.element_password,
|
|
|
|
password=self.element_password,
|
|
|
|
attributes=self.attributes)
|
|
|
|
attributes=self.attributes)
|
|
|
|
|
|
|
|
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
|
|
|
|
|
|
|
|
def add_admin_user(self):
|
|
|
|
def add_admin_user(self):
|
|
|
|