-
Notifications
You must be signed in to change notification settings - Fork 170
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
NetBox v3.3 has multiple endpoints for dcim.cables (appears as 'AttributeError: object has no attribute "id"') #491
Comments
This does not appear to be a problem when creating a cable, only when updating an existing one. |
This is also an issue when GETting cables. a_terminations and b_terminations are returned as empty lists. e: a_terminations and b_terminations are not in fact empty lists. They just show up as empty lists in the cable string representation. As a workaround, |
Any ideas on workaround for this? Getting works fine for me, but updates are failing using pynetbox library |
I've got this on my list to work on next, but will take a while before I can get it updated. If you see any other APIs broken for 3.3, please let me know. |
Any updates here? |
Add link to bug causing update to fail. netbox-community/pynetbox#491 Add commented update method for when issue 491 is fixed. generate_args_create_or_update: move label to a separate method. Other minor formatting changes.
@karolyczovek @maznu @jcollie would any of you be able to get the feature branch and test it out for the cabling a_terminations changes? The feature branch will only work for NetBox 3.3 due to the changes. I'd like to get it tested more if possible before cutting a new release. |
So far so good. Not much time to do anything serious with it yet. Tomorrow I should be able to do some more testing. One unrelated thing that I noticed tonight is that the link peers on a cable termination are not cast to a specific model but are left as a generic record. |
Thanks @jcollie The link_peers looks like a bit of a different issue, I'll open a separate issue for it but will probably want to change the API in NetBox (probably 3.5 release) as the return for these types of things currently isn't consistent. |
Things seem to be working well today so far. One thing that would be nice would be the ability to create a cable just by passing the whole object (like in the commented-out code) vs passing a dict.
|
I just upgraded to 7.0.1 and now I don't get the object_type or object_id parameters any more (they're still present in the NetBox API). I'm specifically working with the dcim.cables endpoint. What happened? I'm using NetBox 3.3.10 and I upgraded from pynetbox 6.6.2 6.6.2:
7.0.1:
|
Looks like one level of attributes are missing:
|
When talking to NetBox v3.3, pynetbox v6.6.2 chokes when POSTing to
dcim.cable
by raising exception AttributeError: object has no attribute "id"This is because in NetBox v3.2 and earlier:
Whereas NetBox v3.3 has a list of dicts:
The text was updated successfully, but these errors were encountered: