Skip to content

Commit

Permalink
Merge pull request #1526 from caberos/issue1525
Browse files Browse the repository at this point in the history
slcli server create-options dal13 Error
  • Loading branch information
allmightyspiff authored Aug 4, 2021
2 parents 30a7eda + 2efe374 commit 762ea75
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SoftLayer/CLI/hardware/create_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def cli(env, prices, location=None):
hardware_manager = hardware.HardwareManager(env.client)
account_manager = account.AccountManager(env.client)
options = hardware_manager.get_create_options(location)
routers = account_manager.get_routers(location)
routers = account_manager.get_routers(location=location)
tables = []

# Datacenters
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/managers/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def get_account_all_billing_orders(self, limit=100, mask=None):
return self.client.call('Billing_Order', 'getAllObjects',
limit=limit, mask=mask)

def get_routers(self, mask=None, location=None):
def get_routers(self, location=None, mask=None):
"""Gets all the routers currently active on the account
:param string mask: Object Mask
Expand Down
5 changes: 5 additions & 0 deletions tests/managers/account_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,8 @@ def test_get_active_account_licenses(self):
def test_get_active_virtual_licenses(self):
self.manager.get_active_virtual_licenses()
self.assert_called_with("SoftLayer_Account", "getActiveVirtualLicenses")

def test_get_routers_with_datacenter(self):
self.manager.get_routers(location='dal13')
object_filter = {'routers': {'topLevelLocation': {'name': {'operation': 'dal13'}}}}
self.assert_called_with("SoftLayer_Account", "getRouters", filter=object_filter)

0 comments on commit 762ea75

Please sign in to comment.