Skip to content

Commit 762ea75

Browse files
Merge pull request #1526 from caberos/issue1525
slcli server create-options dal13 Error
2 parents 30a7eda + 2efe374 commit 762ea75

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

SoftLayer/CLI/hardware/create_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def cli(env, prices, location=None):
2121
hardware_manager = hardware.HardwareManager(env.client)
2222
account_manager = account.AccountManager(env.client)
2323
options = hardware_manager.get_create_options(location)
24-
routers = account_manager.get_routers(location)
24+
routers = account_manager.get_routers(location=location)
2525
tables = []
2626

2727
# Datacenters

SoftLayer/managers/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ 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, location=None):
280+
def get_routers(self, location=None, mask=None):
281281
"""Gets all the routers currently active on the account
282282
283283
:param string mask: Object Mask

tests/managers/account_tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,8 @@ def test_get_active_account_licenses(self):
161161
def test_get_active_virtual_licenses(self):
162162
self.manager.get_active_virtual_licenses()
163163
self.assert_called_with("SoftLayer_Account", "getActiveVirtualLicenses")
164+
165+
def test_get_routers_with_datacenter(self):
166+
self.manager.get_routers(location='dal13')
167+
object_filter = {'routers': {'topLevelLocation': {'name': {'operation': 'dal13'}}}}
168+
self.assert_called_with("SoftLayer_Account", "getRouters", filter=object_filter)

0 commit comments

Comments
 (0)