Skip to content

Commit 1bd74f8

Browse files
author
Brian Flores
committed
Fix response table title
1 parent 1220c26 commit 1bd74f8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

SoftLayer/CLI/autoscale/scale.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def cli(env, identifier, scale_up, scale_by, amount):
3737

3838
try:
3939
# Check if the first guest has a cancellation date, assume we are removing guests if it is.
40-
cancel_date = result[0]['virtualGuest']['billingItem']['cancellationDate'] or False
40+
status = result[0]['virtualGuest']['status']['keyName'] or False
4141
except (IndexError, KeyError, TypeError):
42-
cancel_date = False
42+
status = False
4343

44-
if cancel_date:
45-
member_table = formatting.Table(['Id', 'Hostname', 'Created'], title="Cancelled Guests")
46-
else:
44+
if status == 'ACTIVE':
4745
member_table = formatting.Table(['Id', 'Hostname', 'Created'], title="Added Guests")
46+
else:
47+
member_table = formatting.Table(['Id', 'Hostname', 'Created'], title="Cancelled Guests")
4848

4949
for guest in result:
5050
real_guest = guest.get('virtualGuest')

0 commit comments

Comments
 (0)