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

Fix junos confirm-commit issue and check mode issue #239

Merged
merged 2 commits into from
Jun 16, 2018

Conversation

ganeshrn
Copy link
Contributor

Fixes #238

  • As per Juniper documentation the correct xml tag for commit rpc
    is commit-configuration and not commit.
  • Add support for check mode

Before in case commit is not issued after confirm commit.
Device logs show rollback happens immediately

user@junos# show | compare rollback ?
Possible completions:
  0                    2018-06-14 04:59:12 UTC by junos via netconf
  1                    2018-06-14 04:59:07 UTC by junos via netconf commit confirmed, rollback in 0mins

After the patch in this PR is applied

[edit]

Broadcast Message from user@junos
        (no tty) at 5:41 UTC...

Commit was not confirmed; automatic rollback complete.

user@junos# show | compare rollback ?
Possible completions:
  0                    2018-06-14 05:41:40 UTC by root via other
  1                    2018-06-14 05:39:39 UTC by user via netconf commit confirmed, rollback in 2mins

Fixes ncclient#238

*  As per Juniper documentation the correct xml tag for commit rpc
   is `commit-configuration` and not `commit`.
*  Add support for `check` mode

Before in case commit is not issued after confirm commit.
Device logs show rollback happens immediately
```
user@junos# show | compare rollback ?
Possible completions:
  0                    2018-06-14 04:59:12 UTC by junos via netconf
  1                    2018-06-14 04:59:07 UTC by junos via netconf commit confirmed, rollback in 0mins
```

After the patch in this PR is applied
```
[edit]

Broadcast Message from user@junos
        (no tty) at 5:41 UTC...

Commit was not confirmed; automatic rollback complete.

user@junos# show | compare rollback ?
Possible completions:
  0                    2018-06-14 05:41:40 UTC by root via other
  1                    2018-06-14 05:39:39 UTC by user via netconf commit confirmed, rollback in 2mins
```
@ganeshrn
Copy link
Contributor Author

Similar fix was raised some time back #37 but was closed.

@vnitinv Can you please review this PR

@coveralls
Copy link

coveralls commented Jun 16, 2018

Coverage Status

Coverage increased (+0.7%) to 69.011% when pulling 0316d58 on ganeshrn:junos_confirm_commit_fix into 1b06ad0 on ncclient:master.

@einarnn einarnn merged commit 76d274b into ncclient:master Jun 16, 2018
@ganeshrn ganeshrn deleted the junos_confirm_commit_fix branch June 29, 2018 06:50
stephanerobert pushed a commit to stephanerobert/fake-switches that referenced this pull request Aug 17, 2018
Updating dependencies caused some xml to fail.
Needed to change commit to commit-configuration because of:
ncclient/ncclient#239
stephanerobert pushed a commit to stephanerobert/fake-switches that referenced this pull request Aug 29, 2018
Updating dependencies caused some xml to fail.
Needed to change commit to commit-configuration because of:
ncclient/ncclient#239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants