Reputation: 8836
I have the following python script:
import SoftLayer
client = SoftLayer.create_client_from_env(username="XXXXXXX", api_key="XXXXXXXXXXXXXXXXXXXXXXXX")
resp = client.call('SoftLayer_Network_Storage_Hub_Cleversafe_Account', 'getAllObjects', filter={'id': 56398353})
print response
But this always gives me a blank array.
Without the filter I get proper response:
[{'username': 'XXXXXXX-10', 'id': 56398353, 'accountId': XXXXX}, {'username': 'XXXXXXXXX-11', 'id': 69259064, 'accountId': XXXXXX}]
But the id is there in the response. Why these filters are not working? Any clue please?
I also tried:
resp = client.call('SoftLayer_Network_Storage_Hub_Cleversafe_Account', 'getAllObjects', filter={'credentials': {'username':'XXXXXXXXXXXXX'}})
Upvotes: 0
Views: 25
Reputation: 728
Try using the following object filter structure:
object_Filter = {"id":{"operation":11111}}
resp = client.call('SoftLayer_Network_Storage_Hub_Cleversafe_Account', 'getAllObjects', filter=object_Filter)
Upvotes: 1