Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vs detail on a cancelled VSI can produce an error #1212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
allmightyspiff opened this issue Jan 23, 2020 · 0 comments
Closed

vs detail on a cancelled VSI can produce an error #1212

allmightyspiff opened this issue Jan 23, 2020 · 0 comments
Assignees

Comments

@allmightyspiff
Copy link
Member

After VS id 81397493 was cancelled, I get the below error when trying to get its details.

>slcli vs detail 81397493
An unexpected error has occured:
Traceback (most recent call last):
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/SoftLayer/CLI/core.py", line 182, in main
    cli.main(**kwargs)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/SoftLayer/CLI/virt/detail.py", line 71, in cli
    bandwidth = vsi.get_bandwidth_allocation(vs_id)
  File "/Users/chris/Code/py3/lib/python3.7/site-packages/SoftLayer/managers/vs.py", line 1070, in get_bandwidth_allocation
    return {'allotment': allotment.get('allocation'), 'useage': useage}
AttributeError: 'NoneType' object has no attribute 'get'

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
> slcli call-api SoftLayer_Virtual_Guest getObject --id=81397493
:..............................:......................................:
:                         name : value                                :
:..............................:......................................:
:                    accountId : 307608                               :
:                   createDate : 2019-05-29T12:12:45-07:00            :
: dedicatedAccountHostOnlyFlag : False                                :
:                       domain : cgallo.com                           :
:     fullyQualifiedDomainName : gitlab.cgallo.com                    :
:                     hostname : gitlab                               :
:                           id : 81397493                             :
:             lastPowerStateId : None                                 :
:             lastVerifiedDate : None                                 :
:                       maxCpu : 1                                    :
:                  maxCpuUnits : CORE                                 :
:                    maxMemory : 2048                                 :
:               metricPollDate : None                                 :
:                   modifyDate : 2019-05-29T12:14:55-07:00            :
:             placementGroupId : None                                 :
:                provisionDate : 2019-05-29T12:14:55-07:00            :
:                    startCpus : 1                                    :
:                     statusId : 1001                                 :
:                       typeId : 1                                    :
:                         uuid : e4f679f4-8db8-1ea7-bac7-634f2521e70a :
:             globalIdentifier : d1f8477d-6dbc-40a3-accb-5753b2c33d51 :
:          managedResourceFlag : False                                :
:      primaryBackendIpAddress : 10.186.174.49                        :
:             primaryIpAddress : 169.48.79.198                        :
:                       status : :.........:........:                 :
:                              : :    name : value  :                 :
:                              : :.........:........:                 :
:                              : : keyName : ACTIVE :                 :
:                              : :    name : Active :                 :
:                              : :.........:........:                 :
:..............................:......................................:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants