diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index 4d73da7497..02e1abfe74 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1310,6 +1310,5 @@ plugins/modules/web_infrastructure/taiga_issue.py validate-modules:parameter-typ scripts/inventory/gce.py pylint:blacklisted-name tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate -tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py pylint:blacklisted-name tests/utils/shippable/check_matrix.py replace-urlopen tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 4d73da7497..02e1abfe74 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -1310,6 +1310,5 @@ plugins/modules/web_infrastructure/taiga_issue.py validate-modules:parameter-typ scripts/inventory/gce.py pylint:blacklisted-name tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate -tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py pylint:blacklisted-name tests/utils/shippable/check_matrix.py replace-urlopen tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index de07af1b24..969a64e4c1 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -1029,6 +1029,5 @@ plugins/modules/web_infrastructure/taiga_issue.py validate-modules:parameter-typ scripts/inventory/gce.py pylint:blacklisted-name tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate -tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py pylint:blacklisted-name tests/utils/shippable/check_matrix.py replace-urlopen tests/utils/shippable/timing.py shebang diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/__init__.py b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/__init__.py b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family.test_no_changes deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family.test_no_changes +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt deleted file mode 100644 index 8d223b041b..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "up", - "state": "present", - "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt deleted file mode 100644 index 1c9adbd9fc..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt +++ /dev/null @@ -1,17 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "up", - "state": "present", - "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} -===== -[1] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "up", - "state": "absent", - "value": null -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4 deleted file mode 100644 index 9a2f5b0594..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4 +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.42 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up deleted file mode 100644 index 5077e3a681..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up +++ /dev/null @@ -1,13 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - post-up XXXX_ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up deleted file mode 100644 index 5c0f69736c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up +++ /dev/null @@ -1,13 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - pre-up XXXX_ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6 deleted file mode 100644 index afaaac9620..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6 +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::42 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up deleted file mode 100644 index cb3e98b776..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up +++ /dev/null @@ -1,13 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 - post-up XXXX_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up deleted file mode 100644 index 149da568be..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up +++ /dev/null @@ -1,13 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 - pre-up XXXX_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt deleted file mode 100644 index 050a983971..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -fail_json message: Error: interface eth1 not found -options: -{ - "iface": "eth1", - "option": "method", - "state": "present", - "value": "dhcp" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_change_method.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_revert.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu deleted file mode 100644 index 40331271ad..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu +++ /dev/null @@ -1,13 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 - mtu 1350 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt deleted file mode 100644 index 3f0da8b1c7..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "mtu", - "state": "present", - "value": "1350" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt deleted file mode 100644 index 0af87750b7..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "slaves", - "state": "present", - "value": "int1 int3" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json deleted file mode 100644 index ee632bd542..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "eth0": { - "address": "fc00::1", - "address_family": "inet6", - "down": [], - "method": "static", - "post-up": [ - "echo configuring ipv6" - ], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt deleted file mode 100644 index 8d223b041b..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "up", - "state": "present", - "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt deleted file mode 100644 index 1c9adbd9fc..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt +++ /dev/null @@ -1,17 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "up", - "state": "present", - "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} -===== -[1] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "up", - "state": "absent", - "value": null -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4 deleted file mode 100644 index 6962937416..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4 +++ /dev/null @@ -1,7 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp - address 192.168.0.42 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up deleted file mode 100644 index 998f484469..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up +++ /dev/null @@ -1,7 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp - post-up XXXX_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up deleted file mode 100644 index 5e6af40a2d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up +++ /dev/null @@ -1,7 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp - pre-up XXXX_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6 deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6 +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt deleted file mode 100644 index 04c2089186..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet6", - "iface": "eth0", - "option": "address", - "state": "present", - "value": "fc00::42" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt deleted file mode 100644 index 48cb29b0aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet6", - "iface": "eth0", - "option": "post-up", - "state": "present", - "value": "XXXX_ipv6" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt deleted file mode 100644 index fbfed6be37..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet6", - "iface": "eth0", - "option": "pre-up", - "state": "present", - "value": "XXXX_ipv6" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt deleted file mode 100644 index 050a983971..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -fail_json message: Error: interface eth1 not found -options: -{ - "iface": "eth1", - "option": "method", - "state": "present", - "value": "dhcp" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_revert.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu deleted file mode 100644 index 7bbad22a5e..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu +++ /dev/null @@ -1,7 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp - mtu 1350 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt deleted file mode 100644 index 3f0da8b1c7..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "mtu", - "state": "present", - "value": "1350" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt deleted file mode 100644 index 0af87750b7..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[0] fail_json message: Error: interface aggi not found -options: -{ - "iface": "aggi", - "option": "slaves", - "state": "present", - "value": "int1 int3" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json deleted file mode 100644 index bffc17a989..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "eth0": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com.test_no_changes deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com.test_no_changes +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up deleted file mode 100644 index e86b25782b..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up +++ /dev/null @@ -1,62 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - up route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4 deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4 +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt deleted file mode 100644 index a1600d9a67..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet", - "iface": "eth0", - "option": "address", - "state": "present", - "value": "192.168.0.42" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt deleted file mode 100644 index e1e0152320..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet", - "iface": "eth0", - "option": "post-up", - "state": "present", - "value": "XXXX_ipv4" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt deleted file mode 100644 index 9e510654c2..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet", - "iface": "eth0", - "option": "pre-up", - "state": "present", - "value": "XXXX_ipv4" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6 deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6 +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt deleted file mode 100644 index 04c2089186..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet6", - "iface": "eth0", - "option": "address", - "state": "present", - "value": "fc00::42" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt deleted file mode 100644 index 48cb29b0aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet6", - "iface": "eth0", - "option": "post-up", - "state": "present", - "value": "XXXX_ipv6" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt deleted file mode 100644 index fbfed6be37..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt +++ /dev/null @@ -1,9 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "address_family": "inet6", - "iface": "eth0", - "option": "pre-up", - "state": "present", - "value": "XXXX_ipv6" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method deleted file mode 100644 index 065bf0f041..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet dhcp - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method.json deleted file mode 100644 index 8e9863b2ea..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_change_method.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "dhcp", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt deleted file mode 100644 index fddf3b3b0a..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -fail_json message: Error: interface eth0 not found -options: -{ - "iface": "eth0", - "option": "mtu", - "state": "absent", - "value": "1350" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_revert.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu deleted file mode 100644 index 5218eed194..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1350 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt deleted file mode 100644 index 764c9cb016..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -[1] fail_json message: Error: interface eth0 not found -options: -{ - "iface": "eth0", - "option": "mtu", - "state": "present", - "value": "1350" -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves deleted file mode 100644 index e2b78e93ab..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int3 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json deleted file mode 100644 index 9e97da32aa..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "agge": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "aggi": { - "address": "10.44.15.196", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "down": [], - "hwaddress": "ether 22:44:77:88:D5:96", - "method": "static", - "mtu": "1500", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K aggi tx off tso off" - ], - "pre-up": [], - "slaves": "int1 int2", - "up": [] - }, - "br0": { - "address": "188.44.133.76", - "address_family": "inet", - "bond_downdelay": "200", - "bond_lacp_rate": "slow", - "bond_miimon": "100", - "bond_mode": "4", - "bond_updelay": "200", - "bond_xmit_hash_policy": "layer3+4", - "bridge_ports": "agge", - "down": [], - "gateway": "188.44.133.75", - "hwaddress": "ether 22:44:77:88:D5:98", - "method": "static", - "netmask": "255.255.255.248", - "post-up": [ - "/sbin/ethtool -K agge tx off tso off" - ], - "pre-up": [], - "slaves": "ext1 ext2", - "up": [ - "route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi", - "route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi", - "route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi" - ] - }, - "eth1": { - "address_family": "inet", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext1": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "ext2": { - "address_family": "inet", - "bond-master": "agge", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int1": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "int2": { - "address_family": "inet", - "bond-master": "aggi", - "down": [], - "method": "manual", - "post-up": [], - "pre-up": [], - "up": [] - }, - "lo": { - "address_family": "inet", - "down": [], - "method": "loopback", - "post-up": [], - "pre-up": [], - "up": [] - } -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/address_family b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/address_family deleted file mode 100644 index bc4ecea78d..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/address_family +++ /dev/null @@ -1,12 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet static - address 192.168.0.1 - post-up echo configuring ipv4 - -iface eth0 inet6 static - address fc00::1 - post-up echo configuring ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/default_dhcp b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/default_dhcp deleted file mode 100644 index bd4522ec09..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/default_dhcp +++ /dev/null @@ -1,6 +0,0 @@ -# The loopback network interface -auto lo eth0 -iface lo inet loopback - -# The primary network interface -iface eth0 inet dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/servers.com b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/servers.com deleted file mode 100644 index c826bbe73c..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/fixtures/input/servers.com +++ /dev/null @@ -1,61 +0,0 @@ - auto aggi - iface aggi inet static - hwaddress ether 22:44:77:88:D5:96 - address 10.44.15.196 - netmask 255.255.255.248 - mtu 1500 - slaves int1 int2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K aggi tx off tso off - - auto agge - iface agge inet manual - - auto br0 - iface br0 inet static - bridge_ports agge - hwaddress ether 22:44:77:88:D5:98 - address 188.44.133.76 - netmask 255.255.255.248 - gateway 188.44.133.75 - slaves ext1 ext2 - bond_mode 4 - bond_miimon 100 - bond_downdelay 200 - bond_updelay 200 - bond_lacp_rate slow - bond_xmit_hash_policy layer3+4 - post-up /sbin/ethtool -K agge tx off tso off - - up route add -net 10.0.0.0/8 gw 10.44.15.117 dev aggi - up route add -net 192.168.0.0/16 gw 10.44.15.117 dev aggi - up route add -net 188.44.208.0/21 gw 10.44.15.117 dev aggi - - auto int1 - iface int1 inet manual - bond-master aggi - - auto int2 - iface int2 inet manual - bond-master aggi - - auto ext1 - iface ext1 inet manual - bond-master agge - - auto ext2 - iface ext2 inet manual - bond-master agge - - auto eth1 - iface eth1 inet manual - - auto lo - iface lo inet loopback - -source /etc/network/interfaces.d/*.cfg diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/test_interfaces_file.py deleted file mode 100644 index 02cdc6fdd5..0000000000 --- a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file/test_interfaces_file.py +++ /dev/null @@ -1,318 +0,0 @@ -# (c) 2017, Roman Belyakovsky -# -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -from ansible_collections.ansible.posix.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules import interfaces_file -from shutil import copyfile, move -import difflib -import inspect -import io -import json -import os -import re -import shutil -import tempfile - - -class AnsibleFailJson(Exception): - pass - - -class ModuleMocked(): - def atomic_move(self, src, dst): - move(src, dst) - - def backup_local(self, path): - backupp = os.path.join("/tmp", os.path.basename(path) + ".bak") - copyfile(path, backupp) - return backupp - - def fail_json(self, msg): - raise AnsibleFailJson(msg) - - -module = ModuleMocked() -fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'input') -golden_output_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'golden_output') - - -class TestInterfacesFileModule(unittest.TestCase): - def getTestFiles(self, include_filter=None, exclude_filter=None): - flist = next(os.walk(fixture_path))[2] - if include_filter: - flist = filter(lambda x: re.match(include_filter, x), flist) - if exclude_filter: - flist = filter(lambda x: not re.match(exclude_filter, x), flist) - return flist - - def compareFileToBackup(self, path, backup): - with open(path) as f1: - with open(backup) as f2: - diffs = difflib.context_diff(f1.readlines(), - f2.readlines(), - fromfile=os.path.basename(path), - tofile=os.path.basename(backup)) - # Restore backup - move(backup, path) - deltas = [d for d in diffs] - self.assertTrue(len(deltas) == 0) - - def compareInterfacesLinesToFile(self, interfaces_lines, path, testname=None): - if not testname: - testname = "%s.%s" % (path, inspect.stack()[1][3]) - self.compareStringWithFile("".join([d['line'] for d in interfaces_lines if 'line' in d]), testname) - - def compareInterfacesToFile(self, ifaces, path, testname=None): - if not testname: - testname = "%s.%s.json" % (path, inspect.stack()[1][3]) - self.compareStringWithFile(json.dumps(ifaces, sort_keys=True, indent=4, separators=(',', ': ')), testname) - - def compareStringWithFile(self, string, path): - # self.assertEqual("","_",msg=path) - testfilepath = os.path.join(golden_output_path, path) - goldenstring = string - if not os.path.isfile(testfilepath): - f = io.open(testfilepath, 'wb') - f.write(string) - f.close() - else: - with open(testfilepath, 'r') as goldenfile: - goldenstring = goldenfile.read() - goldenfile.close() - self.assertEqual(string, goldenstring) - - def test_no_changes(self): - for testfile in self.getTestFiles(): - path = os.path.join(fixture_path, testfile) - lines, ifaces = interfaces_file.read_interfaces_file(module, path) - self.compareInterfacesLinesToFile(lines, testfile) - self.compareInterfacesToFile(ifaces, testfile) - - def test_add_up_aoption_to_aggi(self): - testcases = { - "add_aggi_up": [ - { - 'iface': 'aggi', - 'option': 'up', - 'value': 'route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi', - 'state': 'present', - } - ], - "add_and_delete_aggi_up": [ - { - 'iface': 'aggi', - 'option': 'up', - 'value': 'route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi', - 'state': 'present', - }, - { - 'iface': 'aggi', - 'option': 'up', - 'value': None, - 'state': 'absent', - }, - ], - "set_aggi_slaves": [ - { - 'iface': 'aggi', - 'option': 'slaves', - 'value': 'int1 int3', - 'state': 'present', - }, - ], - "set_aggi_and_eth0_mtu": [ - { - 'iface': 'aggi', - 'option': 'mtu', - 'value': '1350', - 'state': 'present', - }, - { - 'iface': 'eth0', - 'option': 'mtu', - 'value': '1350', - 'state': 'present', - }, - ], - } - for testname, options_list in testcases.items(): - for testfile in self.getTestFiles(): - path = os.path.join(fixture_path, testfile) - lines, ifaces = interfaces_file.read_interfaces_file(module, path) - fail_json_iterations = [] - for i, options in enumerate(options_list): - try: - dummy, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], - options['value'], options['state']) - except AnsibleFailJson as e: - fail_json_iterations.append("[%d] fail_json message: %s\noptions:\n%s" % - (i, str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': ')))) - self.compareStringWithFile("\n=====\n".join(fail_json_iterations), "%s_%s.exceptions.txt" % (testfile, testname)) - - self.compareInterfacesLinesToFile(lines, testfile, "%s_%s" % (testfile, testname)) - self.compareInterfacesToFile(ifaces, testfile, "%s_%s.json" % (testfile, testname)) - - def test_revert(self): - testcases = { - "revert": [ - { - 'iface': 'eth0', - 'option': 'mtu', - 'value': '1350', - } - ], - } - for testname, options_list in testcases.items(): - for testfile in self.getTestFiles(): - with tempfile.NamedTemporaryFile() as temp_file: - src_path = os.path.join(fixture_path, testfile) - path = temp_file.name - shutil.copy(src_path, path) - lines, ifaces = interfaces_file.read_interfaces_file(module, path) - backupp = module.backup_local(path) - options = options_list[0] - for state in ['present', 'absent']: - fail_json_iterations = [] - options['state'] = state - try: - dummy, lines = interfaces_file.setInterfaceOption(module, lines, - options['iface'], options['option'], options['value'], options['state']) - except AnsibleFailJson as e: - fail_json_iterations.append("fail_json message: %s\noptions:\n%s" % - (str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': ')))) - interfaces_file.write_changes(module, [d['line'] for d in lines if 'line' in d], path) - - self.compareStringWithFile("\n=====\n".join(fail_json_iterations), "%s_%s.exceptions.txt" % (testfile, testname)) - - self.compareInterfacesLinesToFile(lines, testfile, "%s_%s" % (testfile, testname)) - self.compareInterfacesToFile(ifaces, testfile, "%s_%s.json" % (testfile, testname)) - self.compareFileToBackup(path, backupp) - - def test_change_method(self): - testcases = { - "change_method": [ - { - 'iface': 'eth1', - 'option': 'method', - 'value': 'dhcp', - 'state': 'present', - } - ], - } - for testname, options_list in testcases.items(): - for testfile in self.getTestFiles(): - with tempfile.NamedTemporaryFile() as temp_file: - src_path = os.path.join(fixture_path, testfile) - path = temp_file.name - shutil.copy(src_path, path) - lines, ifaces = interfaces_file.read_interfaces_file(module, path) - backupp = module.backup_local(path) - options = options_list[0] - fail_json_iterations = [] - try: - changed, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], - options['value'], options['state']) - # When a changed is made try running it again for proper idempotency - if changed: - changed_again, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], - options['option'], options['value'], options['state']) - self.assertFalse(changed_again, - msg='Second request for change should return false for {0} running on {1}'.format(testname, - testfile)) - except AnsibleFailJson as e: - fail_json_iterations.append("fail_json message: %s\noptions:\n%s" % - (str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': ')))) - interfaces_file.write_changes(module, [d['line'] for d in lines if 'line' in d], path) - - self.compareStringWithFile("\n=====\n".join(fail_json_iterations), "%s_%s.exceptions.txt" % (testfile, testname)) - - self.compareInterfacesLinesToFile(lines, testfile, "%s_%s" % (testfile, testname)) - self.compareInterfacesToFile(ifaces, testfile, "%s_%s.json" % (testfile, testname)) - # Restore backup - move(backupp, path) - - def test_inet_inet6(self): - testcases = { - "change_ipv4": [ - { - 'iface': 'eth0', - 'address_family': 'inet', - 'option': 'address', - 'value': '192.168.0.42', - 'state': 'present', - } - ], - "change_ipv6": [ - { - 'iface': 'eth0', - 'address_family': 'inet6', - 'option': 'address', - 'value': 'fc00::42', - 'state': 'present', - } - ], - "change_ipv4_pre_up": [ - { - 'iface': 'eth0', - 'address_family': 'inet', - 'option': 'pre-up', - 'value': 'XXXX_ipv4', - 'state': 'present', - } - ], - "change_ipv6_pre_up": [ - { - 'iface': 'eth0', - 'address_family': 'inet6', - 'option': 'pre-up', - 'value': 'XXXX_ipv6', - 'state': 'present', - } - ], - "change_ipv4_post_up": [ - { - 'iface': 'eth0', - 'address_family': 'inet', - 'option': 'post-up', - 'value': 'XXXX_ipv4', - 'state': 'present', - } - ], - "change_ipv6_post_up": [ - { - 'iface': 'eth0', - 'address_family': 'inet6', - 'option': 'post-up', - 'value': 'XXXX_ipv6', - 'state': 'present', - } - ], - } - for testname, options_list in testcases.items(): - for testfile in self.getTestFiles(): - with tempfile.NamedTemporaryFile() as temp_file: - src_path = os.path.join(fixture_path, testfile) - path = temp_file.name - shutil.copy(src_path, path) - lines, ifaces = interfaces_file.read_interfaces_file(module, path) - backupp = module.backup_local(path) - options = options_list[0] - fail_json_iterations = [] - try: - dummy, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], - options['value'], options['state'], options['address_family']) - except AnsibleFailJson as e: - fail_json_iterations.append("fail_json message: %s\noptions:\n%s" % - (str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': ')))) - interfaces_file.write_changes(module, [d['line'] for d in lines if 'line' in d], path) - - self.compareStringWithFile("\n=====\n".join(fail_json_iterations), "%s_%s.exceptions.txt" % (testfile, testname)) - - self.compareInterfacesLinesToFile(lines, testfile, "%s_%s" % (testfile, testname)) - self.compareInterfacesToFile(ifaces, testfile, "%s_%s.json" % (testfile, testname)) - # Restore backup - move(backupp, path) diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py index b61385108a..a96737c7a8 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py @@ -148,7 +148,8 @@ class TestInterfacesFileModule(unittest.TestCase): fail_json_iterations = [] for i, options in enumerate(options_list): try: - _, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], options['value'], options['state']) + dummy, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], + options['value'], options['state']) except AnsibleFailJson as e: fail_json_iterations.append("[%d] fail_json message: %s\noptions:\n%s" % (i, str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': ')))) @@ -180,8 +181,8 @@ class TestInterfacesFileModule(unittest.TestCase): fail_json_iterations = [] options['state'] = state try: - _, lines = interfaces_file.setInterfaceOption(module, lines, - options['iface'], options['option'], options['value'], options['state']) + dummy, lines = interfaces_file.setInterfaceOption(module, lines, + options['iface'], options['option'], options['value'], options['state']) except AnsibleFailJson as e: fail_json_iterations.append("fail_json message: %s\noptions:\n%s" % (str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': ')))) @@ -304,8 +305,8 @@ class TestInterfacesFileModule(unittest.TestCase): options = options_list[0] fail_json_iterations = [] try: - _, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], - options['value'], options['state'], options['address_family']) + dummy, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], + options['value'], options['state'], options['address_family']) except AnsibleFailJson as e: fail_json_iterations.append("fail_json message: %s\noptions:\n%s" % (str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': '))))