-
Notifications
You must be signed in to change notification settings - Fork 19
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
Expand vlans
field inside a virtual circuit object response
#15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given my limited knowledge of django/netbox, I think this looks okay. I know there is another PR which includes tests, so if this gets merged in first, I think the tests PR will need to be rebased and updated to reflect these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Is it possible to flatten the {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"vcid": 101,
"name": "curl",
"status": "pending-configuration",
"context": "",
"vlans": [
{
"id": 1,
"created": "2020-06-02",
"last_updated": "2020-06-02T19:08:07.817046Z",
"vid": 1,
"name": "foo",
"status": "active",
"description": "",
"site": null,
"group": null,
"tenant": null,
"role": null
},
{
"id": 2,
"created": "2020-06-02",
"last_updated": "2020-06-02T19:08:12.453937Z",
"vid": 2,
"name": "bar",
"status": "active",
"description": "",
"site": null,
"group": null,
"tenant": null,
"role": null
}
]
}
]
} |
I've spent some time looking at this but not sure how to flatten the |
This PR changes
vlans.vlan
field inside a virtual circuit object response from holding a single primary key:to holding more VLAN metadata:
It also updates the
POST
request body fromto
where
vlan
field is replaced withid
.