Skip to content

NETCONF path missing nested host-name layer for IP hosts with VRF #434

@aitestino

Description

@aitestino

Description

The iosxe_system resource generates an incorrect NETCONF path when configuring IP hosts with VRF, causing an unknown-element error.

Error

RPC error: rpc-error {
  error-type: application
  error-tag: unknown-element
  error-path: /ios:native/ios:ip/ios:host/ios:vrf[ios:vrf-name='Mgmt-intf']/ios:ip-list
}

Root Cause

The provider sends:

/ios:native/ios:ip/ios:host/ios:vrf[ios:vrf-name='X']/ios:ip-list

Per Cisco-IOS-XE-ip.yang (lines 294-314), the correct path requires a nested host-name list:

/ios:native/ios:ip/ios:host/ios:vrf[ios:vrf-name='X']/ios:host-name[ios:host-name='Y']/ios:ip-list

YANG Model Structure

container vrf {
  list vrf {
    key "vrf-name";
    leaf vrf-name { type string; }
    list host-name {              // ← Missing in generated NETCONF
      key "host-name";
      leaf host-name { type string; }
      leaf-list ip-list { type inet:ip-address; }
    }
  }
}

File Location

gen/definitions/system.yaml - ip_hosts_vrf attribute definition

Impact

  • IP hosts without VRF work correctly
  • IP hosts with VRF fail during apply

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions