IP address assignment to device with no interface #1089

Closed
opened 2025-12-29 16:28:42 +01:00 by adam · 3 comments
Owner

Originally created by @Atoms on GitHub (Jul 11, 2017).

**Python version: 3.4
**NetBox version: 2.0.9

When you create IP address within API, and then create device with that IP as primary IP, with not providing interface id you can see IP address in device view, but you don't see device attached in IP address view.
image

image

image

Originally created by @Atoms on GitHub (Jul 11, 2017). **Python version: 3.4 **NetBox version: 2.0.9 When you create IP address within API, and then create device with that IP as primary IP, with not providing interface id you can see IP address in device view, but you don't see device attached in IP address view. ![image](https://user-images.githubusercontent.com/9615/28056653-44a2f3aa-6626-11e7-9026-cf1010796405.png) ![image](https://user-images.githubusercontent.com/9615/28056677-6de1c476-6626-11e7-9afe-c26f590b62fc.png) ![image](https://user-images.githubusercontent.com/9615/28056870-2942e51a-6627-11e7-8cdd-d0d860698573.png)
adam added the type: bug label 2025-12-29 16:28:42 +01:00
adam closed this issue 2025-12-29 16:28:42 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 12, 2017):

Looks related to #1285. Could you please see if you can recreate the issue under v2.1-beta1 (or the develop-2.1 branch)?

@jeremystretch commented on GitHub (Jul 12, 2017): Looks related to #1285. Could you please see if you can recreate the issue under v2.1-beta1 (or the develop-2.1 branch)?
Author
Owner

@Atoms commented on GitHub (Jul 13, 2017):

Same behavior is in 2.1 beta version

@Atoms commented on GitHub (Jul 13, 2017): Same behavior is in 2.1 beta version
Author
Owner

@Atoms commented on GitHub (Jul 13, 2017):

API requests with which i did that.
`curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Token xxxxxxx' -d '{ "address": "10.10.10.12/24", "tenant": "1" }' 'http://xxxxx/api/ipam/ip-addresses/'

echo

read -p "Provide id of ip:" ip_id

echo ${ip_id}

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Token xxxxxxx' -d '{ "serial": "xxxx", "device_role": "4", "tenant": "1", "site": "24", "name": "test-device", "primary_ip4": "'$ip_id'", "device_type": "139" }' 'http://xxxxxx/api/dcim/devices/'
`

@Atoms commented on GitHub (Jul 13, 2017): API requests with which i did that. `curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Token xxxxxxx' -d '{ "address": "10.10.10.12/24", "tenant": "1" }' 'http://xxxxx/api/ipam/ip-addresses/' echo read -p "Provide id of ip:" ip_id echo ${ip_id} curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Token xxxxxxx' -d '{ "serial": "xxxx", "device_role": "4", "tenant": "1", "site": "24", "name": "test-device", "primary_ip4": "'$ip_id'", "device_type": "139" }' 'http://xxxxxx/api/dcim/devices/' `
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1089