Skip to content

Commit 0a8aea1

Browse files
Merge pull request #1965 from BrianSantivanez/issue1964
`slcli account billing-items --create` always return an empty table
2 parents d2c7ecb + 46f936c commit 0a8aea1

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

SoftLayer/managers/account.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,15 @@ def get_account_billing_items(self, create=None, category=None, mask=None):
222222
"cancellationDate": {
223223
"operation": "is null"
224224
},
225-
"createDate": utils.query_filter_orderby()
225+
"id": {
226+
"operation": "orderBy",
227+
"options": [
228+
{
229+
"name": "sort",
230+
"value": ["ASC"]
231+
}
232+
]
233+
}
226234
}
227235
}
228236

@@ -231,7 +239,7 @@ def get_account_billing_items(self, create=None, category=None, mask=None):
231239
{"allTopLevelBillingItems": {"categoryCode": {"operation": category}}})
232240
if create:
233241
object_filter = utils.dict_merge(object_filter,
234-
{"allTopLevelBillingItems": {"createDate": {"operation": create}}})
242+
{"allTopLevelBillingItems": {"createDate": {"operation": "*=" + create}}})
235243

236244
return self.client.call('Account', 'getAllTopLevelBillingItems',
237245
mask=mask, filter=object_filter, iter=True, limit=100)

tests/managers/account_tests.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,14 @@ def test_get_account_billing_items(self):
103103
"cancellationDate": {
104104
"operation": "is null"
105105
},
106-
"createDate": {
107-
'operation': 'orderBy',
108-
'options': [{
109-
'name': 'sort',
110-
'value': ['ASC']
111-
}]
106+
"id": {
107+
"operation": "orderBy",
108+
"options": [
109+
{
110+
"name": "sort",
111+
"value": ["ASC"]
112+
}
113+
]
112114
}
113115
}
114116
}

0 commit comments

Comments
 (0)