Skip to content

Unable to assign IP address to IRG due to parsing inconsistency #236

@TheBirdsNest

Description

@TheBirdsNest

Environment

  • Python version: 3.12.11
  • Nautobot version: 2.4.14
  • nautobot-design-builder version: 2.2.0

Expected Behavior

I can create an Interface Redundancy Group in my Design YAML and create a child IP Address object, assigned to the virtual_ip field.

Observed Behavior

When creating an IP address nested under virtual_ip I get the error:

status is not a property of IPAddressToInterface

Image

When I remove status from the IPAddress object, I get the error:

DesignValidation Error: IP address 192.168.1.1/24 failed validation - status field cannot be blank

Image

Steps to Reproduce

  1. Define an Interface Redundancy Group in Nautobot Design Builder
  2. Map an IP Address to the virtual_ip field either via !ref: or by declaring it as a nested object
  3. Run the Design

Below is the current design file, note I tried directly nesting originally, and then attempted to use a !ref, neither options work.

{% set sdn_device_group = select_device_group() %}
{% set inventory = load_router_inventory() %}
{% if inventory|length > 1 %}
{% set redundancy_group = "RG_WAN-"+site.name %}
device_redundancy_groups:
  - name: {{ redundancy_group }}
    status__name: Active
    "!ref": {{ redundancy_group }}
{% endif %}
{% for name, network in networks.items() %}
{% if network.gateway.lower() == 'router' %}
ip_addresses:
  - parent: "!ref:{{ network.role }}:{{ network.vlan.id }}"
    address: "{{ get_next_available_ip(network.role + ':' + network.vlan.id|string) }}"
    status__name: Active
    dns_name: {{ site.name }}-{{ name | replace(' ', '-') }}-{{ sdn_device_group['lan_interface'] | replace('/', '-') }}-{{ network.vlan.id }}-vip.if.lab.local
    "!ref": "VIP_{{ network.role }}:{{ network.vlan.id }}"
interface_redundancy_groups:
  - name: IRG_WAN-{{site.name}}_{{ name | replace(' ', '-') }}_{{ sdn_device_group['lan_interface'] }}.{{ network.vlan.id }}
    status__name: Active
    virtual_ip: "!ref:VIP_{{ network.role }}:{{ network.vlan.id }}"
    protocol: vrrp
    "!ref": "IRG_{{ sdn_device_group['lan_interface'] }}:{{ network.vlan.id }}"
  {% endif %}
  {% endfor %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions