Skip to content

Recognizing that devices are not part of a site #137

Description

@cscotthpe

Particularly for the cutover validation tool. When running it against a device inventory which contains devices unassigned to a site, the tool will return error:
Error fetching device <serial_no>: 'NoneType' object has no attribute 'upper'

I wrote a simple error catcher that logs this to errorlog.txt in the working directory.

Upon further investigation, the API endpoint being used to get device status:
v1/device-inventory?search=<serial_no>

Returns two values that explain the error:

"status": null,
"siteId": null

Some logic to interpret this and guide the user to adding the device to a site would be helpful. Perhaps an error catching py module could be used to easily provide this across anything using the pycentral modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions