Skip to content

Commit ee58588

Browse files
author
Fernando Ojeda
committed
fixed vs create flavor test
1 parent 7be0cac commit ee58588

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

SoftLayer/CLI/virt/create.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,11 @@ def cli(env, **args):
282282
if str(result['presetId']) is not "":
283283
ordering_mgr = SoftLayer.OrderingManager(env.client)
284284
preset_prices = ordering_mgr.get_preset_prices(result['presetId'])
285-
rate, total_preset_hourly, total_preset_monthly = get_total_recurring_fee(args, preset_prices, table,
286-
total_preset_hourly,
287-
total_preset_monthly)
285+
total_preset_hourly, total_preset_monthly = get_total_recurring_fee(args, preset_prices, table,
286+
total_preset_hourly,
287+
total_preset_monthly)
288288

289-
rate, total_hourly, total_monthly = get_total_recurring_fee(args, result, table, total_hourly, total_monthly)
289+
total_hourly, total_monthly = get_total_recurring_fee(args, result, table, total_hourly, total_monthly)
290290

291291
total = 0
292292
if args.get('billing') == 'hourly':
@@ -336,6 +336,7 @@ def cli(env, **args):
336336

337337

338338
def get_total_recurring_fee(args, result, table, total_hourly, total_monthly):
339+
"""Retrieve the total recurring fee of the items prices"""
339340
for price in result['prices']:
340341
total_monthly += float(price.get('recurringFee', 0.0))
341342
total_hourly += float(price.get('hourlyRecurringFee', 0.0))
@@ -345,7 +346,7 @@ def get_total_recurring_fee(args, result, table, total_hourly, total_monthly):
345346
rate = "%.2f" % float(price['recurringFee'])
346347

347348
table.add_row([price['item']['description'], rate])
348-
return rate, total_hourly, total_monthly
349+
return total_hourly, total_monthly
349350

350351

351352
def _validate_args(env, args):

0 commit comments

Comments
 (0)