Changes since the [RFC PATCH]: * network parsing tests added (+ 'make check' target) * read/write_etc_network_interfaces implementation separated from file load/saving. Logic is now in functions named __read/write_etc_network_interfaces in order to be able to test them directly from the testsuite. * improved sorting to preserve option lines between interface sections better * fixed missing initialisation if no 'auto' lines are found for an interface * take OVS related allow-* lines into account when reading to prevent duplicating them via the options array * fixed eth interfaces not having been reset to manual after removing them from an OVS bridge, (this used to make write->read->write produce two different files on the two writes after removing an ovs port) * warning fixes
Wolfgang Bumiller (16): JSONSchema: ipv6prefix and ipsubnet read_etc_network_interfaces: less strict parsing removed write-only $gateway variable read_etc_network_interfaces: improved parsing merge bridge_port declarations write_etc_network_interfaces: write options only once write_etc_network_interfaces: updated header comment PVE::INotify: testable interface parser write_network_interfaces: better newline consistency write_etc_interfaces: fix: don't write ref of options6 read_etc_interfaces: missing iface initialization /etc/network/interfaces: deal with OVS allow- lines importing etc_network_interfaces tests PVE::INotify::write_network_interfaces: readability write_network_interfaces: improved sorting tests: list/create/update network interfaces Makefile | 3 + src/PVE/INotify.pm | 287 +++++++++++++++------ src/PVE/JSONSchema.pm | 22 ++ test/Makefile | 12 + test/etc_network_interfaces/Makefile | 7 + test/etc_network_interfaces/base | 16 ++ test/etc_network_interfaces/brbase | 26 ++ test/etc_network_interfaces/loopback | 14 + test/etc_network_interfaces/proc_net_dev | 5 + test/etc_network_interfaces/proc_net_if_inet6 | 3 + test/etc_network_interfaces/runtest.pl | 208 +++++++++++++++ test/etc_network_interfaces/t.base.pl | 12 + test/etc_network_interfaces/t.bridge-v4-v6.pl | 84 ++++++ test/etc_network_interfaces/t.create_network.pl | 91 +++++++ test/etc_network_interfaces/t.keep-option-order.pl | 28 ++ test/etc_network_interfaces/t.list-interfaces.pl | 109 ++++++++ test/etc_network_interfaces/t.ovs_bridge_allow.pl | 116 +++++++++ .../t.unhandled-interfaces-to-manual.pl | 25 ++ test/etc_network_interfaces/t.update_network.pl | 116 +++++++++ 19 files changed, 1105 insertions(+), 79 deletions(-) create mode 100644 test/Makefile create mode 100644 test/etc_network_interfaces/Makefile create mode 100644 test/etc_network_interfaces/base create mode 100644 test/etc_network_interfaces/brbase create mode 100644 test/etc_network_interfaces/loopback create mode 100644 test/etc_network_interfaces/proc_net_dev create mode 100644 test/etc_network_interfaces/proc_net_if_inet6 create mode 100755 test/etc_network_interfaces/runtest.pl create mode 100644 test/etc_network_interfaces/t.base.pl create mode 100644 test/etc_network_interfaces/t.bridge-v4-v6.pl create mode 100644 test/etc_network_interfaces/t.create_network.pl create mode 100644 test/etc_network_interfaces/t.keep-option-order.pl create mode 100644 test/etc_network_interfaces/t.list-interfaces.pl create mode 100644 test/etc_network_interfaces/t.ovs_bridge_allow.pl create mode 100644 test/etc_network_interfaces/t.unhandled-interfaces-to-manual.pl create mode 100644 test/etc_network_interfaces/t.update_network.pl -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel