Skip to content

Custom device statuses fail to unmarshal, causing entire call to fail #179

Closed as not planned
@TomFletcher0

Description

@TomFletcher0

We have a custom device status, "Racked" set up using the normal method in Netbox (no code change required in Netbox), but then when I search (client.DcimAPI.DcimDevicesList(ctx)) for devices (with or without filters) the client throws error:

DcimDevicesList failed, racked is not a valid DeviceStatusValue

My workaround is to add the custom statuses to model_device_status_label.go & model_device_status_value.go, but this requires a fork and change to generated code.

It would be good even if it failed to unmarshal those particular devices with custom statuses, at least the rest of the devices from the search (those with supported statuses) could be returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions