Fix update check issue in junos_config (#20182)

* Fix update check issue in junos_config and required_if enhancement

* Add additional check to update argument which will ensure config
  statement is present.
* Add 'or' condition support in 'required_if'.

* Fix python 2.4 syntax issue

* revert requied_if changes
This commit is contained in:
Ganesh Nalawade 2017-01-25 20:14:16 +05:30 committed by John R Barker
parent ebfb9ff3c1
commit a43534a4a8

View file

@ -346,9 +346,9 @@ def main():
('update', 'replace')]
required_if = [('replace', True, ['src']),
('update', 'merge', ['src']),
('update', 'overwrite', ['src']),
('update', 'replace', ['src'])]
('update', 'merge', ('src', 'lines')),
('update', 'overwrite', ('src', 'lines')),
('update', 'replace', ('src', 'lines'))]
module = NetworkModule(argument_spec=argument_spec,
mutually_exclusive=mutually_exclusive,