-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Labels
Description
$ slcli -v block replica-order 8666387 -s WEEKLY -l dal13
Calling: SoftLayer_Network_Storage::getObject(id=8666387, mask='billingItem[activeChildren,hourlyFlag],storageTierLevel,osType,staasVersion,hasEncryptionAtRest,snapshotCapacityGb,schedules,intervalSchedule,hourlySchedule,dailySchedule,weeklySchedule,storageType[keyName],provisionedIops', filter='None', args=(), limit=None, offset=None))
This volume is set for cancellation; unable to order replicant volume
Error is because of this line: https://github.com/softlayer/softlayer-python/blob/master/SoftLayer/managers/storage_utils.py#L663
In rest, the billingItem looks like this:
'billingItem': {'activeChildren': [{'allowCancellationFlag': 1,
'associatedBillingItemId': '81484325',
'cancellationDate': None,
'categoryCode': 'storage_block',
'createDate': '2016-01-21T12:10:07-06:00',
'cycleStartDate': '2020-01-04T00:09:20-06:00',
'description': 'Block Storage',
'id': 81484327,
'laborFee': '0',
'laborFeeTaxRate': '0',
'lastBillDate': '2020-01-04T00:09:20-06:00',
'modifyDate': '2020-01-04T00:09:20-06:00',
'nextBillDate': '2020-02-04T00:00:00-06:00',
'oneTimeFee': '0',
'oneTimeFeeTaxRate': '0',
'orderItemId': 105294129,
'parentId': 81484325,
'recurringFee': '0',
'recurringFeeTaxRate': '0',
'recurringMonths': 1,
'serviceProviderId': 1,
'setupFee': '0',
'setupFeeTaxRate': '0'},
],
'allowCancellationFlag': 1,
'cancellationDate': None,
'categoryCode': 'storage_service_enterprise',
'createDate': '2016-01-21T12:10:07-06:00',
'cycleStartDate': '2020-01-04T00:09:20-06:00',
'description': 'Endurance Storage',
'hourlyFlag': False,
'id': 81484325,
'laborFee': '0',
'laborFeeTaxRate': '0',
'lastBillDate': '2020-01-04T00:09:20-06:00',
'modifyDate': '2020-01-04T00:09:20-06:00',
'nextBillDate': '2020-02-04T00:00:00-06:00',
'oneTimeFee': '0',
'oneTimeFeeTaxRate': '0',
'orderItemId': 105294127,
'parentId': None,
'recurringFee': '0',
'recurringFeeTaxRate': '0',
'recurringMonths': 1,
'serviceProviderId': 1,
'setupFee': '0',
'setupFeeTaxRate': '0'},
Also TODO, look over storage_utils to see if there are any other instances of checking against literal '' string.
if volume['billingItem']['cancellationDate'] != '' should be if not volume['billingItem']['cancellationDate']. In python '' and None both equal False.