Hi.

I have a problem with output xml from op script.
If I output configuration from op script as xml, I see it if use
"| display xml" but see nothing if no pipe.
Where am I wrong?

"op show-dyn-config | display xml" looks like
"show configuration | display xml", I cannot find any diferences 
in tags, but "op show-dyn-config" without pipe displays nothing.

Here's my script:

=====
version 1.0;

ns junos = "http://xml.juniper.net/junos/*/junos";;
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";;
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";;

import "../import/junos.xsl";

match / {
    <op-script-results> {
        var $connection = jcs:open();
        var $conf-req = <rpc> {
                                <open-configuration> {
                                        <dynamic>;
                                }
                        }
        expr jcs:execute($connection, $conf-req);
        var $configuration = jcs:execute($connection, "get-configuration");
        expr jcs:execute($connection, "close-configuration");
        expr jcs:close($connection);
        copy-of $configuration;
    }
}
=====

Thanks.

-- 
Pavel
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp

Reply via email to