[j-nsp] JunOScript question

Joe Lin jlin at doradosoftware.com
Fri Jun 13 17:45:53 EDT 2003

When did it start to default to candidate configuration?

-----Original Message-----
From: juniper-nsp-bounces at puck.nether.net
[mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Phil Shafer
Sent: Friday, June 13, 2003 8:36 AM
To: Harshit Kumar
Cc: juniper-nsp at puck.nether.net; Neil Stirling
Subject: Re: [j-nsp] JunOScript question 

Harshit Kumar writes:
>Try this ...
> <get-configuration> <configuration> <policy-options/> </configuration>
>To get "show config interfaces" do this 
> <get-configuration> <configuration> <interfaces/> </configuration>

You'll need to add database="commited" to get same output
as "show configuration ...". It defaults to the candidate
configuration database.

  <get-configuration database="commited">

>I missed one point. How do I get a portion of the configuration in XML

I'm a bit rusty on the perl stuff, but it looks like you just need:

 $jnx->get_configuration(database => "commited", configuration = $dom);

where $dom is a dom tree containing "<configuration> <policy-options/>

(Which is a bit tacky. We should be able to make it just:

 $jnx->get_configuration(database => "commited", configuration =

I'll confirm this and PR it if need be.)

juniper-nsp mailing list juniper-nsp at puck.nether.net

More information about the juniper-nsp mailing list