2016-11-28 62 views
0

我正在使用softLayer python API來更改用戶名。softlayer User_Customer函數changeUsername返回不支持

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

當前SoftLayer_User_Customer :: changeUsername方法不再受支持。將會報告一個問題,以便將其從SLDN文檔中刪除。