mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 11:01:09 +00:00
Workaround TSM issue with redfish configuration
This commit is contained in:
parent
2bc2736da4
commit
7cbd105ae3
@ -79,14 +79,14 @@ class NodeHandler(generic.NodeHandler):
|
||||
self.trieddefault = True
|
||||
if '555' in rsp:
|
||||
passchange = {
|
||||
'Password': self.targpass,
|
||||
'Password': self.targpass,
|
||||
'RetypePassword': self.targpass,
|
||||
'param': 4,
|
||||
'default_password': self.DEFAULT_PASS,
|
||||
'username': self.DEFAULT_USER
|
||||
}
|
||||
if authmode == 2:
|
||||
passchange = {
|
||||
rpasschange = {
|
||||
'Password': self.targpass,
|
||||
}
|
||||
rwc = webclient.SecureHTTPConnection(
|
||||
@ -98,12 +98,15 @@ class NodeHandler(generic.NodeHandler):
|
||||
rwc.set_header('Content-Type', 'application/json')
|
||||
rsp, status = rwc.grab_json_response_with_status(
|
||||
'/redfish/v1/AccountService/Accounts/1',
|
||||
passchange, method='PATCH')
|
||||
rpasschange, method='PATCH')
|
||||
if status >= 200 and status < 300:
|
||||
authdata['password'] = self.targpass
|
||||
eventlet.sleep(10)
|
||||
else:
|
||||
raise Exception("Redfish may not have been ready yet")
|
||||
if b'[web.lua] Error in RequestHandler, thread' in rsp:
|
||||
rsp, status = wc.grab_json_response_with_status('/api/reset-pass', passchange)
|
||||
else:
|
||||
raise Exception("Redfish may not have been ready yet" + repr(rsp))
|
||||
else:
|
||||
rsp, status = wc.grab_json_response_with_status('/api/reset-pass', urlencode(passchange))
|
||||
authdata['password'] = self.targpass
|
||||
@ -251,4 +254,4 @@ if __name__ == '__main__':
|
||||
info = {'addresses': [[sys.argv[1]]] }
|
||||
print(repr(info))
|
||||
testr = NodeHandler(info, c)
|
||||
testr.config(sys.argv[2])
|
||||
testr.config(sys.argv[2])
|
Loading…
Reference in New Issue
Block a user