Skip to content

API call to add VPN tunnel fails: group field is required #15126

@markkuleinio

Description

@markkuleinio

Deployment Type

Self-hosted

NetBox Version

v3.7.2

Python Version

3.11

Steps to Reproduce

$ curl -s -i http://netbox-test.lein.io/api/vpn/tunnels/ \
-H "Authorization: Token 176d4c04ccc8f2a549ea6fd393567d9da5a796ff" \
-H "Content-type: application/json" \
-H "Accept: application/json; indent=4" \
-d '{"name":"TestTunnel", "encapsulation":"ipsec-tunnel", "status":"active"}'

Expected Behavior

Tunnel "TestTunnel" is added successfully.

Observed Behavior

HTTP/1.1 400 Bad Request
API-Version: 3.7
...
{
    "group": [
        "This field is required."
    ]
}

Adding the same tunnel in GUI is successful (using only those three mandatory fields).

Workaround

Create a tunnel group like "TEMP", then add "group":1 (where 1 is the group ID) in the create call, and finally edit the resulted tunnel to remove the TEMP group.

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions