[j-nsp] set:difference() function in SLAX returns different results while input node-sets are the same

Martin T m4rtntns at gmail.com
Fri Sep 7 11:27:38 EDT 2018


Hi!

I encountered an interesting behavior where set:difference() function
does not work when node-set variable is manually defined like this:

var $vlan-range_ := {
    <vlan> {
        <id> "99";
    }
    <vlan> {
        <id> "100";
    }
    <vlan> {
        <id> "101";
    }
    <vlan> {
        <id> "102";
    }
}

However, the set:difference() function works fine if input node-sets
are for example from configuration as shown in "JUNOS AUTOMATION
REFERENCE FOR SLAX 1.0" on page 238. Here is a diff from debugger:
https://i.imgur.com/eygwaGQ.png I would expect both set:difference()
output node-sets to be equal.

What might cause such behavior?


thanks,
Martin


More information about the juniper-nsp mailing list