[Bug]: Cable length is a float no int
Ansible NetBox Collection version
v3.7.1
Ansible version
2.12
NetBox version
v3.2.2
Python version
3.10
Steps to Reproduce
Add cables with a float, for example cable length 4.5.
Expected Behavior
Cable will be created with a length of 4.5
Observed Behavior
the cable creation fails, because expect int.
"msg": "argument 'length' is of type <class 'float'> found in 'data'. and we were unable to convert to int: <class 'float'> cannot be converted to an int"}
Yep. It's saved as a DecimalField in the API server - https://github.com/netbox-community/netbox/blob/develop/netbox/dcim/models/cables.py#L81
Let's fix it.
@rodewalder https://github.com/netbox-community/ansible_modules/blob/devel/plugins/modules/netbox_cable.py#L307 is the line that needs to change (and probably some unit tests) if you are interested in making a contribution