我使用softLayer python API来更改用户名。
new_creds = {
'username': new_username,
'password': new_password
}
rc = client['User_Customer'].changeUsername(new_creds, id=user_id)
但是我得到以下异常: ...
File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 392, in call_handler
return self(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 360, in call
return self.client.call(self.name, name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 263, in call
return self.transport(request)
File "/usr/local/lib/python2.7/dist-packages/SoftLayer/transports.py", line 195, in __call__
raise _ex(ex.faultCode, ex.faultString)
SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(Client): Function ("changeUsername") is not a valid method for this service
是否不支持changeUsername
?
答案 0 :(得分:0)
目前不再支持 SoftLayer_User_Customer :: changeUsername 方法。将报告一个问题,以便从SLDN文档中删除它。