Skip to content

slcli [block|file] volume-detail <bad name> throws exception #1229

@allmightyspiff

Description

@allmightyspiff
slcli -v  file volume-detail SL01SEL307608-11
Calling: SoftLayer_Network_Storage::getObject(id=SL01SEL307608-11, mask='id,username,password,capacityGb,bytesUsed,snapshotCapacityGb,parentVolume.snapshotSizeBytes,storageType.keyName,serviceResource.datacenter[name],serviceResourceBackendIpAddress,fileNetworkMountAddress,storageTierLevel,provisionedIops,lunId,originalVolumeName,originalSnapshotName,originalVolumeSize,activeTransactionCount,activeTransactions.transactionStatus[friendlyName],replicationPartnerCount,replicationStatus,replicationPartners[id,username,serviceResourceBackendIpAddress,serviceResource[datacenter[name]],replicationSchedule[type[keyname]]]', filter='None', args=(), limit=None, offset=None))
An unexpected error has occured:
Traceback (most recent call last):
  File "c:\users\allmi\source\py37\lib\site-packages\SoftLayer\CLI\core.py", line 182, in main
    cli.main(**kwargs)
  File "c:\users\allmi\source\py37\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\allmi\source\py37\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\allmi\source\py37\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\allmi\source\py37\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\allmi\source\py37\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\allmi\source\py37\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "c:\users\allmi\source\py37\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\allmi\source\py37\lib\site-packages\SoftLayer\CLI\file\detail.py", line 24, in cli
    storage_type = file_volume['storageType']['keyName'].split('_').pop(0)
AttributeError: 'NestedDict' object has no attribute 'split'

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

Likely need a check around where SoftLayer_Network_Storage::getObject is called to make sure it
actually returned something, and throw an exception if nothing was returned.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions