Commit graph

11 commits

Author SHA1 Message Date
Kedar K
465fe5802b -Fixes JSON parsing(use JSON object instead of string) for facts modules. (#31818) 2017-10-23 17:48:52 +05:30
Ganesh Nalawade
88da95bb77 Fix rollback in junos_config (#31424)
* Fix rollback in junos_config

Fixes #30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test
2017-10-11 10:25:56 +05:30
dteach
ca56a248d8 junos_facts: Add Hardware facts. (#30304)
* Add Routing Engine Facts

 - Map routing engine output information to routing_engines facts dict.
 - Add fact 'has_2RE', which is a quick way to determine how many REs
   the chassis has.

* Fix a typo

* Fix more typos

* Add slot number to routing_engine dict

* Add facts about the installed chassis modules

* Fix typo

* Fixed another typo

* Fix Path

* Change path again.

* More Typos

* Add some deubgging

* Add additional information for hardware components.

 - Return information about the Routing Engines.
 - Return a fact to easily determine if the device
   has two routing engines.
 - Return information about the hardware modules.

* Addressed pep8 stardard failures.

* Add unit test fixtures.

* Rename fixture.

* Fix unit test failures.

 - Rename the fixture file to what the unit test expects.
 - Strip out junos namespace attributes.
Rename file to match what the unit test expects.

* Scrubbed the routing engine serial numbers.

* Add unit test facts for new tests.

 - Add unit test for ansible_net_routing_engines fact
 - Add unit test for ansible_net_modules fact
 - Add unit test for ansible_net_has_2RE

* Fixed spacing.
2017-09-20 12:43:07 +05:30
Ganesh Nalawade
e14e37ee1e Fix junos unit test failures (#26676)
*  Use lxml api's in unit test to parse xml
*  Remove unwanted import in unit test
*  Add ncclient dependency in unit test requirement
2017-07-12 08:36:16 -07:00
Ganesh Nalawade
be89ef3eb6 junos_linkagg implementation and junos modules refactor (#26587)
* junos_linkagg implementation and junos modules refactor

*  junos_linkagg implementation
*  junos_linkagg integration test
*  net_linkagg integration test for junos
*  decouple `load_config` and `commit` operations,
   to allow single commit (in case on confirm commit) and
   to perform batch commit (multiple `load_config` followed by single
   `commit`)
*  Other related refactor

* Fix CI issues

* Fix unit test failure
2017-07-11 09:52:53 +05:30
Ganesh Nalawade
0e756a1cf9 Add junos unit test case (#24249)
* Add junos modules unit test case

* Fix CI issues
2017-05-03 22:36:23 +05:30
Ganesh Nalawade
9c4daded94 Add junos_config unit test (#24005) 2017-04-27 20:37:15 +05:30
Ganesh Nalawade
1cdfcf0bb9 Add junos_command module unit test (#23819)
* Add junos_command module unit test
2017-04-21 18:23:40 +05:30
Peter Sprygada
3f0f7c4f4e updates junos shared lib and action handler (#22541)
* removes cli functions from shared lib
* adds cli functions to junos_netconf module
* statically pins junos_netconf to cli transport
* all other modules use netconf transport
* adds command rpc function to junos shared
2017-03-12 08:37:45 -05:00
Peter Sprygada
02d2b753db refactors junos modules to support persistent socket connections (#21365)
* updates junos_netconf module
* updates junos_command module
* updates junos_config module
* updates _junos_template module
* adds junos_rpc module
* adds junos_user module
2017-02-16 10:53:03 -05:00
Ganesh Nalawade
b67f50570e Add unit testcase for junos_command module (#20034)
* Add unit testcase for junos_command module
* Mock third party module import
* Remove third party module requirements
2017-01-25 10:31:28 -05:00