Skip to content

Commit 742bc6a

Browse files
Merge pull request #1859 from BrianSantivanez/issue1857
Fix email commands
2 parents 281e038 + 2d227d6 commit 742bc6a

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

SoftLayer/CLI/email/detail.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import click
55

66
from SoftLayer.CLI.command import SLCommand as SLCommand
7-
from SoftLayer.CLI.email.list import build_statistics_table
7+
# Commented this line until we fix EmailManager.GetStatistics() method in golang plugin
8+
# from SoftLayer.CLI.email.list import build_statistics_table
89
from SoftLayer.CLI import environment
910
from SoftLayer.CLI import formatting
1011
from SoftLayer.managers.email import EmailManager
@@ -33,10 +34,9 @@ def cli(env, identifier):
3334
table.add_row(['type_description', utils.lookup(result, 'type', 'description')])
3435
table.add_row(['type', utils.lookup(result, 'type', 'keyName')])
3536
table.add_row(['vendor', utils.lookup(result, 'vendor', 'keyName')])
36-
37-
statistics = email_manager.get_statistics(identifier)
38-
39-
for statistic in statistics:
40-
table.add_row(['statistics', build_statistics_table(statistic)])
41-
37+
# Commented these lines until we fix EmailManager.GetStatistics() method in golang plugin
38+
# statistics = email_manager.get_statistics(identifier)
39+
#
40+
# for statistic in statistics:
41+
# table.add_row(['statistics', build_statistics_table(statistic)])
4242
env.fout(table)

SoftLayer/CLI/email/list.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,28 @@ def cli(env):
3232
utils.lookup(email, 'vendor', 'keyName')])
3333

3434
overview_table = _build_overview_table(email_manager.get_account_overview(email.get('id')))
35-
statistics = email_manager.get_statistics(email.get('id'))
35+
# Commented this line until we fix EmailManager.GetStatistics() method in golang plugin
36+
# statistics = email_manager.get_statistics(email.get('id'))
3637

3738
table.add_row(['email_information', table_information])
3839
table.add_row(['email_overview', overview_table])
39-
for statistic in statistics:
40-
table.add_row(['statistics', build_statistics_table(statistic)])
40+
# Commented these lines until we fix EmailManager.GetStatistics() method in golang plugin
41+
# for statistic in statistics:
42+
# table.add_row(['statistics', build_statistics_table(statistic)])
4143

4244
env.fout(table)
4345

4446

4547
def _build_overview_table(email_overview):
4648
table = formatting.Table(
47-
['credit_allowed', 'credits_remain', 'credits_overage', 'credits_used',
48-
'package', 'reputation', 'requests'])
49+
['package', 'reputation'])
4950
table.align['name'] = 'r'
5051
table.align['value'] = 'l'
5152

52-
table.add_row([email_overview.get('creditsAllowed'), email_overview.get('creditsRemain'),
53-
email_overview.get('creditsOverage'), email_overview.get('creditsUsed'),
54-
email_overview.get('package'), email_overview.get('reputation'),
55-
email_overview.get('requests')])
53+
table.add_row([
54+
utils.lookup(email_overview, 'profile', 'package'),
55+
utils.lookup(email_overview, 'profile', 'reputation')
56+
])
5657

5758
return table
5859

0 commit comments

Comments
 (0)