Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Trying to merge upstream changes into my fork. #5

Open
wants to merge 601 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 154 commits
Commits
Show all changes
601 commits
Select commit Hold shift + click to select a range
38b459b
[meta] Remove categories:, as it is replaced by galaxy_tags:
bhundven May 20, 2019
753e23e
Fixed issue #434
May 22, 2019
5788dd9
added pkg_set params
Jun 13, 2019
32ff376
pkg_set
Jun 13, 2019
41c47ba
Merge pull request #1 from Juniper/master
Jun 19, 2019
763a18a
adding clarification for ssh_private_key_usage
Jun 19, 2019
d42bea5
fix pkg_set for mixed virtual chassis
Jun 21, 2019
9906bfa
Merge pull request #2 from vnitinv/pkg_set_software
dineshbaburam91 Jun 21, 2019
089f6da
fix for reboot and mixed vc
Jun 24, 2019
f3a5af2
Merge pull request #3 from vnitinv/pkg_set_software
dineshbaburam91 Jun 24, 2019
813653b
added check for files existance
Jun 26, 2019
3fb5583
Merge pull request #4 from vnitinv/pkg_set_software
dineshbaburam91 Jun 26, 2019
d477d48
Merge pull request #437 from dineshbaburam91/pkg_set_software
Jun 26, 2019
513d66e
Merge pull request #438 from ntwrkguru/master
Jun 26, 2019
c36f9c6
vmhost reboot support
Jun 26, 2019
176e73d
Merge pull request #440 from vnitinv/vmhost-reboot-support
Jun 26, 2019
b6765a2
remove requirements.txt file
Aug 20, 2019
e3928ae
removed version of ansible
Aug 20, 2019
eedc381
Merge pull request #435 from rsmekala/get_config_text
rsmekala Sep 3, 2019
2c672a2
Diabled TravisCI, as Ravello subscription is revoked
Sep 4, 2019
00963d4
Deleted unused import
Sep 4, 2019
d08201b
Fixed python3 incompatibilty using ansible module utility
Sep 4, 2019
2aef238
Fix preference order for host: ansible_host>inventory_hostname
Sep 4, 2019
7161989
Merge pull request #453 from rsmekala/python3_rpc
Sep 5, 2019
27f55ab
Merge pull request #451 from dineshbaburam91/cvbc
rsmekala Sep 5, 2019
bab6077
Merge pull request #433 from bhundven/fix_ansible_lint
rsmekala Sep 5, 2019
35c0ed2
Merge pull request #429 from dineshbaburam91/open_config_junos_config
rsmekala Sep 5, 2019
12835cb
Merge branch 'master' into dga-console-ssh
rsmekala Sep 5, 2019
11acaa3
Merge pull request #428 from dgarros/dga-fix-ignore-warning-open-config
rsmekala Sep 5, 2019
812a87f
Merge pull request #427 from marioschaefer/diff-fix
Sep 6, 2019
7fc5bd1
Merge pull request #418 from dgarros/dga-console-ssh
rsmekala Sep 6, 2019
ebd88b3
Prepare to release 2.2.0
Sep 6, 2019
19b03d8
Merge pull request #456 from rsmekala/version_release
Sep 6, 2019
69b0eff
updated docs
Sep 6, 2019
ba70d62
Merge pull request #457 from dineshbaburam91/doc_ansible_2
rsmekala Sep 6, 2019
aab0a22
Merge pull request #416 from rsmekala/awx
rsmekala Sep 6, 2019
8d8809f
Version Upgrade
Sep 6, 2019
2861f86
Merge pull request #458 from dineshbaburam91/version_upgradation
rsmekala Sep 6, 2019
6359ece
prepare to release 2.2.2 dev version
Sep 6, 2019
c642ff7
Merge pull request #459 from dineshbaburam91/dev_version
rsmekala Sep 6, 2019
913c9b3
juniper_junos_config: update doc
Sep 23, 2019
6b0c39b
Moved action plugin code to action_plugins/juniper_junos_common_actio…
Nov 25, 2019
dd656f9
convert_to_bool_func has been replaced with ansible.module_utils.basi…
Nov 25, 2019
8ddc506
Refactored code to remove unused usages, and modified comments
Nov 25, 2019
c220fc0
Minor modifications
Nov 25, 2019
8f42abc
Dropped backward compatibility for Juniper.junos 1.4.3
Nov 25, 2019
f65633d
Updated requirements.txt
Nov 25, 2019
75ba3ca
Added back str compatibility for Python2/Python3
Nov 25, 2019
7572a89
Minor modifications to resolve review comments
Nov 29, 2019
a9e763f
Modified tests to use latest module names
Dec 9, 2019
9a57110
Renamed extension .yaml to .yml
Dec 9, 2019
8b99e09
Merge pull request #467 from rsmekala/action_plugin_mod
Dec 10, 2019
47992aa
Merge pull request #462 from jacek-izykowski/config-update-doc
rsmekala Dec 10, 2019
cfccc22
Added tests for juniper_junos_rpc
Dec 11, 2019
ceab66b
Fixed tests for juniper_junos_rpc
Dec 11, 2019
5048799
Fixed tests for juniper_junos_rpc
Dec 11, 2019
617bfb9
Minor fixes to module_utils.
Dec 11, 2019
24d8e45
Stat the created files instead of the directory
Dec 11, 2019
dce5251
Added UT for juniper_junos_config
Dec 13, 2019
abdffad
Fixed review comments
Dec 13, 2019
40e7aa0
Merge pull request #469 from rsmekala/tests
rsmekala Dec 13, 2019
4850b52
prepare to release 2.3
Dec 13, 2019
79f4713
Merge pull request #471 from rsmekala/2.3
rsmekala Dec 13, 2019
574c751
prepare to release 2.3
Dec 16, 2019
aecddc0
prepare to release 2.3
Dec 16, 2019
909b382
Merge pull request #473 from rsmekala/2.3
Dec 16, 2019
ca54730
Update juniper_junos_table.py
kr3ator Feb 19, 2020
1ec3472
removed python2
Feb 25, 2020
2171f77
Merge pull request #486 from vnitinv/use-python3-from-base-img
Feb 25, 2020
6688a91
Adding support for ansible-collections
rahkumar651991 Mar 4, 2020
412a54e
Adding soft-links to ansible-collection folders
rahkumar651991 Mar 4, 2020
c0f64d4
Merge pull request #485 from kr3ator/master
Mar 5, 2020
4a6f863
Updating galaxy.yaml and removing test cases from collection directory.
rahkumar651991 Mar 5, 2020
c2da2b3
Merging changes for resolving conflict
rahkumar651991 Mar 5, 2020
ef81cd9
Modifying galaxy.yml and updating docs folder location
rahkumar651991 Mar 5, 2020
d43b88f
reverted library folder
rahkumar651991 Mar 5, 2020
16c4b14
Merge remote-tracking branch 'upstream/master'
rahkumar651991 Mar 5, 2020
60da334
single sourced code
rahkumar651991 Mar 5, 2020
6334573
Merge pull request #487 from rahkumar651991/collection_support
Mar 5, 2020
e82ae89
Fix ignore_warning with non-boolean arguments
isometry Feb 12, 2020
c61084e
chnages to make sure odd value is not entertained
Mar 16, 2020
06895d6
Merge pull request #481 from isometry/fix-ignore-warning
Mar 23, 2020
df66f70
Merge pull request #2 from Juniper/master
ntwrkguru Apr 29, 2020
066be56
updated pyez ansible and jsnapy versions
Apr 29, 2020
04b1a56
Clean-up of the master branch for ansible collection as roles moved …
rahkumar651991 Apr 29, 2020
9ee198e
Merge pull request #497 from rahkumar651991/junos_collection
Apr 30, 2020
54d76f0
changes for ansible actions of reboot shutdown to be handled in Pyez
rahkumar651991 May 8, 2020
9127619
Call zeroize function on that action
rahkumar651991 May 8, 2020
e3f9ea2
Adding testcases
rahkumar651991 May 12, 2020
6730a03
Adding vmhost support in juniper_junos_system
rahkumar651991 Jun 22, 2020
aaf6c45
Add error handling for timeout during RPC
rahkumar651991 Jun 24, 2020
310a161
Merge pull request #501 from rahkumar651991/testcase
Jun 30, 2020
7c6283b
Update collection with recent changes done for roles.
rahkumar651991 Jul 5, 2020
a88ef63
Update README.md
rahkumar651991 Jul 6, 2020
731b7cb
Merge pull request #500 from rahkumar651991/ansible_pyez_reboot_sup
Jul 6, 2020
39658ec
Update README.md
routenull0 Jul 6, 2020
32be39d
Merge pull request #510 from routenull0/master
rahkumar651991 Jul 7, 2020
09dfe30
Juniper collection renamed to juniper.junos
rahkumar651991 Jul 7, 2020
1e05b46
Merge branch 'master' of https://github.com/Juniper/ansible-junos-std…
rahkumar651991 Jul 7, 2020
ac7cb6a
Modifying collection name to junipernetworks.device
rahkumar651991 Jul 9, 2020
9534d41
modifying the namespace
rahkumar651991 Jul 9, 2020
17cc876
modifying the namespace
rahkumar651991 Jul 9, 2020
ec154ff
MOdified namespace to juniper.device
rahkumar651991 Jul 9, 2020
43fd15f
updated requirements.txt
Jul 14, 2020
90ed81d
conflict resolution
Jul 14, 2020
a5c030b
Merge branch 'upstream'
Jul 14, 2020
41e33c5
updated Dockerfile and added entrypoint
Jul 14, 2020
487d2fe
updated README and Dockerfile
Jul 14, 2020
04e85bf
Merge pull request #515 from ntwrkguru/master
Aug 4, 2020
7ce036f
Add message for collection under active development
rahkumar651991 Aug 27, 2020
3e0f049
Merge branch 'master' into release_collection
rahkumar651991 Aug 27, 2020
ae2c6a6
Merge branch 'master' of https://github.com/Juniper/ansible-junos-std…
rahkumar651991 Aug 27, 2020
9216ec9
Modified collection name in documentation
rahkumar651991 Aug 27, 2020
fb19f65
Merge branch 'release_collection' of https://github.com/rahkumar65199…
rahkumar651991 Aug 27, 2020
9fa7293
Merge pull request #511 from rahkumar651991/release_collection
dineshbaburam91 Aug 27, 2020
70c57d9
adding ssh-client
Oct 6, 2020
9d1c271
updated README and added openssh-client
Oct 6, 2020
95d55c5
cleaned up README per markdown guidelines
Oct 6, 2020
2f621c3
changed maintainer to community netdev
Oct 6, 2020
6864c53
adding ssh-client
Oct 6, 2020
b2a6e16
Merge branch 'master' into add-ssh
Oct 6, 2020
e45bc6f
Changes being done for persistent connection in collections
rahkumar651991 Nov 5, 2020
9b8f627
pinned Ansible role to 2.4.3
Nov 6, 2020
620eb72
Update README.md
rahkumar651991 Nov 6, 2020
47c57c6
Merge pull request #524 from ntwrkguru/add-ssh
rahkumar651991 Nov 6, 2020
dc89493
roles is installed for specific version with a comma
rahkumar651991 Nov 9, 2020
f073337
Merge pull request #531 from rahkumar651991/docker_roles
dineshbaburam91 Nov 9, 2020
62447ab
Changes to support persistent connection for config and system modules
rahkumar651991 Nov 29, 2020
8e0bb3d
Sample files added for collection
rahkumar651991 Nov 30, 2020
80ca3db
Fixed Documentation, facts parameter and licence details
rahkumar651991 Dec 10, 2020
a85843c
Junos sw imported
rahkumar651991 Dec 10, 2020
358afd8
Sample files modified
rahkumar651991 Dec 11, 2020
7e7b785
Resolving the review comments
rahkumar651991 Dec 11, 2020
539d5e1
Merge pull request #534 from rahkumar651991/persistent_conn
dineshbaburam91 Dec 13, 2020
a1607e5
Pass user credentials in vars
rahkumar651991 Jan 4, 2021
7c1606e
Merge pull request #536 from rahkumar651991/persistent_conn
Jan 5, 2021
58f0a0c
Jsnapy related fixes for collections.
rahkumar651991 Jan 18, 2021
57319d4
Documentation related changes for the ansible collection
rahkumar651991 Feb 23, 2021
cb6887c
version modified to newer version
rahkumar651991 Feb 27, 2021
1b30392
Modifying typing mistake in conf.py
rahkumar651991 Feb 27, 2021
a0f456a
snapcheck to pass file name PRE
rahkumar651991 Feb 27, 2021
ce1011f
Merge pull request #537 from rahkumar651991/jsnapy_fix
dineshbaburam91 Feb 27, 2021
0f8fe24
Modifiying the package details in ansible collection for setup file
rahkumar651991 Mar 3, 2021
13de9d0
Merge pull request #541 from rahkumar651991/readthedocs
dineshbaburam91 Mar 3, 2021
e97e8d5
Modifiying the requirements in ansible collection for setup file
rahkumar651991 Mar 3, 2021
7e04705
Merge pull request #542 from rahkumar651991/readthedocs
dineshbaburam91 Mar 3, 2021
da2a32d
Modifiying the package details in ansible collection for setup file
rahkumar651991 Mar 3, 2021
9066938
Merge pull request #543 from rahkumar651991/readthedocs
dineshbaburam91 Mar 3, 2021
773f071
Modifiying the requirements in ansible collection for setup file
rahkumar651991 Mar 3, 2021
20dcaab
Merge pull request #544 from rahkumar651991/readthedocs
dineshbaburam91 Mar 3, 2021
29dc56d
Modifying collection documentation parameters
rahkumar651991 Mar 8, 2021
2decd63
Merge branch 'master' of https://github.com/Juniper/ansible-junos-std…
rahkumar651991 Mar 8, 2021
e37c183
Merge pull request #546 from rahkumar651991/readthedocs
dineshbaburam91 Mar 9, 2021
c4f5cf8
Removing provider from the readthedocs for collection
rahkumar651991 Mar 24, 2021
5f43fea
Adding support for variables to be passed in vars
rahkumar651991 Mar 31, 2021
b8cad08
Adding alias for the parameters
rahkumar651991 Apr 12, 2021
ad4f6f3
Readthedocs related changes to generate inndex file properly
rahkumar651991 Apr 16, 2021
456475f
Merge pull request #547 from rahkumar651991/provider_documentation_fix
Apr 16, 2021
a6ea123
PyEZ related version changes
rahkumar651991 Apr 22, 2021
993173e
Merge pull request #550 from rahkumar651991/provider_documentation_fix
dineshbaburam91 Apr 22, 2021
ff7bffb
Version related changes
rahkumar651991 Apr 23, 2021
72e2b96
Merge pull request #551 from rahkumar651991/provider_documentation_fix
rahkumar651991 Apr 23, 2021
28a721f
Modifying to dev version after release
rahkumar651991 Apr 23, 2021
dfe476a
Merge pull request #552 from rahkumar651991/provider_documentation_fix
rahkumar651991 Apr 23, 2021
83f508c
Collection path modified in Dockerfile
rahkumar651991 May 31, 2021
82481e2
Etree import modification
rahkumar651991 Jun 1, 2021
73b00d0
Adding allow_bool for rpc and enhancing log error
rahkumar651991 Aug 28, 2021
757709a
Merge pull request #564 from rahkumar651991/allow_bool_values
dineshbaburam91 Aug 30, 2021
0773318
Merge pull request #557 from rahkumar651991/collection_docker
dineshbaburam91 Aug 30, 2021
aa33d23
Merge pull request #558 from rahkumar651991/etree_issue
dineshbaburam91 Aug 30, 2021
f89532f
Change release version
rahkumar651991 Aug 31, 2021
44bb5cc
link to requirements.txt in root folderthis is so that when ansible-b…
Sep 24, 2021
52f7169
Update version.py
rahkumar651991 Oct 5, 2021
26ed2c9
Merge pull request #566 from rahkumar651991/release_1.0.1
dineshbaburam91 Oct 5, 2021
cc6a691
Adding runtime.yml as required by ansible
rahkumar651991 Oct 6, 2021
0163d29
Merge pull request #571 from rahkumar651991/meta_dir
dineshbaburam91 Oct 6, 2021
a8196af
Pull request for roles being merged in collection
rahkumar651991 Oct 11, 2021
4a11b2b
Merge pull request #570 from tobiasjohanssonsdnit/dependencies_for_ex…
rahkumar651991 Oct 11, 2021
442ada3
Merge pull request #572 from rahkumar651991/pull_request_merge
rahkumar651991 Oct 11, 2021
49b0904
accounting for deprecation of yaml.load() function
cdot65 Jan 10, 2022
cedb09c
Merge pull request #581 from cdot65/master
dineshbaburam91 Apr 29, 2022
9f6f475
fix timeout
Jul 14, 2022
0cdae0e
fix timeout
Jul 14, 2022
8727808
Merge branch 'ansible582_branch' of https://github.com/apurvaraghu/an…
Jul 14, 2022
5ddf63d
Merge pull request #588 from apurvaraghu/ansible582_branch
dineshbaburam91 Jul 14, 2022
058ab64
Added changelogs
dineshbaburam91 Oct 10, 2022
e0a5e79
"Introduced commit_sync and commit_force_sync paramater under juniper…
dineshbaburam91 Oct 12, 2022
aff9d2b
Merge pull request #596 from dineshbaburam91/changelogs1
ydnath Oct 31, 2022
2333ffe
Merge pull request #597 from dineshbaburam91/commit_sync
ydnath Oct 31, 2022
e1a0523
updated test playbooks (#598)
chidanandpujar Oct 31, 2022
b3a3490
updated test playbooks
chidanandpujar Nov 3, 2022
60547b6
updated test playbooks
chidanandpujar Nov 3, 2022
9375ab6
updated test playbooks
chidanandpujar Nov 11, 2022
fb1d768
updated test playbooks
chidanandpujar Nov 11, 2022
90ccf26
Ansible v1.0.2 release update
chidanandpujar Nov 15, 2022
06f1f54
Merge pull request #600 from chidanandpujar/test_playbooks
dineshbaburam91 Nov 15, 2022
d8280b5
Merge pull request #602 from chidanandpujar/ansible_v102_release_update1
dineshbaburam91 Nov 15, 2022
518c909
Fix for sphinx build failure
chidanandpujar Nov 16, 2022
d661321
Merge pull request #603 from chidanandpujar/ansible_release_v102_update2
chidanandpujar Nov 17, 2022
e3f6fca
Fix for issue #613 (#617)
chidanandpujar Aug 2, 2023
df8c834
fix for issue #612 (#628)
chidanandpujar Sep 28, 2023
efff541
fix for issue #621 (#627)
chidanandpujar Sep 28, 2023
4f47c50
apply fix for issue #592 - pass through auth command line arguments (…
cmason3 Oct 11, 2023
bd6d0b3
Fix for issue #620 (#632)
chidanandpujar Oct 17, 2023
9050a2e
Fix for issue #630 (#631)
chidanandpujar Oct 17, 2023
540d40b
playbook to install image on VC member id (#629)
chidanandpujar Oct 26, 2023
290e339
1. Supported config mode : private, batch, dynamic, exclusive. (#635)
dineshbaburam91 Jan 8, 2024
cf07c23
issue587 (#636)
apurvaraghu Jan 24, 2024
0cef75e
Issue:

commit_configuration API parameters are missing in ansible Py…
dineshbaburam91 Jan 25, 2024
9e39e00
Ansible collection v1.0.3 release (#640)
dineshbaburam91 Jan 25, 2024
572d81b
Updated ansible rpc testcase playbook (#651)
dineshbaburam91 Apr 27, 2024
a0c04b5
Fixed Ansible Functional testcases (#645)
dineshbaburam91 Apr 27, 2024
a1036e6
Fixed functional testcases for ping and pmutd playbook (#646)
dineshbaburam91 Apr 29, 2024
e28c8e4
Fix for pb.juniper_junos_jsnapy.yml (#650)
chidanandpujar Apr 29, 2024
da7a2fb
Fix for play pb.juniper_junos_software_member.yml (#649)
chidanandpujar Apr 29, 2024
7df7dcf
Fix for Object of type function is not JSON serializable (#647)
chidanandpujar Apr 29, 2024
de15a23
Fixed pb.juniper_junos_srx_cluster.yml (#652)
chidanandpujar Apr 29, 2024
cad7da7
Fix for ReadMe (#653)
chidanandpujar Apr 30, 2024
f40bf37
Ansible Collection v1.0.4 release update (#654)
chidanandpujar Apr 30, 2024
abd0239
v1.0.4 release update (#655)
chidanandpujar Apr 30, 2024
8878940
Fix for readthedoc build failures (#656)
chidanandpujar Apr 30, 2024
4a90660
Doc build fix2 (#658)
chidanandpujar Apr 30, 2024
485b3c3
Doc build fix3 (#659)
chidanandpujar Apr 30, 2024
6073106
Updated commit_configuration API parameter for PyEZ connection. (#661)
dineshbaburam91 May 8, 2024
0b6195e
handling ansible.module_utils.connection.ConnectionError (#662)
chidanandpujar May 14, 2024
9fa948c
Fix for issue #580 (#663)
chidanandpujar May 14, 2024
3670c21
Fixed ansible playbook coding style issue using ansible-lint tool (#664)
dineshbaburam91 May 16, 2024
ff81c02
Fix for the issue #607 (#665)
chidanandpujar May 17, 2024
08e3376
Introduced a new module file_copy (#666)
dineshbaburam91 May 20, 2024
5c50735
Fix for netconf timeout (#667)
chidanandpujar May 22, 2024
b15439e
Ansible Collection v1.0.5 Release update (#669)
chidanandpujar May 22, 2024
9e1c8bc
Release v105 update1 (#670)
chidanandpujar May 22, 2024
e19dc9f
Fix for issue #674 syntax warnings (#675)
chidanandpujar Jun 28, 2024
9075bf5
fix for issue #672 to handle float values (#673)
chidanandpujar Jun 28, 2024
b1aa8c4
Fixed rpd module related issue (#677)
dineshbaburam91 Jul 17, 2024
c9fbb09
tests for jsnapy dest_dir support (#682)
chidanandpujar Aug 5, 2024
b90771b
support to save the failed tests to dest_dir for local and pyez conne…
chidanandpujar Aug 5, 2024
af07e24
Release v1.0.6 update (#683)
chidanandpujar Aug 5, 2024
97e40ea
Fixed typo results changed results_loc (#684)
chidanandpujar Aug 6, 2024
b69231d
Fix for import error (#685)
chidanandpujar Aug 6, 2024
fab695d
fix for ping packet loss in float (#686)
chidanandpujar Aug 27, 2024
bc4ff8e
release v1.0.6 update (#689)
chidanandpujar Aug 27, 2024
c0443f6
Fix galaxy.yml "documentation" link (#692)
ryeleo Oct 1, 2024
594e805
Fix version extraction from filename for ex2300 firmware (fixes #694)…
Yannik Nov 11, 2024
576b32b
whitespace removal (#699)
dineshbaburam91 Nov 12, 2024
430ac07
Fixed Sanity test issues (#701)
dineshbaburam91 Nov 26, 2024
5693e84
ansible v1.0.7 release update (#702)
chidanandpujar Dec 5, 2024
f290e11
Fix for JSON response handle (#703)
chidanandpujar Dec 6, 2024
454f137
Dockerfile update (#707)
chidanandpujar Dec 18, 2024
dc5e659
release v1.0.7 update (#708)
chidanandpujar Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM juniper/pyez:2.0.1
MAINTAINER [email protected]

WORKDIR /tmp
RUN mkdir /tmp/ansible-junos-stdlib &&\
mkdir /tmp/ansible-junos-stdlib/library &&\
mkdir /tmp/ansible-junos-stdlib/meta &&\
mkdir /project

ADD library /tmp/ansible-junos-stdlib/library
ADD meta /tmp/ansible-junos-stdlib/meta

RUN tar -czf Juniper.junos ansible-junos-stdlib &&\
apk update && apk add ca-certificates &&\
apk add build-base gcc g++ make python-dev &&\
pip install junos-netconify &&\
pip install jxmlease &&\
pip install ansible &&\
ansible-galaxy install Juniper.junos &&\
apk del -r --purge gcc make g++ &&\
rm -rf /source/* &&\
rm -rf /var/cache/apk/* &&\
rm -rf /tmp/*

WORKDIR /project
65 changes: 51 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,52 @@ Juniper Networks provides support for using Ansible to deploy devices running th

## OVERVIEW OF MODULES

- junos_get_facts — Retrieve device-specific information from the host.
- junos_rpc — To execute RPC on device and save output locally
- junos_cli — To execute CLI on device and save output locally
- junos_commit — Commit candidate configuration on device.
- junos_get_config — Retrieve configuration of device.
- junos_get_facts — Retrieve device-specific information from the host.
- junos_install_config — Modify the configuration of a device running Junos OS.
- junos_install_os — Install a Junos OS software package.
- junos_rollback — Rollback configuration of device.
- junos_shutdown — Shut down or reboot a device running Junos OS.
- junos_srx_cluster — Enable/Disable cluster mode for SRX devices
- junos_zeroize — Remove all configuration information on the Routing Engines and reset all key values on a device.
- junos_get_table - Retrieve data from a Junos device using Tables/Views
- junos_ping - execute ping on junos devices
- junos_jsnapy - Integrate JSNAPy to ansible which helps audit network devices

### OVERVIEW OF PLUGINS

In addition to the modules listed above, a callback_plugin `jsnapy` is available for the module `junos_jsnapy`.

The callback_plugin `jsnapy` helps to print on the screen additional information regarding
jsnapy failed tests.
For each failed test, a log will be printed after the RECAP of the playbook.

> The plugin `jsnapy` is currently in **Experimental** stage, please provide feedback.

```
PLAY RECAP *********************************************************************
qfx10002-01 : ok=3 changed=0 unreachable=0 failed=1
qfx10002-02 : ok=3 changed=0 unreachable=0 failed=1
qfx5100-01 : ok=1 changed=0 unreachable=0 failed=1

JSNAPy Results for: qfx10002-01 ************************************************
Value of 'peer-state' not 'is-equal' at '//bgp-information/bgp-peer' with {"peer-as": "65200", "peer-state": "Active", "peer-address": "100.0.0.21"}
Value of 'peer-state' not 'is-equal' at '//bgp-information/bgp-peer' with {"peer-as": "60021", "peer-state": "Idle", "peer-address": "192.168.0.1"}
Value of 'oper-status' not 'is-equal' at '//interface-information/physical-interface[normalize-space(admin-status)='up' and logical-interface/address-family/address-family-name ]' with {"oper-status": "down", "name": "et-0/0/18"}

JSNAPy Results for: qfx10002-02 ************************************************
Value of 'peer-state' not 'is-equal' at '//bgp-information/bgp-peer' with {"peer-as": "65200", "peer-state": "Active", "peer-address": "100.0.0.21"}
```

Callback plugins are not activated by default and needs to be manually added to the
configuration file under `[defaults]` with the variable `callback_whitelist`
```
[defaults]
callback_whitelist = jsnapy
```
## DOCUMENTATION

[Official documentation](http://www.juniper.net/techpubs/en_US/release-independent/junos-ansible/information-products/pathway-pages/index.html) (detailed information, includes examples)
Expand All @@ -30,19 +66,17 @@ To download the junos role to the Ansible server, execute the ansible-galaxy ins

```
[root@ansible-cm]# ansible-galaxy install Juniper.junos
downloading role 'junos', owned by Juniper
no version specified, installing 1.0.0
- downloading role from
https://github.com/Juniper/ansible-junos-stdlib/archive/1.0.0.tar.gz
- extracting Juniper.junos to /etc/ansible/roles/Juniper.junos
Juniper.junos was installed successfully
- downloading role 'junos', owned by Juniper
- downloading role from https://github.com/Juniper/ansible-junos-stdlib/archive/1.3.1.tar.gz
- extracting Juniper.junos to /usr/local/etc/ansible/roles/Juniper.junos
- Juniper.junos was installed successfully
```

### Git clone
For testing you can `git clone` this repo and run the `env-setup` script in the repo directory:

user@ansible-junos-stdlib> source env-setup

This will set your `$ANSIBLE_LIBRARY` variable to the repo location and the installed Ansible library path. For example:

````
Expand Down Expand Up @@ -100,12 +134,15 @@ Thes modules require the following to be installed on the Ansible server:
## LICENSE

Apache 2.0

## CONTRIBUTORS

- Jeremy Schulman (@nwkautomaniac), Core developer
- Rick Sherman (@shermdog01)
- Nitin Kumar (@vnitinv)
- Patrik Bok
- Ashley Burston
Juniper Networks is actively contributing to and maintaining this repo. Please contact [email protected] for any queries.

*Contributors:*

[Nitin Kumar](https://github.com/vnitinv), [Stacy W Smith](https://github.com/stacywsmith), [David Gethings](https://github.com/dgjnpr)

*Former Contributors:*

[Jeremy Schulman](https://github.com/jeremyschulman), [Rick Sherman](https://github.com/shermdog)
74 changes: 74 additions & 0 deletions callback_plugins/jsnapy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import collections
import os
import time
import pprint
import json

from ansible.plugins.callback import CallbackBase
from ansible import constants as C

class CallbackModule(CallbackBase):
"""
This callback add extra logging for the module junos_jsnapy .
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'jsnapy'

## useful links regarding Callback
## https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/__init__.py

def __init__(self):
self._pp = pprint.PrettyPrinter(indent=4)
self._results = {}

super(CallbackModule, self).__init__()

def v2_runner_on_ok(self, result):
"""
Collect test results for all tests executed if module is junos_jsnapy
"""

## Extract module name
module_name = ''
if 'invocation' in result._result:
if 'module_name' in result._result['invocation']:
module_name = result._result['invocation']['module_name']

if module_name == 'junos_jsnapy':
## Check if dict entry already exist for this host
host = result._host.name
if not host in self._results.keys():
self._results[host] = []

self._results[host].append(result)

def v2_playbook_on_stats(self, stats):

## Go over all results for all hosts
for host, results in self._results.iteritems():
has_printed_banner = False
for result in results:
# self._pp.pprint(result.__dict__)
res = result._result
if res['final_result'] == "Failed":
for test_name, test_results in res['test_results'].iteritems():
for testlet in test_results:
if testlet['count']['fail'] != 0:

if not has_printed_banner:
self._display.banner("JSNAPy Results for: " + str(host))
has_printed_banner = True

for test in testlet['failed']:
self._display.display(
"Value of '{0}' not '{1}' at '{2}' with {3}".format(
str(testlet['node_name']),
str(testlet['testoperation']),
str(testlet['xpath']),
json.dumps(test['post'])),
color=C.COLOR_ERROR)
Loading