Commit Graph

87752 Commits

Author SHA1 Message Date
Bo Maryniuk
56cd42e55d Remove dead code 2017-11-10 20:02:04 +01:00
Bo Maryniuk
59bec48881 Handle errors 2017-11-10 20:02:04 +01:00
Bo Maryniuk
7993a728fc Implement basic Ansible state call 2017-11-10 20:02:04 +01:00
Bo Maryniuk
d0fd3ede58 Wrap caller into a class 2017-11-10 20:02:04 +01:00
Bo Maryniuk
b87f4791fb Take to the account popen's STDERR as well. 2017-11-10 20:02:03 +01:00
Bo Maryniuk
7a3acc3dce Initial scaffolding for Ansible state module 2017-11-10 20:02:03 +01:00
Bo Maryniuk
2faf0a0829 Add quotes to the help command 2017-11-10 20:02:03 +01:00
Bo Maryniuk
0469c420df Prevent dummy modules to be executed to nothing 2017-11-10 20:02:03 +01:00
Bo Maryniuk
05244d82fa Call description from help by default 2017-11-10 20:02:03 +01:00
Bo Maryniuk
01ba818a63 Catch loader error as well 2017-11-10 20:02:03 +01:00
Bo Maryniuk
304b863488 Implement basic module caller (Python modules only) 2017-11-10 20:02:03 +01:00
Bo Maryniuk
15d85cd6d8 Register the full name of the module 2017-11-10 20:02:03 +01:00
Bo Maryniuk
5cfc32f471 Prepare arguments for the module 2017-11-10 20:02:03 +01:00
Bo Maryniuk
a77b8b4204 Add missed import 2017-11-10 20:02:03 +01:00
Bo Maryniuk
9ff8c884c9 Allow long names with dots in between 2017-11-10 20:02:03 +01:00
Bo Maryniuk
f48a363011 Set dynamically all possible Ansible callers as functions 2017-11-10 20:02:03 +01:00
Bo Maryniuk
48b79c03b6 Implement module lister 2017-11-10 20:02:03 +01:00
Bo Maryniuk
68c9043507 Improve error handling for the loaded module 2017-11-10 20:02:03 +01:00
Bo Maryniuk
d1d4c39ddc Add help resolver on a particular Python module of Ansible. 2017-11-10 20:02:03 +01:00
Bo Maryniuk
7c17f57ccf Add initial module resolver, implement modules map 2017-11-10 20:02:03 +01:00
Bo Maryniuk
d1e4b9b51e Initial start of ansible module 2017-11-10 20:02:03 +01:00
Bo Maryniuk
7949925ae6 Use tuple instead of list for joining 2017-11-10 19:50:47 +01:00
Bo Maryniuk
ec3e8211ef Remove unused variable 2017-11-10 19:50:47 +01:00
Bo Maryniuk
ec8050ced2 Discard Git's spaghetti merger 2017-11-10 19:50:47 +01:00
Bo Maryniuk
b2ed7d0ecd Mute pylint on misdetected regex-like strings that are actually just test data. 2017-11-10 19:50:47 +01:00
Bo Maryniuk
40f1e1d954 Rewrite unit tests for file.line on delete/replace an empty line 2017-11-10 19:50:47 +01:00
Bo Maryniuk
629d1ddcce Refactor file.line insert/ensure with after/before conditions 2017-11-10 19:50:47 +01:00
Bo Maryniuk
e0d05e5347 Refactor insert/ensure when after/before is known 2017-11-10 19:50:47 +01:00
Bo Maryniuk
c2d9d8f8ea Add unit test for file.line ensuring line between two lines but content already exists 2017-11-10 19:50:47 +01:00
Bo Maryniuk
c7a320ae8e Make assert_occurrence return amount of occurrences 2017-11-10 19:50:47 +01:00
Bo Maryniuk
9963895719 Add unit test for file.line ensuring line inside the range of lines 2017-11-10 19:50:47 +01:00
Bo Maryniuk
1e1f5e5a6f Add unit test for file.line ensuring line between two other lines nearby 2017-11-10 19:50:47 +01:00
Bo Maryniuk
59de17b260 Add unit test for file.line on calling insert/ensure after specific line 2017-11-10 19:50:47 +01:00
Bo Maryniuk
710481b25e Add unit test for file.line when calling insert/ensure mode 2017-11-10 19:50:47 +01:00
Bo Maryniuk
d98b3a59e8 Bugfix: keep indent of the "before" line. 2017-11-10 19:50:47 +01:00
Bo Maryniuk
a030b53fc7 Bugfix: content at the end should be added as a line, instead of merged to the rest of the data 2017-11-10 19:50:47 +01:00
Bo Maryniuk
218331c882 Bugfix: content at the beginning should be added as a line, instead of merged to the rest of the data 2017-11-10 19:50:47 +01:00
Bo Maryniuk
b42b762c57 Add unit test for file.line when inserting a line at the end of the file (append functionality) 2017-11-10 19:50:46 +01:00
Bo Maryniuk
80c40bbb11 Remove irrelevant issue number 2017-11-10 19:50:46 +01:00
Bo Maryniuk
c95b3e031c Add unit test about file.line for insert/start 2017-11-10 19:50:46 +01:00
Bo Maryniuk
926372574d Remove irrelevant issue number from the docstring 2017-11-10 19:50:46 +01:00
Bo Maryniuk
b4cd4bd165 Add unit test for file.line replacement 2017-11-10 19:50:46 +01:00
Bo Maryniuk
9a72761dc6 Add unit test for file.line delete by direct match or regular expression 2017-11-10 19:50:46 +01:00
Bo Maryniuk
60185f578e Add unit test for file.line usage together with before/after 2017-11-10 19:50:46 +01:00
Bo Maryniuk
fc79a546dd Rename unit test 2017-11-10 19:50:46 +01:00
Bo Maryniuk
22e7ae2061 Fix: before/after together now define a range, where line will be added right before the last one within the range, i.e. before "before". 2017-11-10 19:50:46 +01:00
Bo Maryniuk
d1a41dd7bd Add unit test file.line insert before line 2017-11-10 19:50:46 +01:00
Bo Maryniuk
1ea7e33605 Harden unit test for 'after pattern' scenario 2017-11-10 19:50:46 +01:00
Bo Maryniuk
bde3611f08 Remove unnecessary code 2017-11-10 19:50:46 +01:00
Bo Maryniuk
fdffbe47b0 Add unit test for using patterns for line matching 2017-11-10 19:50:46 +01:00