Open artiomello opened 1 year ago
I aso noticed that if I add cable length properties to an existing connection, i.e. add these two properties:
length: 10
length_unit: m
to the piece of code in my example and run it again - length is not getting updated.
I seem to have the same Problem; If I add a cable I get this error:
TASK [Create cable within NetBox with only required information] ***
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: object has no attribute "id"
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/user/.ansible/tmp/ansible-tmp-1683897589.0666027-7042-195276886677268/AnsiballZ_netbox_cable.py\", line 107, in
I could not Figure out which Object is meant.
The Cable is Created correctly in Netbox anyway.
Same as @artiomello, I can not update the cable. But I can actually remove it, and it works in Netbox but I get the following Error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: Value of unknown type: <class 'pynetbox.models.dcim.Cables'>, Cable #1371
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/user/.ansible/tmp/ansible-tmp-1683897717.4491334-7216-89180272760280/AnsiballZ_netbox_cable.py\", line 107, in
@artiomello did you find anything meanwhile?
Nope. Still hoping that someone will actually fix this.
So to work around, I tried directly in python. Seems to be a Problem with pynetbox. I have the same Problem with the circuits.
i I do something like
pprint.pprint(nb.dcim.cables.choices())
I get the correct answer and then
Traceback (most recent call last):
File "netbox_circuits.py", line 93, in <module>
main()
File "netbox_circuits.py", line 88, in main
pprint(netbox_provisioning(netbox))
TypeError: 'module' object is not callable
Ansible NetBox Collection version
should be latest
Ansible version
Running in
AWX 21.0.0
NetBox version
v3.4.7
Python version
3.8
Steps to Reproduce
I'm using AWX to create cable terminations using a loop:
and passing to it the following (mandatory) arguments:
Expected Behavior
Cable connections are created without any errors.
Observed Behavior
Cable connections are actually created but the module is generating a bunch of traceback errors, rendering the task
failed
.Originally reported under netbox-community/netbox but was advised to move the issue here.