POST dcim_interfaces_create via API - rf_channel: "This field may not be blank." #6005

Closed
opened 2025-12-29 19:35:37 +01:00 by adam · 2 comments
Owner

Originally created by @Sebas1337 on GitHub (Jan 27, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.1.6

Python version

3.8? (Using the container: netboxcommunity/netbox:v3.1.6-ldap-1.5.1)

Steps to Reproduce

When trying to use the dcim_create_interface trough the API I get an error about the field rf_channel. It says it cannot be blank. The interface I am trying to create is not even a wireless interface. When I try to fill in a dummy rf_channel it complains it is not needed. Tested in version 3.1.6 and 3.1.0.

Post URL:
https://<NETBOX URL>/api/dcim/interfaces/

Post Body (JSON):

{
  "device": 159,
  "name": "Ethernet1/1",
  "label": "",
  "type": "10gbase-t",
  "enabled": true,
  "parent": null,
  "bridge": null,
  "lag": null,
  "mtu": null,
  "mac_address": null,
  "wwn": null,
  "mgmt_only": false,
  "description": "***Link to Router***",
  "mode": "",
  "rf_role": null,
  "rf_channel": null,
  "rf_channel_frequency": "",
  "rf_channel_width": null,
  "tx_power": null,
  "untagged_vlan": null,
  "tagged_vlans": [],
  "mark_connected": false,
  "cable": {
    "label": null
  },
  "wireless_link": 0,
  "wireless_lans": [],
  "tags": [],
  "custom_fields": {}
}

Response:

{
    "rf_channel": [
        "This field may not be blank."
    ]
}

When I try to fill in a valid value for the rf_channel, it compains that it is not needed:
"rf_channel": "2.4g-1-2412-22"

Response:

{
    "rf_channel": [
        "Channel may be set only on wireless interfaces."
    ]
}

Expected Behavior

Expected is that the interface will be created in netbox at the specified devices without any wireless settings.

Observed Behavior

Hitting an error:

{
    "rf_channel": [
        "This field may not be blank."
    ]
}
Originally created by @Sebas1337 on GitHub (Jan 27, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.1.6 ### Python version 3.8? (Using the container: netboxcommunity/netbox:v3.1.6-ldap-1.5.1) ### Steps to Reproduce When trying to use the dcim_create_interface trough the API I get an error about the field rf_channel. It says it cannot be blank. The interface I am trying to create is not even a wireless interface. When I try to fill in a dummy rf_channel it complains it is not needed. Tested in version 3.1.6 and 3.1.0. Post URL: `https://<NETBOX URL>/api/dcim/interfaces/` Post Body (JSON): ``` { "device": 159, "name": "Ethernet1/1", "label": "", "type": "10gbase-t", "enabled": true, "parent": null, "bridge": null, "lag": null, "mtu": null, "mac_address": null, "wwn": null, "mgmt_only": false, "description": "***Link to Router***", "mode": "", "rf_role": null, "rf_channel": null, "rf_channel_frequency": "", "rf_channel_width": null, "tx_power": null, "untagged_vlan": null, "tagged_vlans": [], "mark_connected": false, "cable": { "label": null }, "wireless_link": 0, "wireless_lans": [], "tags": [], "custom_fields": {} } ``` Response: ``` { "rf_channel": [ "This field may not be blank." ] } ``` When I try to fill in a valid value for the rf_channel, it compains that it is not needed: `"rf_channel": "2.4g-1-2412-22"` Response: ``` { "rf_channel": [ "Channel may be set only on wireless interfaces." ] } ``` ### Expected Behavior Expected is that the interface will be created in netbox at the specified devices without any wireless settings. ### Observed Behavior Hitting an error: ``` { "rf_channel": [ "This field may not be blank." ] } ```
adam added the type: bugstatus: accepted labels 2025-12-29 19:35:37 +01:00
adam closed this issue 2025-12-29 19:35:38 +01:00
Author
Owner

@hagbarddenstore commented on GitHub (Jan 27, 2022):

Set it to “”

Sent from my iPhone

On 27 Jan 2022, at 11:55, Sebas1337 @.***> wrote:


NetBox version

v3.1.6

Python version

3.8

Steps to Reproduce

When trying to use the dcim_create_interface trough the API I get an error about the field rf_channel. It says it cannot be blank. The interface I am trying to create is not even a wireless interface. When I try to fill in a dummy rf_channel it complains it is not needed. Tested in version 3.1.6 and 3.1.0.

Post URL:
https:///api/dcim/interfaces/

Post Body (JSON):

{
"device": 159,
"name": "Ethernet1/1",
"label": "",
"type": "10gbase-t",
"enabled": true,
"parent": null,
"bridge": null,
"lag": null,
"mtu": null,
"mac_address": null,
"wwn": null,
"mgmt_only": false,
"description": "Link to Router",
"mode": "",
"rf_role": null,
"rf_channel": null,
"rf_channel_frequency": "",
"rf_channel_width": null,
"tx_power": null,
"untagged_vlan": null,
"tagged_vlans": [],
"mark_connected": false,
"cable": {
"label": null
},
"wireless_link": 0,
"wireless_lans": [],
"tags": [],
"custom_fields": {}
}
Response:

{
"rf_channel": [
"This field may not be blank."
]
}
When I try to fill in a valid value for the rf_channel, it compains that it is not needed:
"rf_channel": "2.4g-1-2412-22"

Response:

{
"rf_channel": [
"Channel may be set only on wireless interfaces."
]
}
Expected Behavior

Expected is that the interface will be created in netbox at the specified devices without any wireless settings.

Observed Behavior

Hitting an error:

{
"rf_channel": [
"This field may not be blank."
]
}

Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.

@hagbarddenstore commented on GitHub (Jan 27, 2022): Set it to “” Sent from my iPhone > On 27 Jan 2022, at 11:55, Sebas1337 ***@***.***> wrote: > >  > NetBox version > > v3.1.6 > > Python version > > 3.8 > > Steps to Reproduce > > When trying to use the dcim_create_interface trough the API I get an error about the field rf_channel. It says it cannot be blank. The interface I am trying to create is not even a wireless interface. When I try to fill in a dummy rf_channel it complains it is not needed. Tested in version 3.1.6 and 3.1.0. > > Post URL: > https://<NETBOX URL>/api/dcim/interfaces/ > > Post Body (JSON): > > { > "device": 159, > "name": "Ethernet1/1", > "label": "", > "type": "10gbase-t", > "enabled": true, > "parent": null, > "bridge": null, > "lag": null, > "mtu": null, > "mac_address": null, > "wwn": null, > "mgmt_only": false, > "description": "***Link to Router***", > "mode": "", > "rf_role": null, > "rf_channel": null, > "rf_channel_frequency": "", > "rf_channel_width": null, > "tx_power": null, > "untagged_vlan": null, > "tagged_vlans": [], > "mark_connected": false, > "cable": { > "label": null > }, > "wireless_link": 0, > "wireless_lans": [], > "tags": [], > "custom_fields": {} > } > Response: > > { > "rf_channel": [ > "This field may not be blank." > ] > } > When I try to fill in a valid value for the rf_channel, it compains that it is not needed: > "rf_channel": "2.4g-1-2412-22" > > Response: > > { > "rf_channel": [ > "Channel may be set only on wireless interfaces." > ] > } > Expected Behavior > > Expected is that the interface will be created in netbox at the specified devices without any wireless settings. > > Observed Behavior > > Hitting an error: > > { > "rf_channel": [ > "This field may not be blank." > ] > } > — > Reply to this email directly, view it on GitHub, or unsubscribe. > Triage notifications on the go with GitHub Mobile for iOS or Android. > You are receiving this because you are subscribed to this thread.
Author
Owner

@Sebas1337 commented on GitHub (Jan 27, 2022):

Also tried that already. They you get:
{ "rf_channel": [ "This field may not be blank." ] }

Body:
{ ... "rf_channel": "", "rf_channel_frequency": "", ... }

@Sebas1337 commented on GitHub (Jan 27, 2022): Also tried that already. They you get: `{ "rf_channel": [ "This field may not be blank." ] }` Body: `{ ... "rf_channel": "", "rf_channel_frequency": "", ... }`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6005