Skip to content

Commit 78400f1

Browse files
author
caberos
committed
fix tox tool
1 parent e4c72b8 commit 78400f1

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

SoftLayer/CLI/hardware/create_options.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,9 @@ def cli(env, prices, location=None):
2222
account_manager = account.AccountManager(env.client)
2323
options = hardware_manager.get_create_options(location)
2424

25-
_filter = ''
26-
if location:
27-
_filter = {
28-
'routers': {
29-
'topLevelLocation': {'name': {'operation': location}}
30-
}
31-
}
32-
33-
routers = account_manager.get_routers(_filter)
25+
26+
27+
routers = account_manager.get_routers(location)
3428
tables = []
3529

3630
# Datacenters

SoftLayer/managers/account.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,19 @@ def get_account_all_billing_orders(self, limit=100, mask=None):
277277
return self.client.call('Billing_Order', 'getAllObjects',
278278
limit=limit, mask=mask)
279279

280-
def get_routers(self, mask=None, _filter=None):
280+
def get_routers(self, mask=None, location=None):
281281
"""Gets all the routers currently active on the account
282282
283283
:param string mask: Object Mask
284-
:param string _filter: Object filter
284+
:param string location: location string
285285
:returns: Routers
286286
"""
287+
object_filter = ''
288+
if location:
289+
object_filter = {
290+
'routers': {
291+
'topLevelLocation': {'name': {'operation': location}}
292+
}
293+
}
287294

288-
return self.client['SoftLayer_Account'].getRouters(filter=_filter, mask=mask)
295+
return self.client['SoftLayer_Account'].getRouters(filter=object_filter, mask=mask)

0 commit comments

Comments
 (0)