[j-nsp] Commit script paths

Richard A Steenbergen ras at e-gerbil.net
Fri Apr 6 19:50:10 EDT 2007


Maybe I'm missing something really obvious here, but how do you change 
your current context (dot) to the top level in commit scripts (slax 
specifically)?

Say for example:

    for-each (protocols/bgp/group/neighbor[peer-as != 1234]) {
        some code here;
    }

    /* . has now been changed to protocols/bgp/group/neighbor */

    call jcs:emit-change($tag = 'transient-change', $dot = ???????) {
        path is wrong here, still in protocols/bgp/group/neighbor
    }

How could you specify something like "/policy-options" as the dot, without 
having to go ../../../..? I've tried everything I could think of which 
might be obvious, "policy-options" "/policy-options" "/" "root" 
"configuration" with and without quotes, and nothing seems to work. Every 
example commit script seems to deal with moving down in the path, or up 
one branch, but nothing seems to actually reset to root. :)

-- 
Richard A Steenbergen <ras at e-gerbil.net>       http://www.e-gerbil.net/ras
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC)


More information about the juniper-nsp mailing list