Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

available-ips endpoint is broken when using VRFs #6894

Closed
fabi125 opened this issue Aug 5, 2021 · 0 comments
Closed

available-ips endpoint is broken when using VRFs #6894

fabi125 opened this issue Aug 5, 2021 · 0 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@fabi125
Copy link
Contributor

fabi125 commented Aug 5, 2021

NetBox version

3.0-dev

Python version

3.8

Steps to Reproduce

  1. Go to https://beta-demo.netbox.dev/
  2. Create a VRF
  3. Create a prefix inside that VRF
  4. Go to https://beta-demo.netbox.dev/api/ipam/prefixes/id/available-ips/

Expected Behavior

List of available IPs is returned.

Observed Behavior

{"error": "Object of type VRF is not JSON serializable", "exception": "TypeError", "netbox_version": "3.0-dev", "python_version": "3.8.10"}

This is what the prefix looks like:

{
    "id": 73,
    "url": "https://beta-demo.netbox.dev/api/ipam/prefixes/73/",
    "display": "10.0.0.0/24",
    "family": {
        "value": 4,
        "label": "IPv4"
    },
    "prefix": "10.0.0.0/24",
    "site": null,
    "vrf": {
        "id": 1,
        "url": "https://beta-demo.netbox.dev/api/ipam/vrfs/1/",
        "display": "Test VRF",
        "name": "Test VRF",
        "rd": null
    },
    "tenant": null,
    "vlan": null,
    "status": {
        "value": "active",
        "label": "Active"
    },
    "role": null,
    "is_pool": false,
    "mark_utilized": false,
    "description": "",
    "tags": [],
    "custom_fields": {},
    "created": "2021-08-05",
    "last_updated": "2021-08-05T11:51:42.530747Z",
    "children": 0,
    "_depth": 0
}
@fabi125 fabi125 added the type: bug A confirmed report of unexpected behavior in the application label Aug 5, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Aug 5, 2021
@jeremystretch jeremystretch self-assigned this Aug 5, 2021
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Aug 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants