Jonathan, Phil, thank you for replies! <request-license-save> RPC does what I desire for example in Junos versions 13.3R4.6 and 13.3R9.13 but not in 14.1R7.4. In 14.1 release for example following code:
var $request_system_license_save_cmd = <request-license-save> { <destination> "/tmp/key" ; } var $request_system_license_save_results = jcs:invoke( $request_system_license_save_cmd ); ..creates a file /tmp/key with no content: -rw------- 1 root wheel 0 Nov 25 10:18 key On the other hand, "request system license save /tmp/key" CLI command writes the key into the file. According to "Junos OS 14.1 XML API Operational Developer Reference" the "<request-license-save>" is supported on MX series. Is this a bug? Or am I doing something wrong? thanks, Martin On Wed, Aug 17, 2016 at 1:19 AM, Phil Shafer <p...@juniper.net> wrote: > Martin T writes: >>I have a SLAX script where I execute "request system license save >>ftp://root:passwd@10.11.12.5" command. > > [Background: the UI comes in two pieces. The CLI process handles > terminal I/O, key-bindings, automore, file transfers, and not much > else. The real brain resides in MGD, which understands commands, > RPCs, how to parse them and what to do with them.] > > The "request system license save" command uses both halves. MGD > asks CLI to do the transfer, and then MGD does with real work. > > SLAX scripts use the API directly, so it cannot perform the > file-transfer. > > The fix is to pass a local file name to the "request system license > save" command RPC and then do the transfer explicitly using the > <file-put> RPC. > > Thanks, > Phil _______________________________________________ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp