08-06-2020 03:44 AM
I want to create as many loopbacks as defined, like 1 till 10, how can I accomplish that with YANG and XML, for instance in a foreach loop, without code.
leaf loopback_amount {
tailf:info "Amount of loopbacks";
type uint32 {
range "1..10";
}
mandatory true;
}
<interface xmlns="urn:ios">
<Loopback>
<name>{/int_name}</name>
<ip-vrf>
<ip>
<vrf>
<forwarding>{/vrf_id}</forwarding>
</vrf>
</ip>
</ip-vrf>
<ip>
<address>
<primary>
<address>10.1.1.</ip_add></address>
<mask>255.255.255.255</mask>
</primary>
</address>
</ip>
</Loopback>
Solved! Go to Solution.
08-06-2020 05:13 AM
Where do you plan to take the ip from?
08-06-2020 05:13 AM
Where do you plan to take the ip from?
08-06-2020 05:24 AM
from the yang file. and later from external ipam
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