IPAM Prefixis import / vlan not found #6575

Closed
opened 2025-12-29 19:42:33 +01:00 by adam · 2 comments
Owner

Originally created by @FessAlvasete on GitHub (Jun 18, 2022).

NetBox version

v3.2.4

Python version

3.9

Steps to Reproduce

Hello Team,
I have an issue with importing prefixes. I want create prefix with link to vlan_group, vlan and site.
But I could not import prefix if vlan does not directly linked to the particular site.
I have a few vlan_groups:

Name,Scope type,Scope,VLANs,Description
BB,,,16,Backbone Networks
BR,,,15,Branches Networks
CO,dcim.sitegroup,B,17,Central Office Networks
DC,dcim.sitegroup,A,22,Data Center Networks

But they dont have stricted links to the particular sites.
And when I try to import prefix with csv file like this:

prefix,status,tenant,site,vlan_group,vlan,description
10.131.2.0/24,active,AG,AG31-002,BR,10,AG31-002-CORP

I have an error:

row 1: vlan object not found. 

Therefore I have it (vlan) within a group.
Manualy I could add it without errors. But I have to fill the row VLAN before the Site row.
Also if I create vlan linked with site then csv import goes without any problems.

Expected Behavior

When I'm adding new prefix with csv alike:

prefix,status,tenant,site,vlan_group,vlan,description
10.131.2.0/24,active,AG,AG31-002,BR,10,AG31-002-CORP

It should be imported successfully without error even if I dont have vlan linked to site.

Observed Behavior

When trying to import prefix through csv with vlan and site link

Group,VID,Name,Prefixes,Tenant,Status,Role,Description,Site
,10,Corporate,,AG,Active,,,AG31-002
BR,10,Corporate,,AG,Active,,,

import

prefix,status,tenant,site,vlan_group,vlan,description
10.131.2.0/24,active,AG,AG31-002,BR,10,AG31-002-CORP

If we dont have vlan linked to the site we have an error

row 1: vlan object not found. 

If we use

prefix,status,tenant,site,vlan_group,vlan,description
10.131.2.0/24,active,AG,AG31-002,,10,AG31-002-CORP

Everything goes well cause we have vlan linked to the site.

Originally created by @FessAlvasete on GitHub (Jun 18, 2022). ### NetBox version v3.2.4 ### Python version 3.9 ### Steps to Reproduce Hello Team, I have an issue with importing prefixes. I want create prefix with link to vlan_group, vlan and site. But I could not import prefix if vlan does not directly linked to the particular site. I have a few vlan_groups: ``` Name,Scope type,Scope,VLANs,Description BB,,,16,Backbone Networks BR,,,15,Branches Networks CO,dcim.sitegroup,B,17,Central Office Networks DC,dcim.sitegroup,A,22,Data Center Networks ``` But they dont have stricted links to the particular sites. And when I try to import prefix with csv file like this: ``` prefix,status,tenant,site,vlan_group,vlan,description 10.131.2.0/24,active,AG,AG31-002,BR,10,AG31-002-CORP ``` I have an error: ``` row 1: vlan object not found. ``` Therefore I have it (vlan) within a group. Manualy I could add it without errors. But I have to fill the row VLAN before the Site row. Also if I create vlan linked with site then csv import goes without any problems. ### Expected Behavior When I'm adding new prefix with csv alike: ``` prefix,status,tenant,site,vlan_group,vlan,description 10.131.2.0/24,active,AG,AG31-002,BR,10,AG31-002-CORP ``` It should be imported successfully without error even if I dont have vlan linked to site. ### Observed Behavior When trying to import prefix through csv with vlan and site link ``` Group,VID,Name,Prefixes,Tenant,Status,Role,Description,Site ,10,Corporate,,AG,Active,,,AG31-002 BR,10,Corporate,,AG,Active,,, ``` import ``` prefix,status,tenant,site,vlan_group,vlan,description 10.131.2.0/24,active,AG,AG31-002,BR,10,AG31-002-CORP ``` If we dont have vlan linked to the site we have an error ``` row 1: vlan object not found. ``` If we use ``` prefix,status,tenant,site,vlan_group,vlan,description 10.131.2.0/24,active,AG,AG31-002,,10,AG31-002-CORP ``` Everything goes well cause we have vlan linked to the site.
adam added the type: bug label 2025-12-29 19:42:33 +01:00
adam closed this issue 2025-12-29 19:42:33 +01:00
Author
Owner

@schmittvictor commented on GitHub (Jun 20, 2022):

I posted a similar issues few weeks ago : #9279
This is an expected behavior, your VLAN has to be in the same site as the prerfix.

@schmittvictor commented on GitHub (Jun 20, 2022): I posted a similar issues few weeks ago : #9279 This is an expected behavior, your VLAN has to be in the same site as the prerfix.
Author
Owner

@FessAlvasete commented on GitHub (Jun 21, 2022):

I posted a similar issues few weeks ago : #9279 This is an expected behavior, your VLAN has to be in the same site as the prerfix.

Thanks a lot. If it's expected then let it be)

@FessAlvasete commented on GitHub (Jun 21, 2022): > I posted a similar issues few weeks ago : #9279 This is an expected behavior, your VLAN has to be in the same site as the prerfix. Thanks a lot. If it's expected then let it be)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6575