Check if we get correct opennebula user id

This commit is contained in:
PCoder 2019-12-14 19:19:23 +05:30
parent b52f2de8d7
commit eda766dc6c

View file

@ -485,11 +485,17 @@ class OpenNebulaManager():
)
def change_user_password(self, passwd_hash):
self.oneadmin_client.call(
oca.User.METHODS['passwd'],
self.opennebula_user.id,
passwd_hash
)
if type(self.opennebula_user) == int:
logger.debug("opennebula_user is int and has value = %s" %
self.opennebula_user)
else:
logger.debug("opennebula_user is object and corresponding id is %s"
% self.opennebula_user.id)
# self.oneadmin_client.call(
# oca.User.METHODS['passwd'],
# self.opennebula_user if type(self.opennebula_user) == int else self.opennebula_user.id,
# passwd_hash
# )
def add_public_key(self, user, public_key='', merge=False):
"""