获取虚拟访客的标签时发生内部服务器错误

Internal Server Error when get the tags of the virtual guest

当我尝试获取客户帐户的虚拟客人的标签时,API 返回内部服务器错误。

使用 SoftLayer API 库的代码示例:

api = SoftLayer.Client(username=customer_id, api_key=customer_apikey)
api['Account'].getVirtualGuests(mask='fullyQualifiedDomainName,tagReferences.tag.name')

例外情况是:

File "scripts/getting_tags.py", line 16, in <module>
  for item in func(mask='fullyQualifiedDomainName,tagReferences.tag.name'):
File "/home/mfilipe/workspace/SoftLayerBilling/venv/lib/python2.7/site-packages/SoftLayer/API.py", line 362, in call_handler
  return self(name, *args, **kwargs)
File "/home/mfilipe/workspace/SoftLayerBilling/venv/lib/python2.7/site-packages/SoftLayer/API.py", line 330, in call
  return self.client.call(self.name, name, *args, **kwargs)
File "/home/mfilipe/workspace/SoftLayerBilling/venv/lib/python2.7/site-packages/SoftLayer/API.py", line 226, in call
  return self.transport(request)
File "/home/mfilipe/workspace/SoftLayerBilling/venv/lib/python2.7/site-packages/SoftLayer/transports.py", line 162, in __call__
  raise exceptions.TransportError(ex.response.status_code, str(ex))
SoftLayer.exceptions.TransportError: TransportError(500): 500 Server Error: Internal Server Error

几个月前,API 通话正常。当我对硬件 (api['Account'].getHardware) 执行相同的调用或从掩码中删除 tagReferences 时,它起作用了。

它看起来像一个错误,因为响应包含大量数据尝试在您的请求中添加限制:

api = SoftLayer.Client(username=customer_id, api_key=customer_apikey)
api['Account'].getVirtualGuests(mask='fullyQualifiedDomainName,tagReferences.tag.name',limit=10, offset=0)

有关限制的详细信息,请参阅:

http://softlayer-api-python-client.readthedocs.io/en/latest/api/client/

此致