Virtualization: ability to attach to VM interface when importing Addresses via CSV #1236

Closed
opened 2025-12-29 16:30:27 +01:00 by adam · 1 comment
Owner

Originally created by @candlerb on GitHub (Sep 16, 2017).

Issue type

[ ] Feature request
[X] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: v2.2-beta1

Description

When importing IP Addresses via CSV, you can attach them to a Device/Interface but not to a Virtual Machine/Interface.

Step 1: import some VMs:

name,cluster,platform
unifi,lxd1,Ubuntu 16.04
apt-cacher,lxd1,Ubuntu 16.04

Step 2: manually create an interface eth0 on each one (see #1492, #822)

Step 3: try to import the addresses:

address,status,virtual_machine,interface_name,is_primary
192.0.2.30/24,Active,unifi,eth0,true
2001:db8::30/64,Active,unifi,eth0,true
192.0.2.31/24,Active,apt-cacher,eth0,true
2001:db8::31/64,Active,apt-cacher,eth0,true

This fails since column "virtual_machine" is not supported. Column "device" is supported, but not usable here.

Originally created by @candlerb on GitHub (Sep 16, 2017). ### Issue type [ ] Feature request <!-- Requesting the implementation of a new feature --> [X] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: v2.2-beta1 ### Description When importing IP Addresses via CSV, you can attach them to a Device/Interface but not to a Virtual Machine/Interface. Step 1: import some VMs: ~~~ name,cluster,platform unifi,lxd1,Ubuntu 16.04 apt-cacher,lxd1,Ubuntu 16.04 ~~~ Step 2: manually create an interface `eth0` on each one (see #1492, #822) Step 3: try to import the addresses: ~~~ address,status,virtual_machine,interface_name,is_primary 192.0.2.30/24,Active,unifi,eth0,true 2001:db8::30/64,Active,unifi,eth0,true 192.0.2.31/24,Active,apt-cacher,eth0,true 2001:db8::31/64,Active,apt-cacher,eth0,true ~~~ This fails since column "virtual_machine" is not supported. Column "device" *is* supported, but not usable here.
adam added the type: bug label 2025-12-29 16:30:27 +01:00
adam closed this issue 2025-12-29 16:30:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 18, 2017):

Fixed in 512a3bf

@jeremystretch commented on GitHub (Sep 18, 2017): Fixed in 512a3bf
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1236