02-07-2022
08:00 AM
- last edited on
02-16-2022
11:46 AM
by
Paul Zimmerman
I am new to Yang models. I am running an old IOS XR router version 6.2.3. When I run the yang model template below I keep getting "
I have read from the link below that I need to add "interface_configuration.interface_mode_non_physical =xr_ifmgr_cfg.InterfaceModeEnumEnum.default " Just not sure where to add this to. Would this be in the XML if so where, or in some config file.
Please help.
<config>
<interface-configurations
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
<interface-configuration>
<active>act</active>
<interface-name>Bundle-Ether4.{{ carrier_vlan }}{{ cust_vlan_ipsec }}</interface-name>
<description>{{ customer }}</description>
<ipv4-network
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg">
<addresses>
<primary>
<address>{{ hub_wan1_public_ip }}</address>
<netmask>255.255.255.254</netmask>
</primary>
</addresses>
</ipv4-network>
<vlan-sub-configuration
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-cfg">
<vlan-identifier>
<vlan-type>vlan-type-dot1q</vlan-type>
<first-tag>{{ carrier_vlan }}</first-tag>
<second-tag>{{ cust_vlan_ipsec }}</second-tag>
</vlan-identifier>
</vlan-sub-configuration>
</interface-configuration>
</interface-configurations>
</config>
02-24-2022 01:29 PM
Hi @mrjoli021,
As far as I can tell, your subinterface configuration is where you will set this. In your case, it's xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-cfg"
Now, you currently have an XML document there but I believe from what I've seen, I think a YANG doc would work too.
Here is an XR config document using YANG:
https://github.com/YangModels/yang/blob/master/vendor/cisco/xr/534/Cisco-IOS-XR-ifmgr-cfg.yang
Notice the leaf:
leaf interface-mode-non-physical {
xr:xr-xml-map "ifmgr_cfg:InterfaceModeNonPhysical";
type Interface-mode-enum;
default "default";
description "The mode the interface is operating in";
}
That config might not be exactly what you need but I think that is where you will set it.
I might be off, but it seems to match up...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide