Expose choices of cable:termination_a_type and cable:termination_b_type #3730

Closed
opened 2025-12-29 18:30:49 +01:00 by adam · 7 comments
Owner

Originally created by @christianpinger on GitHub (May 27, 2020).

Originally assigned to: @DanSheps on GitHub.

Environment

  • Python version: 3.8.3
  • NetBox version: 2.8.4

Proposed Functionality

In older Netbox versions it was possible to get choices for cable:termination_a_type via this api-request:

GET '/api/dcim/_choices/'
...
"cable:termination_a_type": [
    {
      "value": "dcim.consoleport",
      "label": "console port"
    },
    {
      "value": "dcim.consoleserverport",
      "label": "console server port"
    },
    {
      "value": "dcim.interface",
      "label": "interface"
    },
...

But since #3416 it is not possible to get the choices for termination_a_type with the new OPTIONS request, as there are no choices listed:

OPTIONS '/api/dcim/cables/'
...
"termination_a_type": {
  "type": "field",
  "required": true,
  "read_only": false,
  "label": "Termination a type"
},
...

Use Case

API users/developers would know which terminations exist.

Database Changes

None

External Dependencies

None

Originally created by @christianpinger on GitHub (May 27, 2020). Originally assigned to: @DanSheps on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.8.3 * NetBox version: 2.8.4 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality In older Netbox versions it was possible to get choices for cable:termination_a_type via this api-request: ``` GET '/api/dcim/_choices/' ... "cable:termination_a_type": [ { "value": "dcim.consoleport", "label": "console port" }, { "value": "dcim.consoleserverport", "label": "console server port" }, { "value": "dcim.interface", "label": "interface" }, ... ``` But since #3416 it is not possible to get the choices for termination_a_type with the new OPTIONS request, as there are no choices listed: ``` OPTIONS '/api/dcim/cables/' ... "termination_a_type": { "type": "field", "required": true, "read_only": false, "label": "Termination a type" }, ... ``` ### Use Case API users/developers would know which terminations exist. ### Database Changes None ### External Dependencies None
adam added the type: bugstatus: accepted labels 2025-12-29 18:30:49 +01:00
adam closed this issue 2025-12-29 18:30:49 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 29, 2020):

@christianharendt or @sdktr would one of you like to volunteer for this?

@jeremystretch commented on GitHub (May 29, 2020): @christianharendt or @sdktr would one of you like to volunteer for this?
Author
Owner

@sdktr commented on GitHub (May 31, 2020):

If time is not an issue I’ll take a shot at it

@christianharendt or @sdktr would one of you like to volunteer for this?

@sdktr commented on GitHub (May 31, 2020): If time is not an issue I’ll take a shot at it > @christianharendt or @sdktr would one of you like to volunteer for this?
Author
Owner

@christianpinger commented on GitHub (Jun 10, 2020):

If time is not an issue I’ll take a shot at it

Thanks @sdktr for taking the lead. If I can assist you, please let me know.

@christianpinger commented on GitHub (Jun 10, 2020): > If time is not an issue I’ll take a shot at it Thanks @sdktr for taking the lead. If I can assist you, please let me know.
Author
Owner

@jeremystretch commented on GitHub (Jun 15, 2020):

@sdktr Can you provide an update on this please?

@jeremystretch commented on GitHub (Jun 15, 2020): @sdktr Can you provide an update on this please?
Author
Owner

@jeremystretch commented on GitHub (Jun 26, 2020):

This still needs an owner, it seems.

@jeremystretch commented on GitHub (Jun 26, 2020): This still needs an owner, it seems.
Author
Owner

@sdktr commented on GitHub (Jun 26, 2020):

Sorry that I missed this. If an additional couple of weeks are possible I’d still try and take an attempt at this.

@sdktr commented on GitHub (Jun 26, 2020): Sorry that I missed this. If an additional couple of weeks are possible I’d still try and take an attempt at this.
Author
Owner

@DanSheps commented on GitHub (Jun 26, 2020):

It is alright, I think I have a solution for this

@DanSheps commented on GitHub (Jun 26, 2020): It is alright, I think I have a solution for this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3730