Skip to content

Commit 835d1ee

Browse files
caberoscaberos
authored andcommitted
fix the team code review comments
1 parent 9341bac commit 835d1ee

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

SoftLayer/CLI/licenses/create_options.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from SoftLayer.CLI import environment
77
from SoftLayer.CLI import formatting
8-
from SoftLayer.managers import licenses
8+
from SoftLayer.managers.licenses import LicensesManager
99
from SoftLayer import utils
1010

1111

@@ -14,15 +14,16 @@
1414
def cli(env):
1515
"""Server order options for a given chassis."""
1616

17-
licenses_manager = licenses.LicensesManager(env.client)
17+
licenses_manager = LicensesManager(env.client)
1818

1919
options = licenses_manager.get_create_options()
2020

21-
table = formatting.Table(['Id', 'description', 'keyName', 'recurringFee'])
21+
table = formatting.Table(['Id', 'description', 'keyName', 'capacity', 'recurringFee'])
2222
for item in options:
2323
table.add_row([item.get('id'),
2424
utils.trim_to(item.get('description'), 40),
2525
item.get('keyName'),
26+
item.get('capacity'),
2627
item.get('prices')[0]['recurringFee']])
2728

2829
env.fout(table)

SoftLayer/managers/licenses.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
:license: MIT, see LICENSE for more details.
66
"""
77

8-
98
# pylint: disable=too-many-public-methods
109

10+
LICENSE_PACKAGE_ID = 301
11+
1112

1213
class LicensesManager(object):
1314
"""Manages account lincese."""
@@ -18,8 +19,7 @@ def __init__(self, client):
1819
def get_create_options(self):
1920
"""Returns valid options for ordering Licenses.
2021
21-
:param string datacenter: short name, like dal09
2222
"""
2323

2424
return self.client.call('SoftLayer_Product_Package', 'getItems',
25-
id=301)
25+
id=LICENSE_PACKAGE_ID)

0 commit comments

Comments
 (0)