Skip to content

API: Cable Terminations Type dcim.interface, dcim.powerport "That choice is not one of the available choices" #10388

Answered by candlerb
metrax asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm, that's a good question. As you've observed, the api response includes those values:

...
            "id": 52,
            "url": "https://netbox.example.net/api/dcim/cable-terminations/52/",
            "display": "Cable #64 to ether9",
            "cable": 64,
            "cable_end": "B",
            "termination_type": "dcim.interface",   <<<
            "termination_id": 441,
...

The filter source code doesn't help. And that error message is not in the Netbox source, it comes from Django.

termination_type is defined here:

    termination_type = models.ForeignKey(
        to=ContentType,
        limit_choices_to=CABLE_TERMINATION_MODELS,
        on_delete=models.PROTECT,
        …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@metrax
Comment options

Answer selected by metrax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants