Commit graph

14 commits

Author SHA1 Message Date
Ganesh Nalawade
3d63ecb6f3
Refactor junos modules to Use netconf and cliconf plugins (#32621)
* Fix junos integration test fixes as per connection refactor (#33050)

Refactor netconf connection plugin to work with netconf plugin

* Fix junos integration test fixes as per connection refactor (#33050)

Refactor netconf connection plugin to work with netconf plugin
Fix CI failure
Fix unit test failure
Fix review comments
2017-11-24 12:04:47 +05:30
Corban Johnson
d9a52db17d Adding RPC attribute parameters to junos_rpc network module (#32649)
* Adding RPC attribute arguments to `junos_rpc` network module.

* Specifying module argument version.

* Fixing DOCUMENTATION block.

* First attempt at new test fixture.

* Updated RPC_CLI_MAP.

* Use `result` instead of `reply`.
2017-11-21 10:45:13 +05:30
Pilou
a5c9726502 Unit tests: share common code (#31456)
* move set_module_args to units.modules.utils
* unit tests: reuse set_module_args
* unit tests: mock exit/fail_json in module.utils.ModuleTestCase
* unit tests: use module.utils.ModuleTestCase
* unit tests: fix 'import shadowed by loop variable'
2017-11-17 09:17:07 -08:00
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