Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jcs:open fails in commit script #32

Open
philshafer opened this issue Apr 26, 2016 · 0 comments
Open

jcs:open fails in commit script #32

philshafer opened this issue Apr 26, 2016 · 0 comments
Assignees
Labels

Comments

@philshafer
Copy link
Contributor

[From Satya]

 * Where as within "commit" scripts its unable to open connection handle with
   the remote server.

Working case: op script

[dsatya-mbp:~/scripts] dsatya% more sample_op.slax

version 1.1;

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

var $connection = jcs:open();

match / {

   <op-script-results> {

       var $result = jcs:execute($connection, "get-software-information");

       copy-of $result;

   }

}

[dsatya-mbp:~/scripts] dsatya% juise [email protected] sample_op.slax

Password

 <software-information>

bng-ui-vm-83

olive

olive

16.1I20160423_0422_dsatya

...

Non working case: commit script

=================

[dsatya-mbp:~/scripts] dsatya% more sample.slax

version 1.1;

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

var $connection = jcs:open();

match configuration {

   <change> {

        <system> {

             <domain-name> "new.example.com";

        }

   }

   var $result = jcs:execute($connection, "get-interface-information");

   copy-of $result;

}

[dsatya-mbp:~/scripts] dsatya%

[dsatya-mbp:~/scripts] dsatya% juise -c --output-format compare
[email protected] sample.slax

Password

unknown tag: 'interface-information' (ignored)

unknown tag: 'interface-information' (ignored)

rpc execution failedSession for server "" does not exist

[dsatya-mbp:~/scripts] dsatya%

Thanks,
Satya

@philshafer philshafer self-assigned this Apr 26, 2016
@philshafer philshafer added the bug label Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant