Skip to content

Duplicate VRFs created if missing RD value #370

@OliElli

Description

@OliElli

Diode version

v1.4.0

Deployment type

docker compose

Deployment type version

Docker version 26.1.3, build b72abbb

Diode SDK type

diode-sdk-python

Diode SDK version

v1.1.0

Diode NetBox Plugin version

v1.2.0

NetBox version

v4.2.9

Steps to reproduce

from netboxlabs.diode.sdk import DiodeClient
from netboxlabs.diode.sdk.ingester import (
    IPAddress,
    VRF,
    Tenant,
    Entity,
)
entities = []
for i in range(1,3):
    tenant = Tenant(name='DCO')
    ip_address = {}
    ip_address['address'] = f'1.0.0.{i}/24'
    ip_address['vrf'] = VRF(name='Default',description='blah',tenant=tenant)
    ip_address['status'] = 'active'
    ip_address['tenant'] = tenant
    entities.append(Entity(ipaddress=IPAddress(**ip_address)))
with DiodeClient(
    target='https://my-netbox-server.com',
    app_name="device-to-diode",
    app_version="0.0.1",
) as client:
    response = client.ingest(entities=entities)

Expected behavior

2 IP Addresses created in the same VRF

Observed behavior

Each IP address has a unique but identical VRF assigned to it

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus: needs triageThis issue is awaiting triage by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions