softlayer-python
softlayer-python copied to clipboard
block volume-list errors
This block volume is being canceled, so that might be why its having trouble being displayed....
$ slcli -vvv block volume-detail 167214314
Calling: SoftLayer_Network_Storage::getObject(id=167214314, mask='id,username,password,capacityGb,snapshotCapacityGb,parentVolume.snapshotSizeBytes,storageType.keyName,serviceResource.datacenter[name],serviceResourceBackendIpAddress,storageTierLevel,provisionedIops,lunId,originalVolumeName,originalSnapshotName,originalVolumeSize,activeTransactionCount,activeTransactions.transactionStatus[friendlyName],replicationPartnerCount,replicationStatus,replicationPartners[id,username,serviceResourceBackendIpAddress,serviceResource[datacenter[name]],replicationSchedule[type[keyname]]],notes', filter='None', args=(), limit=None, offset=None))
Starting new HTTPS connection (1): api.softlayer.com:443
https://api.softlayer.com:443 "GET /rest/v3.1/SoftLayer_Network_Storage/167214314/getObject.json?objectMask=mask%5Bid%2Cusername%2Cpassword%2CcapacityGb%2CsnapshotCapacityGb%2CparentVolume.snapshotSizeBytes%2CstorageType.keyName%2CserviceResource.datacenter%5Bname%5D%2CserviceResourceBackendIpAddress%2CstorageTierLevel%2CprovisionedIops%2ClunId%2CoriginalVolumeName%2CoriginalSnapshotName%2CoriginalVolumeSize%2CactiveTransactionCount%2CactiveTransactions.transactionStatus%5BfriendlyName%5D%2CreplicationPartnerCount%2CreplicationStatus%2CreplicationPartners%5Bid%2Cusername%2CserviceResourceBackendIpAddress%2CserviceResource%5Bdatacenter%5Bname%5D%5D%2CreplicationSchedule%5Btype%5Bkeyname%5D%5D%5D%2Cnotes%5D HTTP/1.1" 200 1559
Returned Data:
{'capacityGb': 16000, 'id': 167214314, 'notes': 'test', 'username': 'SL02SEL307608-60', 'activeTransactionCount': 0, 'replicationPartnerCount': 1, 'lunId': '1', 'parentVolume': {'accountId': 307608, 'capacityGb': 16000, 'createDate': '2020-09-02T14:55:32-06:00', 'guestId': None, 'hardwareId': None, 'hostId': None, 'id': 167214302, 'nasType': 'NAS_CONTAINER', 'serviceProviderId': 1, 'storageTypeId': '3', 'upgradableFlag': True, 'username': 'SL02SEVC307608_60', 'serviceResourceBackendIpAddress': 'fsf-mex0101b-fz.service.softlayer.com', 'serviceResourceName': 'Storage Type 02 Aggregate stxf-mex0101b', 'snapshotSizeBytes': '831488'}, 'provisionedIops': '4096', 'replicationPartners': [{'id': 167236648, 'username': 'SL02SEL307608_60_REP_1', 'replicationSchedule': {'active': 1, 'createDate': '2020-09-02T17:10:04-06:00', 'id': 542062, 'modifyDate': None, 'name': 'SL02SEVC307608_60_WEEKLY', 'partnershipId': None, 'typeId': 34, 'volumeId': 167214302, 'type': {'keyname': 'REPLICATION_WEEKLY'}}, 'serviceResource': {'backendIpAddress': 'fsf-sao0102c-fz.service.softlayer.com', 'id': 30650, 'name': 'Storage Type 02 Aggregate stxf-sao0102c', 'datacenter': {'name': 'sao01'}, 'type': {'type': 'NETAPP_STOR_AGGR'}}, 'serviceResourceBackendIpAddress': '10.200.14.72'}], 'replicationStatus': 'FAILBACK_COMPLETED', 'serviceResource': {'backendIpAddress': 'fsf-mex0101b-fz.service.softlayer.com', 'id': 9291, 'name': 'Storage Type 02 Aggregate stxf-mex0101b', 'datacenter': {'name': 'mex01'}}, 'serviceResourceBackendIpAddress': '10.2.190.99', 'snapshotCapacityGb': '1000', 'storageTierLevel': 'LOW_INTENSITY_TIER', 'storageType': {'keyName': 'ENDURANCE_BLOCK_STORAGE'}}
An unexpected error has occured:
Traceback (most recent call last):
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\core.py", line 182, in main
cli.main(**kwargs)
File "C:\Users\allmi\Source\py310\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\Users\allmi\Source\py310\lib\site-packages\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\allmi\Source\py310\lib\site-packages\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\allmi\Source\py310\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\allmi\Source\py310\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\allmi\Source\py310\lib\site-packages\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\allmi\Source\py310\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\block\detail.py", line 116, in cli
env.fout(table)
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\environment.py", line 85, in fout
self.out(self.fmt(output))
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\environment.py", line 75, in fmt
return formatting.format_output(output, fmt)
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\formatting.py", line 38, in format_output
return format_prettytable(data)
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\formatting.py", line 76, in format_prettytable
ptable = table.prettytable()
File "C:\Users\allmi\Source\py310\lib\site-packages\SoftLayer\CLI\formatting.py", line 295, in prettytable
table.add_row(*row)
File "C:\Users\allmi\Source\py310\lib\site-packages\rich\table.py", line 460, in add_row
raise errors.NotRenderableError(
rich.errors.NotRenderableError: unable to render list; a string or other renderable object is required
Feel free to report this error as it is likely a bug:
https://github.com/softlayer/softlayer-python/issues
The following snippet should be able to reproduce the error

@caberos Yeah, for most volumes I think the command works. It was just this one specific volume I got an error on for some reason.
You might be able to replicate the issue with a unit test. The Data the API returned is below, which might help.
{'capacityGb': 16000, 'id': 167214314, 'notes': 'test', 'username': 'SL02SEL307608-60', 'activeTransactionCount': 0, 'replicationPartnerCount': 1, 'lunId': '1', 'parentVolume': {'accountId': 307608, 'capacityGb': 16000, 'createDate': '2020-09-02T14:55:32-06:00', 'guestId': None, 'hardwareId': None, 'hostId': None, 'id': 167214302, 'nasType': 'NAS_CONTAINER', 'serviceProviderId': 1, 'storageTypeId': '3', 'upgradableFlag': True, 'username': 'SL02SEVC307608_60', 'serviceResourceBackendIpAddress': 'fsf-mex0101b-fz.service.softlayer.com', 'serviceResourceName': 'Storage Type 02 Aggregate stxf-mex0101b', 'snapshotSizeBytes': '831488'}, 'provisionedIops': '4096', 'replicationPartners': [{'id': 167236648, 'username': 'SL02SEL307608_60_REP_1', 'replicationSchedule': {'active': 1, 'createDate': '2020-09-02T17:10:04-06:00', 'id': 542062, 'modifyDate': None, 'name': 'SL02SEVC307608_60_WEEKLY', 'partnershipId': None, 'typeId': 34, 'volumeId': 167214302, 'type': {'keyname': 'REPLICATION_WEEKLY'}}, 'serviceResource': {'backendIpAddress': 'fsf-sao0102c-fz.service.softlayer.com', 'id': 30650, 'name': 'Storage Type 02 Aggregate stxf-sao0102c', 'datacenter': {'name': 'sao01'}, 'type': {'type': 'NETAPP_STOR_AGGR'}}, 'serviceResourceBackendIpAddress': '10.200.14.72'}], 'replicationStatus': 'FAILBACK_COMPLETED', 'serviceResource': {'backendIpAddress': 'fsf-mex0101b-fz.service.softlayer.com', 'id': 9291, 'name': 'Storage Type 02 Aggregate stxf-mex0101b', 'datacenter': {'name': 'mex01'}}, 'serviceResourceBackendIpAddress': '10.2.190.99', 'snapshotCapacityGb': '1000', 'storageTierLevel': 'LOW_INTENSITY_TIER', 'storageType': {'keyName': 'ENDURANCE_BLOCK_STORAGE'}}