Validation error when adding a new cable #12166
-
NetBox versionv3.4.6 Python version3.10 Steps to Reproduceansible-playbook tasks/netbox/6_conneted.yml 6_conneted.yml
After that I run the playbook and get:
Next, I tried to create a cable with a playbook. The manual cable is created. Expected BehaviorCable created successfully Observed Behavior"msg": "{"all":["Must define A and B terminations when creating a new cable."]}" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
There was a major change in the cable data model and REST API in Netbox version 3.3: cables now have multiple terminations at each end, rather than a single termination. Therefore, code you wrote (or found) which worked on versions prior to 3.3 won't work on 3.3 onwards. In general, there's no guarantee that X.Y and X.Y+1 are compatible with each other: so every time you upgrade, you may have to update your integrations, scripts, reports etc. These changes are called out in the release notes. |
Beta Was this translation helpful? Give feedback.
-
OK. Clearly, it is possible then a proverb on the documentation how to start parvilno? Well, or just a request for it? Don't study inside and out. |
Beta Was this translation helpful? Give feedback.
-
Yes, that's the mod I meant. I just clicked the link where I see the syntax for writing playbooks. Apparently in one place it has changed in another not. I will write with a request to correct the documentation. Now it has become more clear. Thank you |
Beta Was this translation helpful? Give feedback.
You mean at https://docs.ansible.com/ansible/latest/collections/netbox/netbox/netbox_cable_module.html#ansible-collections-netbox-netbox-netbox-cable-module ?
Yeah, that looks out of date to me.
I think the source is here: https://github.com/netbox-community/ansible_modules/blob/devel/docs/plugins/netbox_cable_module.rst - you can raise an issue in that repo to get the examples updated.
However, I believe that the structure of these requests is the same as that used by the REST API. So if you follow the link I gave you to the version 3.3 release notes, you can see the changes - e.g.
termination_a
has been replaced bya_terminations
which is a list[...]
Sorry, I can't give you a ready-to-…