API 2.0 Interfaces - connecting_interface does not include form_factor lable #950

Closed
opened 2025-12-29 16:27:11 +01:00 by adam · 0 comments
Owner

Originally created by @lampwins on GitHub (May 15, 2017).

Issue type: bug

Python version: 2.7.12
NetBox version: 2.0.1

In an interface instance returned by the API, the connected_interface.form_factor property does not contain the label for that form factor, only its numerical value. The interface instance however, includes both the label and value.

    {
      "id": 643,
      "device": {
        "id": 42,
        "url": "http://netbox-dev.nw.cougars.int/api/dcim/devices/42/",
        "name": "Access-1",
        "display_name": "Access-1"
      },
      "name": "ge-0/1/1",
      "form_factor": {
        "value": 1100,
        "label": "SFP (1GE)"
      },
      "lag": 645,
      "mac_address": null,
      "mgmt_only": false,
      "description": "",
      "connection": {
        "id": 7,
        "url": "http://netbox-dev.nw.cougars.int/api/dcim/interface-connections/7/",
        "connection_status": true
      },
      "connected_interface": {
        "id": 405,
        "url": "http://netbox-dev.nw.cougars.int/api/dcim/interfaces/405/",
        "device": {
          "id": 33,
          "url": "http://netbox-dev.nw.cougars.int/api/dcim/devices/33/",
          "name": "Dist",
          "display_name": "Dist"
        },
        "name": "ge-0/0/5",
        "form_factor": 1100,
        "mac_address": null,
        "mgmt_only": false,
        "description": ""
      }
    }
Originally created by @lampwins on GitHub (May 15, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: bug <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:** 2.7.12 **NetBox version:** 2.0.1 In an interface instance returned by the API, the `connected_interface.form_factor` property does not contain the label for that form factor, only its numerical value. The interface instance however, includes both the label and value. ``` { "id": 643, "device": { "id": 42, "url": "http://netbox-dev.nw.cougars.int/api/dcim/devices/42/", "name": "Access-1", "display_name": "Access-1" }, "name": "ge-0/1/1", "form_factor": { "value": 1100, "label": "SFP (1GE)" }, "lag": 645, "mac_address": null, "mgmt_only": false, "description": "", "connection": { "id": 7, "url": "http://netbox-dev.nw.cougars.int/api/dcim/interface-connections/7/", "connection_status": true }, "connected_interface": { "id": 405, "url": "http://netbox-dev.nw.cougars.int/api/dcim/interfaces/405/", "device": { "id": 33, "url": "http://netbox-dev.nw.cougars.int/api/dcim/devices/33/", "name": "Dist", "display_name": "Dist" }, "name": "ge-0/0/5", "form_factor": 1100, "mac_address": null, "mgmt_only": false, "description": "" } } ```
adam added the type: bug label 2025-12-29 16:27:11 +01:00
adam closed this issue 2025-12-29 16:27:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#950