Commit graph

19 commits

Author SHA1 Message Date
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
David Newswanger
b818e986b6 Change network *_user modules to use configured_password to set a users password (#28187)
* WIP, update eos_user args

* refactor password for ios_user

* add eos tests, fix ios tests

* fixed password check

* refactor iosxr_user password

* fixed password arg for nxos

* [WIP] fix vyos_user password

* fix vyos tests

* update docs for net_user

* fix typo

* fix eos tests

* add warning when attempting to use password arg

* fix sanity/unit tests

* fix eos unit tests

* fix vyos_user aggregate

* fix typo in eos documentation string

* re add configured_password to vyos tests after rebase
2017-08-17 19:06:44 +05:30
Trishna Guha
b81882e2a8 vyos_static_route implementation module (#26426)
* vyos_static_route implementation module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add vyos_static_route implementation module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* modify vyos_static_route

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* integration test vyos_static and net_static_route

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix typo integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* modify vyos_static_route

* modify integration test

* vyos_static_route doc build fix

* fix integration test data

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update net_static_route cli test set

* minor fix
2017-07-10 16:34:56 +05:30
Trishna Guha
ad3fe08aae fix vyos_banner multiline string issue (#26383)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-07-04 14:31:18 +05:30
Trishna Guha
1b427aa419 Fix vyos banner idempotent (#26338)
* fix vyos_banner idempotent

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix vyos_banner unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-07-03 13:08:08 +05:30
Trishna Guha
93bbcd8a32 vyos_user fix idempotent (#26289)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-30 19:44:08 +05:30
Trishna Guha
34eca3816d fix vyos_user configuration (#26166)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-28 12:13:27 +05:30
Trishna Guha
947e9aba45 Add vyos_banner implementation module (#25862)
* Add vyos_banner implementation module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* vyos_banne integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* vyos_banner unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* minor fix on banner text

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-20 08:53:03 +05:30
Trishna Guha
b3c22a96bd Add vyos_user implementation module (#25677)
* Add vyos_user implementation module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Integration test for vyos_user

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Make state absent work

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Unit test for vyos_user

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Standardize user names

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Modify integration test with idempotent case

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add role as alias to level

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-15 22:06:18 +05:30
Nathaniel Case
f52dcef7ba Actually check for equality on empty commands array (#25308) 2017-06-06 09:56:44 -04:00
Dag Wieers
4efec414e7 test/: PEP8 compliancy (#24803)
* test/: PEP8 compliancy

- Make PEP8 compliant

* Python3 chokes on casting int to bytes (#24952)

But if we tell the formatter that the var is a number, it works
2017-05-30 18:05:19 +01:00
Nathaniel Case
fc0bf87c20 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests
2017-04-27 11:08:37 -04:00
Matt Clay
a5e3d13adc Remove shebangs from unit tests. 2017-02-27 17:53:10 -08:00
Peter Sprygada
8adb108aa9 updates vyos modules to use socket connection (#21228)
* updates all vyos modules to use socket connection
* adds vyos local action handler
* adds exec_command() to vyos
* updates vyos_config local action
* update unit test cases
* add base class for testing vyos modules
2017-02-13 10:41:22 -05:00
Matt Clay
189fee4853 Fix vyos unit tests. 2017-02-07 15:21:34 -08:00
Nathaniel Case
530701b398 Vyos system module (#21060)
* vyos_system tests

* Merge vyos_system fixture with vyos_config fixture
2017-02-07 12:04:14 -05:00
Nathaniel Case
1718719d77 vyos_facts 2.3 (#20939)
* Update vyos_facts documentation

* Replace runner for run_commands

* vyos_facts tests

* Update documentation

* vyos_facts is supported by core
2017-02-02 14:45:06 -05:00
Nathaniel Case
d87fc9605f vyos_config 2.3 (#20577)
* Rename vyos2 over vyos

* Update vyos_config to LocalAnsibleModule

Change result key 'updates' -> 'commands'

vyos_config is supported by core

* vyos_config tests

* Enable bracket config use

* Sanitize config before use
2017-02-02 13:12:26 -05:00
Nathaniel Case
b3662fdad1 vyos_command 2.3 (#18994)
* Peter's new module_utils/vyos
* Update vyos_command
* Restore `set terminal length $ANSIBLE_VYOS_TERMINAL_LENGTH` in vyos
* vyos_command tests
* Remove provider mentions from vyos_command
* Extend get_config to take (and cache) various `show configuration` commands
2017-01-23 15:30:19 -05:00